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 FWSimComponentGroup iMasterComponentGroup;

// Class Methods
public static FWSimComponent createSimComponent(Element aSimComponentElement,
FWSimVarMap aVarMap, FWSimModel aSimModel, int aOrderNumber)
throws SimLinkInvalidException;

factory method creating a SimComponent
returns newly created FWSimComponent
public static FWSimComponent createSimComponent(String tName, FWSimVarMap
aVarMap, FWSimModel aSimModel, int aOrderNumber)
throws SimLinkInvalidException;


returns the created FWSimComponent
public static FWSimComponent createSimComponent(String aClassname);


returns the newly created sim component

// Public Instance Methods
public void addVariable(FWSimVariable aVariable);
// From net.simplace.sim.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.sim.util.FWSimFieldContainer



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


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


returns the name
public HashMap getFieldMap(); // From
net.simplace.sim.util.FWSimFieldContainer



returns the name
public FWSimVarMap getVarMap(); // From
net.simplace.sim.util.FWSimFieldContainer


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 abstract HashMap createVariables(); // From
net.simplace.sim.util.FWSimFieldContainer


called only once when the SimComponent is created. Hereby the FieldMap is filled with the interfacing fields.
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 getInputVariables(); // From
net.simplace.sim.util.FWSimFieldContainer


returns the input variables from FieldMap
public ArrayList getConstantVariables();


returns constant variables from the FieldMAp
public ArrayList getOutputVariables(); // From
net.simplace.sim.util.FWSimFieldContainer



returns the OutputVariables from the FieldMap
public String toString(); // Overrides java.lang.Object

Name of the Component
public Element toDocXML();


returns Element of this document
public Element toXML(); // From net.simplace.sim.util.FWSimFieldContainer

public Element toGroupXML(HashSet aComponentsInGroup, String 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 section for this component for inclusion into solutions
public Element toComponentLinkingXML();


returns xml element which contains section for this component for inclusion into solutions
public final Element getCreateFormXML(); // From
net.simplace.sim.util.FWSimFieldContainer


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


public void showFields();

public int getOrderNumber(); // From
net.simplace.sim.util.FWSimFieldContainer


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


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


public FWSimComponentGroup getMasterComponentGroup();


returns the master component if this is part of {@link FWSimComponentGroup}
public String getDescription();


returns the description including title
public void checkCondition(Boolean aCheckResult, String aMessage);
// From net.simplace.sim.util.FWSimFieldContainer


public boolean isConditionCheck(); // From
net.simplace.sim.util.FWSimFieldContainer



// 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 performLinks(HashMap aLinkMap) throws SimLinkInvalidException;

protected void reset(FWSimVarMap aVarMap);

protected abstract void process();

The main model calculation function. Is guaranteed to be called once per module-specific time step.
protected abstract FWSimComponent clone(FWSimVarMap aVarMap);


returns the deep clone of the SimComponent


}



Extended by: net.simplace.sim.components.DefaultManagement, FWSimComponentGroup, net.simplace.sim.components.FWSimpleSimComponent



Passed to: FWSimValueObject.createVariables()



Returned by: net.simplace.sim.components.FWSimpleSimComponent.clone(), net.simplace.sim.components.DefaultManagement.clone(), clone(), createSimComponent(), createSimComponent(), createSimComponent(), FWSimModel.getSimComponent()