Package net.simplace.sim.components
Class FWSimpleSimComponent
java.lang.Object
net.simplace.sim.model.FWSimComponent
net.simplace.sim.components.FWSimpleSimComponent
- All Implemented Interfaces:
IntegratableComponent,FWSimFieldContainer
- Author:
- Andreas Enders
-
Nested Class Summary
Nested classes/interfaces inherited from class net.simplace.sim.model.FWSimComponent
FWSimComponent.TEST_STATE -
Field Summary
Fields inherited from class net.simplace.sim.model.FWSimComponent
iFieldMap, iFrequence, iInputMap, iJexlRule, iMasterComponentGroup, iName, iOrderNumber, isComponentGroup, iSimComponentElement, iSimModel, iVarMap -
Constructor Summary
ConstructorsConstructorDescriptionFWSimpleSimComponent(String aName, HashMap<String, FWSimVariable<?>> aFieldMap, HashMap<String, String> aInputMap, org.jdom2.Element aSimComponentElement, FWSimVarMap aVarMap, int aOrderNumber) FWSimpleSimComponent(String aName, HashMap<String, FWSimVariable<?>> aFieldMap, LinkedList<FWSimVariable<?>> aProcessAlgorithmsMap, LinkedList<FWSimVariable<?>> aIntegrateAlgorithmsMap, HashMap<String, String> aInputMap, org.jdom2.Element aSimComponentElement, FWSimVarMap aVarMap, int aOrderNumber) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbind()The model initialization function.protected FWSimComponentclone(FWSimVarMap aVarMap) called only once when the SimComponent is created.fillTestVariables(int aParamIndex, FWSimComponent.TEST_STATE aDefineOrCheck) called for single component test to check the components algorithm.final org.jdom2.ElementgetEditFormXML(boolean aEnabled) protected voidinit()The model initialization function.voidThe model integration function.protected voidprocess()The main model calculation function.voidorg.jdom2.ElementtoXML()Methods inherited from class net.simplace.sim.model.FWSimComponent
addVariable, checkCondition, createSimComponent, createSimComponent, createSimComponent, createSimComponent, doProcess, getConstantVariables, getContentType, getCreateFormXML, getDescription, getFieldMap, getFrequence, getFrequenceRuleScript, getInputs, getInputVariables, getMasterComponentGroup, getName, getOrderNumber, getOutputVariables, getVariable, getVariableField, getVarMap, initialize, isConditionCheck, isVariableAvailable, performLinks, performLinks, readInputs, removeVariable, reset, runComponentTest, setVariablesDefault, toComponentLinkingXML, toDocXML, toGroupXML, toOutputDefinitionXML, toResourcesDataXML, toResourcesDefinitionXML, toString, writeVarInfos
-
Constructor Details
-
FWSimpleSimComponent
public FWSimpleSimComponent(String aName, HashMap<String, FWSimVariable<?>> aFieldMap, HashMap<String, String> aInputMap, org.jdom2.Element aSimComponentElement, FWSimVarMap aVarMap, int aOrderNumber) - Parameters:
aName-aFieldMap-aInputMap-aSimComponentElement-aVarMap-aOrderNumber-
-
FWSimpleSimComponent
public FWSimpleSimComponent() -
FWSimpleSimComponent
public FWSimpleSimComponent(String aName, HashMap<String, FWSimVariable<?>> aFieldMap, LinkedList<FWSimVariable<?>> aProcessAlgorithmsMap, LinkedList<FWSimVariable<?>> aIntegrateAlgorithmsMap, HashMap<String, String> aInputMap, org.jdom2.Element aSimComponentElement, FWSimVarMap aVarMap, int aOrderNumber) - Parameters:
aName-aFieldMap-aProcessAlgorithmsMap-aIntegrateAlgorithmsMap-aInputMap-aSimComponentElement-aVarMap-aOrderNumber-
-
-
Method Details
-
createVariables
Description copied from class:FWSimComponentcalled only once when the SimComponent is created. Hereby the FieldMap is filled with the interfacing fields.- Specified by:
createVariablesin interfaceFWSimFieldContainer- Specified by:
createVariablesin classFWSimComponent- Returns:
- variables from the field map
- See Also:
-
bind
protected void bind()The model initialization function. Will be called only once, before running the model using process().- Overrides:
bindin classFWSimComponent
-
init
protected void init()Description copied from class:FWSimComponentThe model initialization function. Will be called only once, before running the model using process().- Specified by:
initin classFWSimComponent
-
process
protected void process()Description copied from class:FWSimComponentThe main model calculation function. Is guaranteed to be called once per module-specific time step.- Specified by:
processin classFWSimComponent
-
postIntegrate
public void postIntegrate()Description copied from interface:IntegratableComponentThe model integration function. Is guaranteed to be called once per module-specific time step.- Specified by:
postIntegratein interfaceIntegratableComponent
-
getLinkedVariableNames
- Returns:
- the linkedVariableNames
-
getProcessAlgorithms
- Returns:
- the processAlgorithms
-
getIntegrateAlgorithms
- Returns:
- the integrateAlgorithms
-
showFields
public void showFields() -
getEditFormXML
public final org.jdom2.Element getEditFormXML(boolean aEnabled) - Specified by:
getEditFormXMLin interfaceFWSimFieldContainer- Overrides:
getEditFormXMLin classFWSimComponent- Parameters:
aEnabled-- Returns:
- a xml element with all the settings of this component()
- See Also:
-
toXML
public org.jdom2.Element toXML()- Specified by:
toXMLin interfaceFWSimFieldContainer- Overrides:
toXMLin classFWSimComponent- Returns:
- a xml element with all the settings of this component()
- See Also:
-
fillTestVariables
public HashMap<String,FWSimVariable<?>> fillTestVariables(int aParamIndex, FWSimComponent.TEST_STATE aDefineOrCheck) called for single component test to check the components algorithm. aParamIndex: Used to set up different test cases. Start with 0 - result check with 1 aso- Specified by:
fillTestVariablesin classFWSimComponentaDefineOrCheck- : Use TEST_STATE.DEFINE for defining the test default values and TEST_STATE.CHECK for the accepted results- See Also:
-
net.simplace.sim.util.FWSimFieldContainer#fillTestVariables(int aParamIndex, TEST_STATE aDefineOrCheck)
-
clone
- Specified by:
clonein classFWSimComponent- Returns:
- the deep clone of the SimComponent
-