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
returns the resource transformer

// Public Instance Methods
public List updateSimulations(FWSimSimulation aSelectedSimulation, String
aProjectID, int aStartNumber, int 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 int getOrderNumber(); // From
net.simplace.simulation.util.FWSimFieldContainer


public FWSimVariable.CONTENT_TYPE getContentType();
// From net.simplace.simulation.util.FWSimFieldContainer


public void addVariable(FWSimVariable aVariable);
// From net.simplace.simulation.util.FWSimFieldContainer


Add Variable to the Filed map. This should be called in implementing classes within the method "createVariables".
public FWSimVariable getVariable(String aKey)
throws SimFieldMissingException; // From
net.simplace.simulation.util.FWSimFieldContainer



returns one SimVariable registered for given key
public void removeVariable(String aID); // From
net.simplace.simulation.util.FWSimFieldContainer


Remove variable from FieldMap - handle with care!
public String getName(); // From
net.simplace.simulation.util.FWSimFieldContainer


public ArrayList getInputVariables(); // From
net.simplace.simulation.util.FWSimFieldContainer


returns the input variables from FieldMap
public ArrayList getOutputVariables(); // From
net.simplace.simulation.util.FWSimFieldContainer



returns the OutputVariables from the FieldMap
public boolean canUpdate(String aProjectName);


returns the canUpdate
public HashMap getFieldMap(); // From
net.simplace.simulation.util.FWSimFieldContainer


public HashMap getInternalFieldMap();


returns the internalFieldMap
public Element toXML(); // From
net.simplace.simulation.util.FWSimFieldContainer


public Element getCreateFormXML(); // From
net.simplace.simulation.util.FWSimFieldContainer


public Element getEditFormXML(boolean aEnabled); // From
net.simplace.simulation.util.FWSimFieldContainer


public FWSimIOAdapter.FREQUENCE getFrequence(); // From
net.simplace.simulation.util.FWSimFieldContainer



// 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 abstract void generate(FWSimSimulation aSelectedSimulation);

abstract method generate that is called from outside when the user calls: net.simplace.simulation.control.FWSimulationGenerator
protected boolean evaluate(FWSimVarMap aVarMap, Boolean aDefault);

Evaluate whether aVarMap satisfies the given constraint
returns the boolean result of the evaluation
protected void setFinished();

protected void setInitial();



}



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()