Returns the Subscripts collection for the constraint vector. (Object Property)
Returns the Constraint object for the constraint specified by the Position property. (Object Property)
The number of elements in the constraint vector. (Integer Property - Read Only)
The declaration of the constraint vector. (String Property - Read Only)
The name of the constraint vector. (String Property - Read Only)
The current position within the vector. (Integer Property - Read/Write)
True if the current position is valid. (Boolean Property - Read only)
Moves the Position property to the first element of the constraint vector. (Method)
Moves the Position property to the next valid element of the constraint vector. (Method)
Moves the Position property to the vector element specified by the subscripts. (Method)
Visual Basic Example:
Dim MPL As OptiMax Dim planModel As Model Dim conVect As ConstraintVector Dim con As Constraint Dim result As Integer Set MPL = New OptiMax MPL.Solvers.Add "CPLEX" MPL.WorkingDirectory = "c:\mplwin4x" Set planModel = MPL.Models.Add("c:\mplwin4\planning") result = planModel.ReadModel("c:\mplwin4\planning.mpl") If (result > 0) Then MsgBox planModel.ErrorMessage End If planModel.Solve MsgBox planModel.ConstraintVectors.Count Set conVect = planModel.ConstraintVectors("InvtBal") Set con = conVect.MoveFirstPos Do While conVect.PosValid Debug.Print "InvtBal[" & conVect.Subscripts(1).IndexName & _ ", " & conVect.Subscripts(2).IndexName & "] " & _ " = " & conVect.Constraint.ShadowPrice conVect.MoveNextPos Loop