net.simplace.sim.components.util.InterpolatedValueFromTable
Interpolates values from a table of x and y values.
Motivation
Sometimes functions y=f(x) are given as interpolation tables
with x and y values.
The sim component takes the tables cXValues and cYValues (DOUBLEARRAY)
as well as the value iX. It outputs Y, the interpolated value at iX from
the interpolation table defined by cXValues and cYValues.
If the input iValueToScale is given, then the output ScaledValue holds
the value Y * iValueToScale.
Component Variables
Content Type | Name | Description | Data Type | Unit | Min Value | Max Value | Default Value |
constant | cXValues | X-Values of the interpolation table | DOUBLEARRAY | | - | - | - |
constant | cYValues | Y-Values of the interpolation table | DOUBLEARRAY | | - | - | - |
input | iValueToScale | A value that will be multiplied by the interpolation value | DOUBLE | | - | - | 0.0 |
input | iX | At which point to interpolate | DOUBLE | | - | - | 0.0 |
out | ScaledValue | Returns input iValueToScale multiplied with the interpolated value Y | DOUBLE | | - | - | 0.0 |
out | Y | Interpolated value at iX | DOUBLE | | - | - | 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