Package QueuingNet

Examples of QueuingNet.MoMSolver


  @Override
  public void solve() {
    QueuingNet.QNSolver c = null;
    boolean isPerturbed = false;
    try{
      c = new MoMSolver(qnm, nThreads);
      c.computeNormalisingConstant();
    } catch (Exception e) {
      Integer D[][]=new Integer[qnm.M][qnm.R];
      Integer Z[]=new Integer[qnm.R];
      Integer mi[]=new Integer[qnm.M];
      Integer N[]=new Integer[qnm.R];
      Integer pert = (Integer) 1;
      Integer newscale = scale  * pert;
      for (int r=0; r<qnm.R; r++) {
        Z[r] = (int) qnm.getDelay(r) * pert;
        N[r] = qnm.getPopulationVector().get(r);
        for (int i=0; i<qnm.M; i++) {
          mi[i] = qnm.getMultiplicitiesVector().get(i);
          D[i][r] = (Integer) (qnm.getDemand(i, r) * pert + (Integer) (i + 1) + (Integer) (int) Math.round((int)100*Math.random())); // i is a perturbation of 10^-6 magnitude
        }
      }
      scale = newscale;
      isPerturbed = true;
      QNModel qnm2 = null;
      try {
        qnm2 = new QNModel(qnm.R, qnm.M, N, Z, mi, D);
      } catch (Exception e3) {
      }
      qnm = qnm2;
      try {
        c = new MoMSolver(qnm, nThreads);
        c.computeNormalisingConstant();
      } catch (Exception e1) {
      }
    }

View Full Code Here

TOP

Related Classes of QueuingNet.MoMSolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.