net.simplace.client.simulation.lap.experimental.util.ValueToTableConverter

Creates an table from two scalar values.

Motivation

Some FST-based modules like Lintul5 need irrigation and fertilizer as interpolation tables, where x-values hold the DOY and y-values hold the amount.

When the DOY is not known beforehand, the interpolation table has to be created at simulation runtime.

Configuration, inputs

The sim component takes daily inputs iXValue and iYValue and outputs both as a DOUBLEARRAY ValueTable , first array element holding iXValue, second holding yValue.

iXValue iYValue

If cInterpolationType is set to true, then the output ValueTable has six elements:

iXValue - cDeltaX 0 iXValue iYValue iXValue + cDeltaX 0

If cOnlyY is set to true, then the output ValueTable has only one element

iYValue

In this case, you can use the module to pass DOUBLE values from one component / resource to a component that expects an DOUBLEARRAY. For each of such a conversion, you need an instance of this sim component in your solution.

Component Variables

Content TypeNameDescriptionData TypeUnitMin ValueMax ValueDefault Value
constantcDeltaXdistance of 0-valued points to xDOUBLE1--1.0
constantcInterpolationTypeif y-values at x-cDeltaX and x+cDeltaY should be set to 0. BOOLEAN1--false
constantcOnlyYOutput y-value only as an array with one elementBOOLEAN1--false
inputiXValuex value, not required, if cOnlyY is set to trueDOUBLE1--0.0
inputiYValuey value, is always requiredDOUBLE1--0.0
outValueTableArray with x and y values, possibly with 0 before and after xDOUBLEARRAY1-- 0.0 0.0


See also: net.simplace.client.simulation.lap.util.FSTFunctions




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


// 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) - ValueToTableConverter