The Solver Option Object

The SolverOption object is an element of the SolverOptions collection and contains all the information stored about each solver option for the solver.

Properties for the SolverOption Object

DefaultValue

The default value for the solver option. (Variant Property - Read Only)

MaxValue

The maximum value for the solver option. (Variant Property - Read Only)

MinValue

The minimum value for the solver option. (Variant Property - Read Only)

Name

The name of the solver option. (String Property - Read Only)

Value

The current value of the solver option. (Variant Property - Read/Write)

Changed

True if the option has been changed. (Boolean Property - ReadOnly)

Type

The type of the option. (Enumerated Property - Read Only) Possible values are: mplOptNotDefined mplOptOnOff mplOptList mplOptInt mplOptReal mplOptString.

Visual Basic Example:


     Dim MPL As OptiMax
     Dim cpxSolver As Solver
     Dim solvOption As SolverOption

     Set MPL = New OptiMax

     ' Load CPLEX solver into memory
     Set cpxSolver = MPL.Solvers.Add("c:\mplwin4\CPLEX65.dll")

     CpxSolver.Options("IterationLimit").Value = 1000

     For Each solvOption In cpxSolver.Options
         Debug.Print "CPXOPT: " & solvOption.Name & ": " &
         " val=" & solvOption.Value & _
         " def=" &   solvOption.DefaultValue & _
         " max=" & solvOption.MaxValue & _
         " min=" & solvOption.MinValue
     Next solvOption

        

Back To Top | Maximal Home Page | Table of Contents | Previous Page | Next Page