net.simplace.client.simulation.lap.util.SimpleCounter

Provides a resettable counter of simulation days.

Counting

Counter is incremented, if the input variable iDoCount is true.

Resetting the counter

If iReset is true, the counter is reset before an potential increment.

Customization

Increment and start value are customizable. Default increment is 1, start value is 0.

Component Variables

Content TypeNameDescriptionData TypeUnitMin ValueMax ValueDefault Value
constantcIncrementincrement of counterINT1--1
constantcStartValuestart value of counterINT1--0
inputiDoCountcounter is incremented if trueBOOLEAN1--false
inputiResetresets the counter to its start value if trueBOOLEAN1--false
outCounteractual value of the counterINT1--0
outNumberOfResetsnumber of resetsINT1--0
outTotalCounttotal count starting from 0 and incremented by 1INT1--0



public class SimpleCounter extends net.simplace.simulation.model.FWSimComponent {
// Public Constructors
public SimpleCounter();


// Public Instance Methods
public HashMap createVariables(); // Defines
net.simplace.simulation.model.FWSimComponent


Create the FWSimVariables as interface for this SimComponent

// Protected Instance Methods
protected void init(); // Defines
net.simplace.simulation.model.FWSimComponent


Initializes the fields by getting input and output FWSimVariables from VarMap
protected void process(); // Defines
net.simplace.simulation.model.FWSimComponent


Process the algorithm and write the results back to VarMap
protected FWSimComponent clone(FWSimVarMap aVarMap);
// Defines net.simplace.simulation.model.FWSimComponent


creates a clone from this SimComponent for use in other threads


}



Hierarchy: java.lang.Object - net.simplace.simulation.model.FWSimComponent (net.simplace.simulation.util.FWSimFieldContainer) - SimpleCounter