The Solution object is a property of the parent Model object and contains all the information stored about the solution for the model. The Solution object properties are only available after the model has been solved.
Returns the Constraints collection for the solution.
Returns the Variables collection for the solution.
The number of constraints in the solution. (Integer Property - Read Only)
How long time in seconds it took to import data for the model. (Double Property - Read Only)
How long time in seconds it took to export the solution. (Double Property - Read Only)
Specifies if the solution values are available for retrieval. (Boolean Property - Read/Write)
Specifies if the solution ranges are available for retrieval. (Boolean Property - Read/Write)
The iteration count of the solver run. (Integer Property - Read Only)
The best bound of the MIP objective value. (Double Property - Read Only)
The MIP improve node count of the solver run. (Integer Property - Read Only)
How long time in seconds it took to search for improved MIP solutions. (Double Property - Read Only)
The MIP node count of the solver run. (Integer Proprety - Read Only)
The value of the objective function for the solution. (Double Property - Read/Only)
How long time in seconds it took MPL to parse in the model. (Double Property - Read Only)
The native solver result code of the solver run. (Integer Property - Read Only)
The result of the solver run. (String Property - Read Only)
How long time in seconds it took to solve the model. (Double Property - Read Only)
How long total time in seconds it took to run the model. (Double Property - Read Only)
The number of variables in the solution. (Integer Property - Read Only)
Visual Basic Example:
Dim MPL As OptiMax Dim cpxSolver As Solver Dim planModel As Model Dim planSol As Solution Set MPL = New OptiMax Set planModel = MPL.Models.Add("Planning") Set planSol = planModel.Solution MPL.WorkingDirectory = "c:\mplwin4" MPL.Solvers.Add ("c:\mplwin4\CPLEX65.dll") Result = planModel.ReadModel("planModel.Name") Result = planModel.Solve Debug.Print "ResultString = " & planSol.ResultString Debug.Print "ObjectValue = " & planSol.ObjectValue Debug.Print "IsAvailable = " & CBool(planSol.IsAvailable) Debug.Print "IsRangesAvail = " & CBool(planSol.IsRangesAvailable) Debug.Print "Variable Count = " & planSol.VarCount Debug.Print "Constraint Count = " & planSol.ConCount Debug.Print "Iteration Count = " & planSol.IterationCount Debug.Print "Node Count = " & planSol.NodeCount Debug.Print "Solver Time = " & planSol.SolverTime