The activity for the variable from the solution. (Double Property - Read/Write)
The initial value for the variable. (Double Property - Read/Write)
Specifies if the variable is a binary variable. (Boolean Property - Read/Write)
Specifies if the variable is a free variable. (Boolean Property - Read/Write)
Specifies if the variable is an integer variable. (Boolean Property - Read/Write)
Specifies if the variable is used in a nonlinear term. (Boolean Property - Read/Write)
Specifies if the variable is a semi-continuous variable. (Boolean Property - Read/Write)
Specifies if the variable is a member of a SOS set. (Boolean Property - Read/Write)
Specifies if the variable is used in at least one of the constraints or the objective function. (Boolean Property - Read/Write)
The lower bound for the variable. (Double Property - Read/Write)
The name of the variable. (String Property - Read/Write)
The objective coefficient for the variable. (Double Property - Read/Write)
The lower range for the objective function coefficient in the solution. (Double Property - Read Only)
The upper range for the objective function coefficient in the solution. (Double Property - Read Only)
The priority value for the variable. (Integer Property - Read/Write)
The reduced cost for the variable from the solution. (Double Property - Read Only)
The column number for the variable in the solver solution. (Integer Property - Read Only)
The stochastic stage number for the variable. (Integer Property - Read only)
The variable type from the VariableType enumeration. (Enum Property - Read/Write) Possible values are: Binary Continuous Integer Free
The upper bound for the variable. (Double Property - Read/Write)
The variable number in the matrix for the variable. (Integer Property - Read/Write)
CSharp Example:
OptiMax MPL;
Solver cpxSolver;
Model planModel;
Variables planVars;
ResultType result;
MPL = new OptiMax();
cpxSolver = MPL.Solvers.Add("CPLEX");
planModel = MPL.Models.Add("Planning");
string WorkingDirectory = "c:\\mplwin4";
string modFilePath = WorkingDirectory + "\\" + "Planning.mpl";
result = planModel.ReadModel(modFilePath);
planVars = planModel.Matrix.Variables;
result = planModel.Solve();
foreach(Variable vars in planVars)
Console.WriteLine(vars.VarNr + ":" + vars.Name + ":" +
vars.Activity + ":" + vars.ReducedCost);