net.simplace.sim.components.util.InterpolatedValueFromTable

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
constantcXValuesX-Values of the interpolation tableDOUBLEARRAY---
constantcYValuesY-Values of the interpolation tableDOUBLEARRAY---
inputiXAt which point to interpolateDOUBLE--0.0
outYInterpolated value at iXDOUBLE--0.0


See also: FSTFunctions




public class InterpolatedValueFromTable extends
net.simplace.sim.model.FWSimComponent {
// Public Constructors
public InterpolatedValueFromTable();


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


Create the FWSimVariables as interface for this SimComponent

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

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

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


creates a clone from this SimComponent for use in other threads


}



Hierarchy: java.lang.Object - net.simplace.sim.model.FWSimComponent (net.simplace.sim.util.FWSimFieldContainer) - InterpolatedValueFromTable