Class DispatcherJMVAschema
java.lang.Object
jmva.engine.DispatcherJMVAschema
Name: DispatcherJMVAschema
Description: Receives the absolute path of a xml file which describes the model using the JMTmodel.xsd schema. This file is converted into another xml file in order to be passed to the simulator. The simulation results, at the end, are converted and are inserted in the original file.
Date: 13-lug-2006 Time: 11.15.47
- Version:
- 2.0
- Author:
- Stefano Omini, Bertoli Marco
-
Constructor Summary
ConstructorsConstructorDescriptionDispatcherJMVAschema(File model) This constructor receives the absolute path of the xml file containing the model to be solved.DispatcherJMVAschema(String absolutePath) This constructor receives the absolute path of the xml file containing the model to be solved. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanabortMeasure(int index) protected voidaddNullMeasuresCorrectThroughputs(ExactModel input, Document output) Adds all removed null measures to output documentvoidBy invoking this method, simulation will generate a random simulation seedbooleanA system is said to have sufficient capacity to process a given loadlambdaif no service center is saturated as a result of the combined loads of all the open classes.doubleallows to know the state of simulationgets the temp measuresgetTransformedModel(String inputModel, String outputModel) Transforms model using new Java class to perform transformation instead of old bugged XSLT transformer.voidPrints on System.out the temp values of measures that have not finished yetvoidPauses the simulation, refreshes temp measures and then restarts simulationprotected voidremoveNullMeasures(ExactModel input, CommonModel output) Removes all null measures from output model.voidsetDeleteIntermediateFiles(boolean deleteIntermediateFiles) Determine whether the intermediate files must be deleted or not.voidsetSimulationSeed(long seed) Specifies the seed to be used in the simulation.voidsetValidate(boolean validate) Sets if parser must validatebooleanbooleanSolves model using new Java class to perform transformation instead of old bugged XSLT transformer.
-
Constructor Details
-
DispatcherJMVAschema
This constructor receives the absolute path of the xml file containing the model to be solved. The model must be described using the JMTmodel.xsd schema- Parameters:
absolutePath- absolute path of the xml file containing the model to be solved
-
DispatcherJMVAschema
This constructor receives the absolute path of the xml file containing the model to be solved. The model must be described using the JMTmodel.xsd schema- Parameters:
model- the xml file containing the model to be solved
-
-
Method Details
-
automaticSimulationSeed
public void automaticSimulationSeed()By invoking this method, simulation will generate a random simulation seed -
setSimulationSeed
public void setSimulationSeed(long seed) Specifies the seed to be used in the simulation.- Parameters:
seed- the simulation seed
-
setDeleteIntermediateFiles
public void setDeleteIntermediateFiles(boolean deleteIntermediateFiles) Determine whether the intermediate files must be deleted or not.- Parameters:
deleteIntermediateFiles- if true, intermediate files will be deleted
-
solveModel
public boolean solveModel() -
getTransformedModel
Transforms model using new Java class to perform transformation instead of old bugged XSLT transformer. Avoid to measure elements with null service demand.- Parameters:
inputModel- input model in exact solver formatoutputModel- output model in simulator format- Returns:
- open analytical.ExactModel or null if an error occurred
-
solveModelNewTransform
public boolean solveModelNewTransform()Solves model using new Java class to perform transformation instead of old bugged XSLT transformer. Avoid to measure elements with null service demand.- Returns:
- true if model was solved correctly, false otherwise.
-
checkSimProgress
public double checkSimProgress()allows to know the state of simulation- Returns:
- the percentage of progress (= number of computed confidence intervals / total number of required confidence intervals)
-
refreshTempMeasures
public void refreshTempMeasures()Pauses the simulation, refreshes temp measures and then restarts simulation -
getTempMeasures
-
abortAllMeasures
public boolean abortAllMeasures() -
abortMeasure
public boolean abortMeasure(int index) -
printTempMeasures
public void printTempMeasures()Prints on System.out the temp values of measures that have not finished yet -
checkProcessingCapacity
public boolean checkProcessingCapacity()A system is said to have sufficient capacity to process a given loadlambdaif no service center is saturated as a result of the combined loads of all the open classes.
WARNING: This method should be called before solving the system.- Returns:
- true if sufficient capacity exists for the given workload, false otherwise
-
setValidate
public void setValidate(boolean validate) Sets if parser must validate- Parameters:
validate- true if parser must validate, false otherwise
-
removeNullMeasures
Removes all null measures from output model. A null measure is a measure from a class with 0 service demand at a station. Removed measures are stored to be later restored.- Parameters:
input- input JMVA modeloutput- output JSIM model
-
addNullMeasuresCorrectThroughputs
Adds all removed null measures to output document- Parameters:
input- input exactmodeloutput- output document
-