Package org.woped.quantana.sim

Examples of org.woped.quantana.sim.SimParameters


  private void startSimulation() {
    LoggerManager.info(Constants.QUANTANA_LOGGER, Messages
        .getString("QuantAna.Started"));
    updTimeModel();
    logDlg.clear();
    SimParameters sp = new SimParameters(lambda, period);
    sp.setRuns(Integer.parseInt(txtRuns.getText()));

    String op1 = groupIAT.getSelection().getActionCommand();
    if (op1.equals("IAT_UNIFORM")) {
      sp.setDistCases(SimDistribution.CONSTANT);     
      sp.setCParam(Double.parseDouble(txtIATInterval.getText()) / 100);
    } else if (op1.equals("IAT_GAUSS")) {
      sp.setDistCases(SimDistribution.EXPOTENTIONAL);     
      sp.setCParam(Double.parseDouble(txtIATStdDev.getText()));
    } else {
      sp.setDistCases(SimDistribution.POISSON);
    }

    String op2 = groupST.getSelection().getActionCommand();
    if (op2.equals("ST_UNIFORM")) {
      sp.setDistServ(SimDistribution.CONSTANT);     
      sp.setSParam(Double.parseDouble(txtSTInterval.getText()) / 100);
    } else if (op2.equals("ST_GAUSS")) {
      sp.setDistServ(SimDistribution.EXPOTENTIONAL);     
      sp.setSParam(Double.parseDouble(txtSTStdDev.getText()));
    } else {
      sp.setDistServ(SimDistribution.POISSON);
    }

    String op3 = groupQD.getSelection().getActionCommand();
    if (op3.equals("QUEUE_LIFO")) {
      sp.setQueue(SimRunner.Q_LIFO);
    } else {
      sp.setQueue(SimRunner.Q_FIFO);
    }

    if (stop1.isSelected()) {
      if (stop2.isSelected())
        sp.setStop(SimRunner.STOP_BOTH);
      else
        sp.setStop(SimRunner.STOP_CASE);
    } else if (stop2.isSelected()) {
      sp.setStop(SimRunner.STOP_TIME);
    } else {
      sp.setStop(SimRunner.STOP_NONE);
    }
   
    sp.setWriteLog(ptk.isSelected());

//    if (groupRoleNum > 2 && resObjNum > 1) {
    if (resObjNum > 0) {
      sp.setResUse(SimRunner.RES_USED);
    } else {
      sp.setResUse(SimRunner.RES_NOT_USED);
   
   
    unfoldNet(simgraph, sp.getPeriod()/sp.getLambda(), epsilon);   
    sim = new SimRunner(simgraph, new ResourceUtilization(resAlloc), sp);   
    // the waitdialog starts and observs the simulation
    new WaitDialog(this, Messages.getString("QuantAna.Simulation.Wait"),sp.getPeriod()/sp.getLambda(),sim);    
  }
View Full Code Here

TOP

Related Classes of org.woped.quantana.sim.SimParameters

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.