ParD3Item Property
Returns the parameter's value at the (i,j,k)-th position.
Note that the indices can be any scalar (constant for the mathematical model) expression.
Consider for instance
double GetOrderAmount(int timePeriod, int origin, int destination) => ...;
Set t = ...; // time periods
Set o = ...; // origins
Set d = o.Alias("d"); // destinations
ParD3 order = Parameter("order").Represents("order from origin o to destination d at time period t")
.HasIndices(t, o, d).HasValues(new FunVec3<double>(GetOrderAmount));
Then:
- order[2, 0, 1] is the order amount from origin 0 to destination 1 at time period 2,
- order[t, o, d] is the order amount from origin o to destination d at time period t,
- order[t - 1, 0, d] is the order amount from origin 0 to destination d at time period t - 1.
Namespace: Orx.MathProgAssembly: Orx.MathProg (in Orx.MathProg.dll) Version: 1.0.0
public Sca this[
Sca i,
Sca j,
Sca k
] { get; }
- i Sca
- First index of the parameter.
- j Sca
- Second index of the parameter.
- k Sca
- Third index of the parameter.
Sca