Package net.simplace.sim.components.util
Klasse FSTFunctions
java.lang.Object
net.simplace.sim.components.util.FSTFunctions
Defines some helper functions similar to some FST functions (FortranSimulationTranslator)
WIKI_START
Defines some of the FST-Functions (sometimes with different signatures than the original
FST ones).
== References: ==
(FST) [https://www.wageningenur.nl/en/Publication-details.htm?publicationId=publication-way-333137323735 The Fortran simulation translator], Kraalingen, D.W.G. van; Rappoldt, C.; Laar, H.H. van, European Journal of Agronomy 18 (2003)
WIKI_END
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic doubleComputes a linear interpolation for t from a table.static doubleComputes a linear interpolation for t from a table.static doubleComputes a linear interpolation for t from a table.static doubleAFGEN(InterpolationTable xy, double t) Computes a linear interpolation for t from a table.static doubleComputes a linear interpolation for t from a table.static doubleAFGEN(net.simplace.sim.util.FWSimVariable<Double[]> x, net.simplace.sim.util.FWSimVariable<Double[]> y, double t) Computes a linear interpolation for t from a table.static doubleINSW(boolean testvalue, double X2, double X3) Returns one value, if the test value is false and another value, if the test value ist nonnegativestatic doubleINSW(double testvalue, double X2, double X3) Returns one value, if the test value is negative and another value, if the test value ist nonnegativestatic voidIntegrates a state by adding a ratestatic voidIntegrates a state by adding a ratestatic voidINTGRL(net.simplace.sim.util.FWSimVariable<Double> state, net.simplace.sim.util.FWSimVariable<Double> rate) Integrates a state by adding a ratestatic voidINTGRL(net.simplace.sim.util.FWSimVariable<Double> state, net.simplace.sim.util.FWSimVariable<Double> rate, double delta) Integrates a state by adding a ratestatic voidIntegrates a state array by adding a rate arraystatic voidIntegrates a state array by adding a rate arraystatic voidINTGRLA(net.simplace.sim.util.FWSimVariable<Double[]> state, net.simplace.sim.util.FWSimVariable<Double[]> rate) Integrates a state array by adding a rate arraystatic voidINTGRLA(net.simplace.sim.util.FWSimVariable<Double[]> state, net.simplace.sim.util.FWSimVariable<Double[]> rate, double delta) Integrates a state array by adding a rate arraystatic doubleLIMIT(double XL, double XH, double X) Limits a value to a lower and upper boundstatic doubleNOTNUL(double x) Returns 1 instead of 0 if the value is 0.static intREAAND(double x1, double x2) Tests whether two values are positivestatic doubleREANOR(double a, double b) Returns 1 if two values are both zero or negative, returns 0 otherwise
-
Konstruktordetails
-
FSTFunctions
public FSTFunctions()
-
-
Methodendetails
-
AFGEN
Computes a linear interpolation for t from a table. The method returns the leftmost or rightmost value if t is out of range. Takes the table as a double array with x-values in the even and y-values in the odd entries- Parameter:
xy- interpolation table as double array with x and y values interleavedt- point at which the value is computed- Gibt zurück:
- the interpolated value
-
AFGEN
Computes a linear interpolation for t from a table. The method returns the leftmost or rightmost value if t is out of range. Takes the table as two double array, first one with x-values, second one with y-values.- Parameter:
x- array with x values of the tabley- array with y values of the tablet- point at which the value is computed- Gibt zurück:
- the interpolated value
-
AFGEN
Computes a linear interpolation for t from a table. The method returns the leftmost or rightmost value if t is out of range. Takes the table as a SimVariable of type double array with x-values in the even and y-values in the odd entries and calls AFGEN for double array- Parameter:
xy- data sett- point at which the value is computed- Gibt zurück:
- the interpolated value
-
AFGEN
public static double AFGEN(net.simplace.sim.util.FWSimVariable<Double[]> x, net.simplace.sim.util.FWSimVariable<Double[]> y, double t) Computes a linear interpolation for t from a table. The method returns the leftmost or rightmost value if t is out of range. Takes the table as two SimVariable of type double array with x-values in the even and y-values in the odd entries and calls AFGEN for two double array- Parameter:
x-y- data sett- point at which the value is computed- Gibt zurück:
- the interpolated value
-
AFGEN
Computes a linear interpolation for t from a table. The method returns the leftmost or rightmost value if t is out of range. Takes the table as a TreeMap with x-values as keys and y-values as entries and calls AFGEN for two double arrays.- Parameter:
xy- data sett- point at which the value is computed- Gibt zurück:
- the interpolated value
-
AFGEN
Computes a linear interpolation for t from a table. The method returns the leftmost or rightmost value if t is out of range. Takes the table as a TreeMap with x-values as keys and y-values as entries and calls AFGEN for two double arrays.- Parameter:
xy- data sett- point at which the value is computed- Gibt zurück:
- the interpolated value
-
INSW
public static double INSW(double testvalue, double X2, double X3) Returns one value, if the test value is negative and another value, if the test value ist nonnegative- Parameter:
testvalue-X2- value returned if test value is negativeX3- value returned if test value is positive or zero- Gibt zurück:
- resulting value
-
INSW
public static double INSW(boolean testvalue, double X2, double X3) Returns one value, if the test value is false and another value, if the test value ist nonnegative- Parameter:
testvalue-X2- value returned if test value is negativeX3- value returned if test value is positive or zero- Gibt zurück:
- resulting value
-
REAAND
public static int REAAND(double x1, double x2) Tests whether two values are positive- Parameter:
x1- first valuex2- second value- Gibt zurück:
- 1 if both are positive, 0 otherwise
-
LIMIT
public static double LIMIT(double XL, double XH, double X) Limits a value to a lower and upper bound- Parameter:
XL- lower boundXH- upper boundX- value- Gibt zurück:
- the value or it's lower/upper bound if it exceeds the bounds
-
NOTNUL
public static double NOTNUL(double x) Returns 1 instead of 0 if the value is 0. Used to avoid division by 0- Parameter:
x- value- Gibt zurück:
- value or 1
-
REANOR
public static double REANOR(double a, double b) Returns 1 if two values are both zero or negative, returns 0 otherwise- Parameter:
a- first valueb- second value- Gibt zurück:
- 1 or 0
-
INTGRL
public static void INTGRL(net.simplace.sim.util.FWSimVariable<Double> state, net.simplace.sim.util.FWSimVariable<Double> rate) Integrates a state by adding a rate- Parameter:
state-rate-
-
INTGRL
public static void INTGRL(net.simplace.sim.util.FWSimVariable<Double> state, net.simplace.sim.util.FWSimVariable<Double> rate, double delta) Integrates a state by adding a rate- Parameter:
state-rate-delta-
-
INTGRL
Integrates a state by adding a rate- Parameter:
state-rate-
-
INTGRL
public static void INTGRL(net.simplace.sim.util.FWSimVariable<Double> state, double rate, double delta) Integrates a state by adding a rate- Parameter:
state-rate-delta-
-
INTGRLA
public static void INTGRLA(net.simplace.sim.util.FWSimVariable<Double[]> state, net.simplace.sim.util.FWSimVariable<Double[]> rate) Integrates a state array by adding a rate array- Parameter:
state-rate-
-
INTGRLA
public static void INTGRLA(net.simplace.sim.util.FWSimVariable<Double[]> state, net.simplace.sim.util.FWSimVariable<Double[]> rate, double delta) Integrates a state array by adding a rate array- Parameter:
state-rate-delta-
-
INTGRLA
Integrates a state array by adding a rate array- Parameter:
state-rate-
-
INTGRLA
public static void INTGRLA(net.simplace.sim.util.FWSimVariable<Double[]> state, double[] rate, double delta) Integrates a state array by adding a rate array- Parameter:
state-rate-delta-
-