net.simplace.sim.model.FWSimComponent
public abstract class FWSimComponent implements
net.simplace.sim.util.FWSimFieldContainer {
// Protected Constructors
protected FWSimComponent();
protected FWSimComponent(String aName, HashMap aFieldMap, HashMap aInputMap,
Element aSimComponentElement, FWSimVarMap aVarMap, int aOrderNumber);
// Constants
protected final boolean isComponentGroup;
// Protected Instance Variables
protected String iName;
protected FWSimVarMap iVarMap;
protected HashMap iFieldMap;
protected HashMap iInputMap;
protected FWSimModel iSimModel;
protected Element iSimComponentElement;
protected int iOrderNumber;
protected FWSimIOAdapter.FREQUENCE iFrequence;
protected JexlRuleScript iJexlRule;
protected FWSimComponentGroup iMasterComponentGroup;
// Class Methods public static
FWSimComponent createSimComponent(Element aSimComponentElement,
FWSimVarMap aVarMap,
FWSimModel aSimModel, int aOrderNumber)
throws
SimLinkInvalidException;
factory method creating a SimComponent
- aSimComponentElement
- aVarMap
- aSimModel
- aOrderNumber
returns newly created FWSimComponent
public static
FWSimComponent createSimComponent(String aClassname);
returns the newly created sim component
// Public Instance Methods public String
writeVarInfos(String aFilePath);
Writes the varInfos to a given FilePath.
returns the string result
public void initialize();
The model initialization function. Will be called only once, before running
the model using process().
public void
performLinks() throws
SimLinkInvalidException;
links like given in the input part of the SimComponent configuration are performed.
This is done only while model creation.
public Map getInputs();
returns the map of the input relations. key is given without the name of the component.
public ArrayList getConstantVariables();
returns constant variables from the FieldMAp
public String toString(); // Overrides java.lang.Object
Name of the Component
public Element toDocXML();
returns Element of this document
public Element
toGroupXML(HashSet aComponentsInGroup, String aGroupName);
- aComponentsInGroup
- aGroupName
returns xml element which contains group of SimComponents
public Element toResourcesDataXML();
returns xml element with all the info about constants of this component
public Element toResourcesDefinitionXML();
returns xml element which contains section for this component for inclusion into solutions
public Element toOutputDefinitionXML();
returns xml element which contains
public Element toComponentLinkingXML();
returns xml element which contains section for this component for inclusion into solutions
public
FWSimComponentGroup getMasterComponentGroup();
returns the master component if this is part of {@link FWSimComponentGroup}
public String getDescription();
returns the description including title
// Protected Instance Methods protected
FWSimVariable getVariableField(String aKey);
returns the FWSimVariable from FieldMap (not from the VarMap!)
protected boolean
isVariableAvailable(String aString);
returns if Variable is available in VarMap
protected HashMap
readInputs(Element aSimComponentElement);
returns HashMap of inputs
protected void bind();
The model initialization function. Will be called only once, before running
the model using process().
protected abstract void init();
The model initialization function. Will be called only once, before running
the model using process().
protected void setVariablesDefault();
The models writable variables like outputs, states and rates are set to default
.
protected void
performLinks(HashMap aLinkMap) throws
SimLinkInvalidException;
- aLinkMap with key = destination and value = source!
protected void doProcess();
The main model calculation function. Is guaranteed to be called once per module-specific time step.
protected abstract void process();
The main model calculation function. Is guaranteed to be called once per module-specific time step.
}
Extended by: net.simplace.sim.components.DefaultManagement, net.simplace.sim.components.FWAnalyticsSimComponent, FWSimComponentGroup, net.simplace.sim.components.FWSimpleSimComponent
Passed to: FWSimValueObject.createVariables()
Returned by: net.simplace.sim.components.FWSimpleSimComponent.clone(), net.simplace.sim.components.FWAnalyticsSimComponent.clone(), net.simplace.sim.components.DefaultManagement.clone(), clone(), createSimComponent(), createSimComponent(), createSimComponent(), FWSimModel.getSimComponent()