Package jmt.analytical

Examples of jmt.analytical.SolverSingleClosedMVA


  /**
   * Method used for testing
   */
  public static void testSingleClosedSpeed(int n) {
    SolverSingleClosedMVA mva = new SolverSingleClosedMVA(n, 5);
    String[] name = { "1", "2", "3", "4", "5" };
    int[] type = { Solver.LD, Solver.LD, Solver.LD, Solver.LD, Solver.LD };
    double[][] servt = new double[5][n + 1];
    double[] visit = { 1.0, 1.3, 2.5, 1, 1 };
    double p;

    for (int i = 1; i <= n; i++) {
      p = 1.0 / i;
      servt[0][i] = 0.020 * p;
      servt[1][i] = 0.024 * p;
      servt[2][i] = 0.007 * p;
      servt[3][i] = 0.0001 * p;
      servt[4][i] = 0.0015 * p;
    }

    if (mva.input(name, type, servt, visit)) {
      mva.solve();
    }
    System.out.println(mva);

    System.out.println("End Stability");
  }
View Full Code Here


  /**
   * Method used for testing
   */
  public static void testSingleClosedSpeed2(int n) {
    SolverSingleClosedMVA mva = new SolverSingleClosedMVA(n, 10);
    String[] name = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" };
    int[] type = { Solver.LD, Solver.LD, Solver.LD, Solver.LD, Solver.LD, Solver.LD, Solver.LD, Solver.LD, Solver.LD, Solver.LD };
    double[][] servt = new double[10][n + 1];
    double[] visit = { 1.0, 1.3, 2.5, 1, 1, 2, 4, 5, 2, 1.2 };
    double p;

    for (int i = 1; i <= n; i++) {
      p = 1.0 / i;
      servt[0][i] = 0.020 * p;
      servt[1][i] = 0.024 * p;
      servt[2][i] = 0.007 * p;
      servt[3][i] = 0.0001 * p;
      servt[4][i] = 0.0015 * p;
      servt[5][i] = 0.2 * p;
      servt[6][i] = 0.0214 * p;
      servt[7][i] = 0.074 * p;
      servt[8][i] = 0.0144 * p;
      servt[9][i] = 0.0213 * p;
    }

    if (mva.input(name, type, servt, visit)) {
      mva.solve();
    }
    System.out.println(mva);

    System.out.println("End Stability");
  }
View Full Code Here

  public static void testSingleClosedLI_5() {
    int n = 5;
    System.out.println("Sistema con: " + n + " customers");
    long start = System.currentTimeMillis();

    SolverSingleClosedMVA mva = new SolverSingleClosedMVA(n, 1);
    String[] name = { "Disk1" };
    int[] type = { Solver.LI };
    double[][] servt = { { 2.65 } };
    double[] visit = { 1 };

    if (mva.input(name, type, servt, visit)) {
      //mva.solve();
      mva.solve(true);
    }
    //System.out.println(mva);
    System.out.println(mva.toString());
    System.out.println("End LI");
    long stop = System.currentTimeMillis();
    System.out.print("Tempo trascorso: " + (stop - start));

  }
View Full Code Here

  public static void testSingleClosedLI_6() {
    int n = 5;
    System.out.println("Sistema con: " + n + " customers");
    long start = System.currentTimeMillis();

    SolverSingleClosedMVA mva = new SolverSingleClosedMVA(n, 2);
    String[] name = { "Disk1", "Disk2" };
    int[] type = { Solver.DELAY, Solver.DELAY };
    double[][] servt = new double[2][1];
    servt[0][0] = 2 / (1 - 0.12);
    servt[1][0] = 1 / (1 - 0.32);
    double[] visit = { 1, 1 };

    if (mva.input(name, type, servt, visit)) {
      //mva.solve();
      mva.solve(false);
    }
    //System.out.println(mva);
    System.out.println(mva.toString());
    System.out.println("End LI");
    long stop = System.currentTimeMillis();
    System.out.print("Tempo trascorso: " + (stop - start));

  }
View Full Code Here

TOP

Related Classes of jmt.analytical.SolverSingleClosedMVA

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.