Commit e1a1bcce authored by rosemaryng's avatar rosemaryng
Browse files

[UI] Added select distribution parameter for Retrial Full

parent 181ec19d
......@@ -13,21 +13,32 @@ import org.apache.commons.lang.mutable.MutableDouble;
public class Retrial implements Impatience {
public Distribution getDistribution() {
return distribution;
}
private Distribution distribution;
private Parameter parameter;
private ImpatienceType impatienceType;
public Double retrialRate;
private Exponential exponential;
private RandomEngine randEngine;
public Retrial(NetSystem netSystem, Parameter parameter) {
public Retrial(NetSystem netSystem, Double retrialRate) {
retrialRate = retrialRate;
try {
parameter = new ExponentialPar(retrialRate);
} catch (IncorrectDistributionParameterException e) {
e.printStackTrace();
}
exponential = new Exponential();
randEngine = netSystem.getEngine();
exponential.setRandomEngine(randEngine);
this.impatienceType = ImpatienceType.RETRIAL;
this.distribution = exponential;
this.parameter = parameter;
}
/**
......
package jmt.engine.NetStrategies.ImpatienceStrategies;
import jmt.gui.common.distributions.Distribution;
public class RetrialDistribution {
Distribution distribution;
public RetrialDistribution(Distribution distribution) {
this.distribution = distribution;
}
public Distribution getDistribution() {
return distribution;
}
public void setDistribution(Distribution distribution) {
this.distribution = distribution;
}
}
......@@ -21,18 +21,15 @@ package jmt.engine.NodeSections;
import java.util.*;
import jmt.common.exception.IncorrectDistributionParameterException;
import jmt.common.exception.NetException;
import jmt.engine.NetStrategies.ImpatienceStrategies.Balking;
import jmt.engine.NetStrategies.ImpatienceStrategies.*;
import jmt.engine.NetStrategies.ImpatienceStrategies.ImpatienceMeasurement.BooleanValueImpatienceMeasurement;
import jmt.engine.NetStrategies.ImpatienceStrategies.ImpatienceMeasurement.DoubleValueImpatienceMeasurement;
import jmt.engine.NetStrategies.ImpatienceStrategies.Impatience;
import jmt.engine.NetStrategies.ImpatienceStrategies.ImpatienceType;
import jmt.engine.NetStrategies.ImpatienceStrategies.Retrial;
import jmt.engine.NetStrategies.QueueGetStrategy;
import jmt.engine.NetStrategies.QueuePutStrategy;
import jmt.engine.NetStrategies.QueueGetStrategies.FCFSstrategy;
import jmt.engine.NetStrategies.QueuePutStrategies.TailStrategy;
import jmt.engine.NetStrategies.ServiceStrategy;
import jmt.engine.QueueNet.BlockingRegion;
import jmt.engine.QueueNet.ForkJob;
import jmt.engine.QueueNet.GlobalJobInfoList;
......@@ -49,8 +46,7 @@ import jmt.engine.QueueNet.NodeSection;
import jmt.engine.QueueNet.SimConstants;
import jmt.engine.QueueNet.WaitingRequest;
import jmt.engine.dataAnalysis.Measure;
import jmt.engine.random.ExponentialPar;
import jmt.engine.random.Parameter;
import jmt.gui.common.distributions.Distribution;
/**
* This class implements a generic finite/infinite queue. In finite queue, if
......@@ -101,7 +97,7 @@ public class Queue extends InputSection {
private String[] dropStrategies;
private ServiceStrategy[] retrialDistributionStrategies;
private int size; // queue + servers
private int maxRunning;
......@@ -279,7 +275,7 @@ public class Queue extends InputSection {
* @param getStrategy Queue get strategy: if null FCFS strategy is used.
* @param putStrategies Queue put strategy per class: if null Tail strategy is used.
*/
public Queue(Integer size, Integer maxRunning, Boolean serverPreemptive, String[] dropStrategies, QueueGetStrategy getStrategy, QueuePutStrategy[] putStrategies) {
public Queue(Integer size, Integer maxRunning, Boolean serverPreemptive, String[] dropStrategies, ServiceStrategy[] retrials, QueueGetStrategy getStrategy, QueuePutStrategy[] putStrategies) {
this(size.intValue(), maxRunning.intValue(), serverPreemptive.booleanValue(), false, getStrategy, putStrategies);
// Decodes drop strategies
this.dropStrategies = dropStrategies;
......@@ -294,13 +290,15 @@ public class Queue extends InputSection {
drop[i] = false;
block[i] = false;
retryFull = true;
retrialDistributionStrategies = retrials;
System.out.println("retrials: " + retrials);
}
}
}
public Queue(Integer size, String[] dropStrategies, QueueGetStrategy getStrategy, QueuePutStrategy[] putStrategies) {
this(size.intValue(), -1, false, dropStrategies, getStrategy, putStrategies);
public Queue(Integer size, String[] dropStrategies, ServiceStrategy[] retrials, QueueGetStrategy getStrategy, QueuePutStrategy[] putStrategies) {
this(size.intValue(), -1, false, dropStrategies, retrials, getStrategy, putStrategies);
}
/**
......@@ -314,17 +312,17 @@ public class Queue extends InputSection {
* @param putStrategies Queue put strategy per class: if null Tail strategy is used.
* @param impatienceStrategies Impatience strategies unique to each station and class.
*/
public Queue(Integer size, Integer maxRunning, Boolean serverPreemptive, String[] dropStrategies, QueueGetStrategy getStrategy,
QueuePutStrategy[] putStrategies, Impatience[] impatienceStrategies) {
public Queue(Integer size, Integer maxRunning, Boolean serverPreemptive, String[] dropStrategies, ServiceStrategy[] retrials
, QueueGetStrategy getStrategy, QueuePutStrategy[] putStrategies, Impatience[] impatienceStrategies) {
// Called method with decoded drop Strategies
this(size, maxRunning, serverPreemptive, dropStrategies, getStrategy, putStrategies);
this(size, maxRunning, serverPreemptive, dropStrategies, retrials, getStrategy, putStrategies);
// Add impatience strategies for each class
impatienceStrategyPerStationClass = impatienceStrategies;
}
public Queue(Integer size, String[] dropStrategies, QueueGetStrategy getStrategy,
public Queue(Integer size, String[] dropStrategies, ServiceStrategy[] retrials, QueueGetStrategy getStrategy,
QueuePutStrategy[] putStrategies, Impatience[] impatienceStrategies) {
this(size, -1, false, dropStrategies, getStrategy, putStrategies, impatienceStrategies);
this(size, -1, false, dropStrategies, retrials, getStrategy, putStrategies, impatienceStrategies);
}
/**
......@@ -392,12 +390,7 @@ public class Queue extends InputSection {
linkedToPSServer = true;
}
try {
Parameter param = new ExponentialPar(1);
retrial = new Retrial(this.getNetSytem(), param);
} catch (IncorrectDistributionParameterException e) {
e.printStackTrace();
}
retrial = new Retrial(this.getNetSytem(), 0.6);
}
......@@ -485,7 +478,9 @@ public class Queue extends InputSection {
*/
job = message.getJob();
double randomDelay = retrial.generateRandomDelay();
// double randomDelay = retrial.generateRandomDelay();
double randomDelay = retrialDistributionStrategies[job.getJobClass().getId()].wait(this, job.getJobClass());
System.out.println("random delay: " + randomDelay);
double retrialTime = this.getNetSytem().getTime() + randomDelay;
nodeJobsList.addToRetrialOrbit(job);
// System.out.println("Retrial signaled for " + job.getId() + " at " + retrialTime);
......@@ -525,7 +520,7 @@ public class Queue extends InputSection {
job = message.getJob();
JobInfo jobInfo = nodeJobsList.lookFor(job);
System.out.println("---- " + job.getId() + " time: " + getNetSytem().getTime());
// System.out.println("---- " + job.getId() + " time: " + getNetSytem().getTime());
if (isRetrialJob) {
retried.add(job.getId());
nodeJobsList.retryJob(jobInfo);
......@@ -597,8 +592,10 @@ public class Queue extends InputSection {
// System.out.println(job.getId() + " proceeds.");
waitingTime = getNetSytem().getTime() - nodeJobsList.getRetrialOrbit().get(job.getId()).get(0);
nodeJobsList.removeFromRetrialOrbit(job);
System.out.println("waitingTime for a retrial job: " + waitingTime);
// System.out.println("waitingTime for a retrial job: " + waitingTime);
}
nodeJobsList.updateWaitingTime(job, waitingTime);
// System.out.println("retrialJobsCount: " + retried.size() + " retrials Total Count: " + retrialCount + " orbit size: " + nodeJobsList.getRetrialOrbit() + " NodeJobsList: " + nodeJobsList.getInternalJobInfoList());
// If parent node is a fork node adds job to FJ info list
if (getOwnerNode().getSection(NodeSection.OUTPUT) instanceof Fork) {
......
......@@ -181,7 +181,7 @@ public class Server extends ServiceSection {
// this ack again when computation is finished)
sendBackward(NetEvent.EVENT_ACK, message.getJob(), 0.0);
}
getOwnerNode().getJobInfoList().updateWaitingTime(job, getTime());
// getOwnerNode().getJobInfoList().updateWaitingTime(job, getTime());
} else {
//server is busy
return MSG_NOT_PROCESSED;
......
......@@ -34,6 +34,7 @@ import java.util.Vector;
import jmt.engine.NetStrategies.ImpatienceStrategies.BalkingParameter;
import jmt.engine.NetStrategies.ImpatienceStrategies.ImpatienceParameter;
import jmt.engine.NetStrategies.ImpatienceStrategies.ImpatienceType;
import jmt.engine.NetStrategies.ImpatienceStrategies.Retrial;
import jmt.engine.log.JSimLogger;
import jmt.engine.log.LoggerParameters;
import jmt.framework.data.BDMap;
......@@ -44,6 +45,7 @@ import jmt.gui.common.CommonConstants;
import jmt.gui.common.Defaults;
import jmt.gui.common.classSwitchUtilities.ClassSwitchRow;
import jmt.gui.common.definitions.parametric.ParametricAnalysisDefinition;
import jmt.gui.common.distributions.Exponential;
import jmt.gui.common.forkStrategies.ClassSwitchFork;
import jmt.gui.common.forkStrategies.CombFork;
import jmt.gui.common.forkStrategies.ForkStrategy;
......@@ -468,6 +470,7 @@ public class CommonModel implements CommonConstants, ClassDefinition, StationDef
}
}
/**
* Returns reference station of the class, given the search key.
*/
......@@ -1434,6 +1437,62 @@ public class CommonModel implements CommonConstants, ClassDefinition, StationDef
}
}
/**
* Sets retrial rate associated with given station queue section if capacity is finite.
* @param stationKey: search key for station.
* @param classKey: search key for class.
* @param retrialRate: the retrial time distribution for each job
*/
@Override
public void setRetrialRate(Object stationKey, Object classKey, Double retrialRate) {
StationClassData scd = (StationClassData) stationDetailsBDM.get(classKey, stationKey);
if (scd == null) {
return;
}
if (scd.retrialRate == null || !scd.retrialRate.equals(retrialRate)) {
scd.retrialRate = retrialRate;
save = true;
}
}
/**
* Returns retrial rate associated with given station queue section if capacity is finite.
* @param stationKey: search key for station.
* @param classKey: search key for class.
* @return a Double -- the retrial rate
*/
@Override
public Double getRetrialRate(Object stationKey, Object classKey) {
StationClassData scd = (StationClassData) stationDetailsBDM.get(classKey, stationKey);
if (scd == null) {
return null;
}
return scd.retrialRate == null ? 0.5 : scd.retrialRate;
}
@Override
public void setRetrialDistribution(Object stationKey, Object classKey, Object distribution) {
StationClassData scd = (StationClassData) stationDetailsBDM.get(classKey, stationKey);
if (scd == null) {
return;
}
if (scd.retrialDistribution == null || !scd.retrialDistribution.equals(distribution)) {
scd.retrialDistribution = distribution;
save = true;
}
}
@Override
public Object getRetrialDistribution(Object stationKey, Object classKey) {
StationClassData scd = (StationClassData) stationDetailsBDM.get(classKey, stationKey);
if (scd == null) {
return null;
}
return scd.retrialDistribution;
}
/**
* Returns service weight for class and station, given their search keys.
* If specified station cannot accept this kind of parameter, null value is
......@@ -2153,6 +2212,7 @@ public class CommonModel implements CommonConstants, ClassDefinition, StationDef
} else if (sd.type.equals(STATION_TYPE_TRANSITION)) {
// Do nothing
}
scd.retrialDistribution = Defaults.getAsNewInstance("classDistribution");
return scd;
}
......@@ -3868,6 +3928,10 @@ public class CommonModel implements CommonConstants, ClassDefinition, StationDef
public ClassSwitchRow classSwitchProb;
private ImpatienceType impatienceType;
private ImpatienceParameter impatienceParameter;
public Double retrialRate;
// public Retrial retrial;
public Object retrialDistribution;
public StationClassData() {
this.preload = new Integer(0);
......
......@@ -24,6 +24,7 @@ import java.util.Vector;
import jmt.engine.NetStrategies.ImpatienceStrategies.ImpatienceParameter;
import jmt.engine.NetStrategies.ImpatienceStrategies.ImpatienceType;
import jmt.engine.NetStrategies.ImpatienceStrategies.Retrial;
import jmt.engine.log.LoggerParameters;
import jmt.gui.common.distributions.Distribution;
import jmt.gui.common.serviceStrategies.LDStrategy;
......@@ -332,6 +333,54 @@ public interface StationDefinition {
*/
public void setDropRule(Object stationKey, Object classKey, String dropRule);
/**
* Sets the retrial rate with given station queue section if capacity is finite.
* @param stationKey: search key for station.
* @param classKey: search key for class.
* @param retrialRate: a double that dictates the time distribution of each retrial job
*/
public void setRetrialRate(Object stationKey, Object classKey, Double retrialRate);
/**
* Returns the retrial rate with given station queue section if capacity is finite.
* @param stationKey: search key for station.
* @param classKey: search key for class.
*/
public Double getRetrialRate(Object stationKey, Object classKey);
public void setRetrialDistribution(Object stationKey, Object classKey, Object distribution);
public Object getRetrialDistribution(Object stationKey, Object classKey);
/**
* Returns service time distribution for class and station, given their search keys.
* If specified station cannot accept this kind of parameter, null value is
* returned.
* @param stationKey: search key for station.
* @param classKey: search key for class.
* @return distribution for specified class and station.
*/
// public Object getRetrialRateDistribution(Object stationKey, Object classKey);
/**
* Sets service time distribution for class and station, given their search keys.
* If specified station cannot accept this kind of parameter, no value will
* be set.
* @param stationKey: search key for station.
* @param classKey: search key for class.
* @param distribution: distribution to be set for specified class and station.
*/
// public void setRetrialRateDistribution(Object stationKey, Object classKey, Object distribution);
/**
* Returns routing strategy for class and station, given their search keys.
* If specified station cannot accept this kind of parameter, null value is
* returned.
* @param stationKey: search key for station.
* @param classKey: search key for class.
* @return routing strategy for specified class and station.
*/
/**
* Returns impatience strategy associated with given station queue section.
* @param stationKey: search key for station.
......
///**
// * Copyright (C) 2016, 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
// */
//
//package jmt.gui.common.editors;
//
//import java.awt.BorderLayout;
//import java.awt.Color;
//import java.awt.Dimension;
//import java.awt.GridLayout;
//import java.awt.event.ItemEvent;
//import java.awt.event.ItemListener;
//import java.util.Vector;
//
//import javax.swing.ButtonGroup;
//import javax.swing.JComboBox;
//import javax.swing.JLabel;
//import javax.swing.JPanel;
//import javax.swing.JRadioButton;
//import javax.swing.JScrollPane;
//import javax.swing.JSpinner;
//import javax.swing.JSplitPane;
//import javax.swing.JTextArea;
//import javax.swing.JTextField;
//import javax.swing.ScrollPaneConstants;
//import javax.swing.SpinnerNumberModel;
//import javax.swing.border.EmptyBorder;
//import javax.swing.border.EtchedBorder;
//import javax.swing.border.TitledBorder;
//import javax.swing.event.ChangeEvent;
//import javax.swing.event.ChangeListener;
//
//import jmt.framework.gui.components.JMTDialog;
//import jmt.gui.common.definitions.ClassDefinition;
//import jmt.gui.common.definitions.SimulationDefinition;
//import jmt.gui.common.definitions.StationDefinition;
//import jmt.gui.common.definitions.parametric.ArrivalRateParametricAnalysis;
//import jmt.gui.common.definitions.parametric.ParametricAnalysis;
//import jmt.gui.common.definitions.parametric.ParametricAnalysisChecker;
//import jmt.gui.common.panels.parametric.ParameterOptionPanel;
//
///**
// * <p>
// * Title: Distributions' Editor
// * </p>
// * <p>
// * Description: A modal dialog used to choose a specific distribution for a
// * class or station service and to enter its parameters. Users will enter owner
// * Frame or Dialog and initial Distribution (can be null) and will collect
// * chosen distribution with <code>getResult()</code> method.
// * </p>
// *
// * @author Bertoli Marco Date: 29-giu-2005 Time: 11.31.07
// */
//public class DistributionEditor extends ParameterOptionPanel {
//
// private static final long serialVersionUID = 1L;
// private JRadioButton allClass;
// private JRadioButton singleClass;
// private JLabel fromLabel;
// private JTextField from;
// private JLabel toLabel;
// private JSpinner to;
// private JLabel stepsLabel;
// private JSpinner steps;
// private JLabel classChooserLabel;
// private JComboBox classChooser;
// private JScrollPane scroll;
// private JTextArea description;
// private JScrollPane descrPane;
// private TitledBorder descriptionTitle;
// private ParametricAnalysisChecker checker;
// private String DESCRIPTION_SINGLE;
// private Double lambda;
// private ArrivalRateParametricAnalysis ARPA;
//
// public DistributionEditor(ClassDefinition classDef, StationDefinition stationDef, SimulationDefinition simDef) {
// super();
// super.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
// super.setDividerSize(3);
//
// DESCRIPTION = "Repeat the simulation with different arrival rate for all open " + "classes.\n\n"
// + "The 'To' value represents the percentage of the final arrival rate with" + " respect to the initial value.\n\n"
// + "This option will not be available if there is at least one"
// + " open class with an interarrival time distribution with infinite or null mean value.\n\n";
//
// DESCRIPTION_SINGLE = "Repeat the simulation with different arrival rates for an open "
// + "classes, provided that the interarrival time distribution has a finite, positive, mean value. "
// + "The 'To' value is the final arrival rate.\n\n ";
//
// cd = classDef;
// sd = stationDef;
// simd = simDef;
// checker = new ParametricAnalysisChecker(cd, sd, simd);
// initialize();
// }
//
// public void initialize() {
// JPanel radioButtonsPanel = new JPanel(new GridLayout(2, 1));
// allClass = new JRadioButton("Change arrival rates of all open classes");
// allClass.setToolTipText("Change arrival rates of all open classes");
// singleClass = new JRadioButton("Change the arrival rate of one open class");
// singleClass.setToolTipText("Change only the arrival rate of one open class");
// ButtonGroup group = new ButtonGroup();
// group.add(allClass);
// group.add(singleClass);
// radioButtonsPanel.add(allClass);
// radioButtonsPanel.add(singleClass);
// radioButtonsPanel.setBorder(new EmptyBorder(5, 20, 0, 20));
// JPanel edit = new JPanel(new GridLayout(4, 1, 0, 5));
// classChooserLabel = new JLabel("Class: ");
// classChooser = new JComboBox();
// classChooser.setToolTipText("Choose the class whose arrival rate will change");
// if (ARPA.isSingleClass()) {
// fromLabel = new JLabel("From:");
// from = new JTextField();
// from.setEnabled(false);
// from.setText(Double.toString(ARPA.getInitialValue()));
// toLabel = new JLabel("To: ");
// to = new JSpinner(new SpinnerNumberModel(ARPA.getFinalValue(), 0.001, Double.MAX_VALUE, 0.001));
// to.setToolTipText("Sets the final arrival rate in job/sec");
// stepsLabel = new JLabel("Steps: ");
// steps = new JSpinner(new SpinnerNumberModel(ARPA.getNumberOfSteps(), 2, ParametricAnalysis.MAX_STEP_NUMBER, 1));
// steps.setToolTipText("Sets the number of steps to be performed");
// //get the vector containing the keys of the class that can be used to do this type of parametric analysis
// Vector<Object> validC = checker.checkForArrivalRatesParametricSimulationAvailableClasses();
// String[] classNames = new String[validC.size()];
// for (int i = 0; i < validC.size(); i++) {
// classNames[i] = cd.getClassName(validC.get(i));
// }
// //if there is only one class available or if the "all class" simulation is not available
// //disable the allClass radio button
// if (cd.getOpenClassKeys().size() == 1 || validC.size() < cd.getOpenClassKeys().size()) {
// allClass.setEnabled(false);
// }
// classChooser.removeAllItems();
// for (String className : classNames) {
// classChooser.addItem(className);
// }
// classChooser.setEnabled(true);
// classChooser.setSelectedItem(cd.getClassName(ARPA.getReferenceClass()));
// singleClass.setSelected(true);
// allClass.setSelected(false);
// } else {
// fromLabel = new JLabel("From (%):");
// from = new JTextField();
// from.setEnabled(false);
// from.setText(Double.toString(ARPA.getInitialValue()));
// toLabel = new JLabel("To (%): ");
// to = new JSpinner(new SpinnerNumberModel(ARPA.getFinalValue(), 0.1, Double.MAX_VALUE, 0.1));
// to.setToolTipText("Sets the final proportion of arrival rate with respect to the initial");
// stepsLabel = new JLabel("Steps: ");
// steps = new JSpinner(new SpinnerNumberModel(ARPA.getNumberOfSteps(), 2, ParametricAnalysis.MAX_STEP_NUMBER, 1));
// steps.setToolTipText("Sets the number of steps to be performed");
// classChooser.addItem("All open classes");
// classChooser.setEnabled(false);
// singleClass.setSelected(false);
// allClass.setSelected(true);
// }
// from.setBackground(Color.WHITE);
// edit.add(fromLabel);
// edit.add(from);
// edit.add(toLabel);
// edit.add(to);
// edit.add(stepsLabel);
// edit.add(steps);
// edit.add(classChooserLabel);
// edit.add(classChooser);
// edit.setPreferredSize(new Dimension(130, 100));
// JPanel editLables = new JPanel(new GridLayout(4, 1, 0, 5));
// editLables.add(fromLabel);
// editLables.add(toLabel);
// editLables.add(stepsLabel);
// editLables.add(classChooserLabel);
// editLables.setPreferredSize(new Dimension(100, 100));
// JPanel editPanel = new JPanel();
// editPanel.add(editLables);
// editPanel.add(edit);
// editPanel.setBorder(new EmptyBorder(10, 20, 0, 20));
// JPanel cont = new JPanel(new BorderLayout());
// title = new TitledBorder("Type of arrival rate growth");
// cont.add(radioButtonsPanel, BorderLayout.NORTH);
// cont.add(editPanel, BorderLayout.CENTER);
// scroll = new JScrollPane(cont);
// scroll.setBorder(title);
// description = new JTextArea();
// if (ARPA.isSingleClass()) {
// description.setText(DESCRIPTION_SINGLE);
// } else {
// description.setText(DESCRIPTION);
// }
// description.setOpaque(false);
// description.setEditable(false);
// description.setLineWrap(true);
// description.setWrapStyleWord(true);
// descrPane = new JScrollPane(description);
// descriptionTitle = new TitledBorder(new EtchedBorder(), "Description");
// descrPane.setBorder(descriptionTitle);
// descrPane.setMinimumSize(new Dimension(80, 0));
// scroll.setMinimumSize(new Dimension(360, 0));
// setLeftComponent(scroll);
// setRightComponent(descrPane);
// setListeners();
// this.setBorder(new EmptyBorder(5, 0, 5, 0));
// }
//
// @Override
// public void setEnabled(boolean enabled) {
// if (enabled) {
// //if the panel is enabled the allClass radioButton can be enabled only if all of the class have a service
// //time distribution with a mean value, in the reference station contained in STPA.
// Vector<Object> validC = checker.checkForArrivalRatesParametricSimulationAvailableClasses();
// if (cd.getOpenClassKeys().size() == 1 || validC.size() < cd.getOpenClassKeys().size()) {
// allClass.setEnabled(false);
// } else {
// allClass.setEnabled(true);