net.simplace.simulation.control.FWSimulationGenerator
The simulation generator creates for existing project ( net.simplace.simulation.FWSimProject )
a range of simulations ( net.simplace.simulation.FWSimSimulation ). This abstract class has 2
implementations:
net.simplace.simulation.control.generators.SimpleSimulationGenerator: Final class used for net.simplace.simulation.FWSimProject.PROJECT_MODE.SIMULATION and
net.simplace.simulation.util.FWSimVariable.CONTENT_TYPE.sim. It just delivers the (few) simulations in
the selected project.
net.simplace.simulation.control.generators.DefaultSimulationGenerator: Class used for all net.simplace.simulation.FWSimProject.PROJECT_MODEs but
net.simplace.simulation.util.FWSimVariable.CONTENT_TYPE.res. Use this class to override and create own
SimGenerator plug-ins.
Method generate(FWSimSimulation) has to be implemented in extending classes.
public abstract class FWSimulationGenerator implements
net.simplace.simulation.util.FWSimFieldContainer {
// Public Constructors
public FWSimulationGenerator();
// Protected Constructors
protected FWSimulationGenerator(Element aProjectsElement, FWSimSolution
aSolution, HashMap aFieldMap, FWSimVariable.CONTENT_TYPE aContentType);
// Constants
protected final FWSimulationGenerator.Constraint iConstraint;
protected final FWSimSolution iSolution;
// Protected Instance Variables
protected String iName;
protected FWSimVarMap iVarMap;
protected HashMap iSimulationsMap;
protected HashMap iFieldMap;
protected HashMap iInternalFieldMap;
protected List iFilterListHeader;
protected FWSimVariable.CONTENT_TYPE iContentType;
protected HashMap iInputMap;
protected Element iSimulationCreatorElement;
protected Element iProjectElement;
protected HashMap iInputs;
protected HashMap iCals;
protected HashMap iParams;
// Class Methods public static
FWSimulationGenerator createSimulationGenerator(Element
aProjectsElement,
FWSimSolution aSolution, HashMap aFieldMap,
FWSimVariable.CONTENT_TYPE aContentType);
factory method for Creation of the resource transformer
- aProjectsElement
- aSolution
- aFieldMap
- aContentType
returns the resource transformer
// Public Instance Methods public List
updateSimulations(
FWSimSimulation aSelectedSimulation, String
aProjectID, int aStartNumber, int aMaxEndNumber);
- aSelectedSimulation
- aProjectID
- aStartNumber
- aMaxEndNumber
returns the created Simulations
public abstract void init();
The model initialization function. Will be called only once, before running
the model using process().
public boolean
canUpdate(String aProjectName);
returns the canUpdate
public HashMap getInternalFieldMap();
returns the internalFieldMap
// Protected Instance Methods protected void clearSimulations();
Clear the iSimulationsList
protected int getSimulationsListSize();
Get the size of iSimulationsList
returns the count of simulations
protected
FWSimSimulation getSimulation(int index);
Get simulation by index
returns the simulation with the index. if not available null
protected boolean
addSimulation(
FWSimSimulation aSimulation);
Add simulation to iSimulationsList
returns if the adding was successful
protected boolean
evaluate(
FWSimVarMap aVarMap, Boolean aDefault);
Evaluate whether aVarMap satisfies the given constraint
returns the boolean result of the evaluation
protected void
setFinished();
- sets SessionUpdate to false
protected void
setInitial();
- sets SessionUpdate to true
}
Extended by: net.simplace.simulation.control.generators.DefaultSimulationGenerator, net.simplace.simulation.control.generators.SimpleSimulationGenerator
Passed to: net.simplace.simulation.FWSimProject(), net.simplace.simulation.FWSimProject()
Returned by: createSimulationGenerator()