⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 solvermulticlosedmva.java

📁 一个用于排队系统仿真的开源软件,有非常形象的图象仿真过程!
💻 JAVA
字号:
/**    
  * Copyright (C) 2006, Laboratorio di Valutazione delle Prestazioni - Politecnico di Milano

  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.

  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.

  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
  
/*
 * SolverMultiClosedMVA.java
 * Created on 11 dicembre 2002, 9.37
 */

package jmt.analytical;

/**
 * Solves a multiclass closed model, using MVA algorithm.
 * @author  Federico Granata, Stefano Omini
 */
public class SolverMultiClosedMVA extends SolverMulti {

    public final boolean DEBUG = false;

    //array of population for every class
    private int[] population;

    //an array used to reduce the computation every time
    //needed the product of n class population
    private int[] popMult;

    //status of the computation
    private int[] status;

    //sum af all populations
    private int totPop = 0;

    //queuelength vector
    private double[][] n;

    //private double sysResponseTime = 0;

    //private double sysThroughput = 0;

    private int maxIndex = -1;

    //number of states
    private int memory = 1;

    //NEW
    //@author Stefano Omini

    //---INTERMEDIATE RESULTS (0,1,2 ...N customers)------------//

    /** Intermediate results: throughput for each service station, class<br>
     * [customers] [station] [class] */
    protected double[][][] interm_throughput;

    /** Intermediate results: utilization for each service station, class<br>
     * [customers] [station] [class] */
    protected double[][][] interm_utilization;

    /** Intermediate results: queue lenght for each service station, class<br>
     * [customers] [station] [class] */
    protected double[][][] interm_queueLen;

    /** Intermediate results: residence time for each service station, class<br>
     * [customers] [station] [class] */
    protected double[][][] interm_residenceTime;

    /** Intermediate results: throughputs of the service centers<br>
     *  [customers] [station] */
    protected double[][] interm_scThroughput;

    /** Intermediate results: utilization of the service centers<br>
     *  [customers] [station] */
    protected double[][] interm_scUtilization;

    /** Intermediate results: queue lenght of the service centers<br>
     *  [customers] [station] */
    protected double[][] interm_scQueueLen;

    /** Intermediate results: residence time of the service centers<br>
     *  [customers] [station] */
    protected double[][] interm_scResidTime;

    /** Intermediate results: response time for each class<br>
     * [customers] [class] */
    protected double[][] interm_clsRespTime;

    /** Intermediate results: throughput for each class<br>
     * [customers] [class] */
    protected double[][] interm_clsThroughput;

    /** Intermediate results: average number of users for each class<br>
     * [customers] [class] */
    protected double[][] interm_clsNumJobs;

    /** Intermediate results: System response time
     * [customers]   */
    protected double[] interm_sysResponseTime;

    /** Intermediate results: System throughput
     * [customers]  */
    protected double[] interm_sysThroughput;

    /** Intermediate results: Number of jobs in the system
     * [customers]  */
    protected double[] interm_sysNumJobs;


    /**
     * Tells whether intermediate results have been computed or not
     */
    protected boolean intermediate_results = false;

    //---------------------------------------------------//


    //end NEW




    /** Creates new SolverMultiClosedMVA
     *  @param  stations    number of service centers
     *  @param  classes     number of classes of customers
     */
    public SolverMultiClosedMVA(int classes, int stations) {
        super(classes, stations);
        population = new int[classes];
        popMult = new int[classes];
        status = new int[classes];

//	    intZeros = new int[cls];

        //NEW
        //@author Stefano Omini

        interm_throughput = null;
        interm_utilization = null;
        interm_queueLen = null;
        interm_residenceTime = null;
        interm_scThroughput = null;
        interm_scUtilization = null;
        interm_scQueueLen = null;
        interm_scResidTime = null;
        interm_clsRespTime = null;
        interm_clsThroughput = null;
        interm_clsNumJobs = null;
        interm_sysResponseTime = null;
        interm_sysThroughput = null;
        interm_sysNumJobs = null;

        //end NEW



    }

    //TODO: attenzione, non 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -