[Coin-discuss] Possible Classes to represent a Model

J P Fasano jpfasano at us.ibm.com
Thu Jul 25 16:29:42 EDT 2002


Today there was a meeting with John Forrest, Laci Ladanyi, Robin
Lougee-Heimer, Ted Ralphs, Matt Saltzman, and myself.
During the meeting we discussed the idea of separating the Model data from
the OsiSolverInterfaces.
I agreed to post my understanding of the discussion.

There could be separate classes to represent a variable and a constraint.
An objective function can be represented as a constraint (without bounds).

A model is just collection of variables, collection of constraints, and
collection of objective functions.
The intention is that this can capture both linear and nonlinear problems.
A linear model is a special kind of model, where different storage
techniques would likely be used for run time efficiency.

So the classes might look like:
  OsiVariable
    Type enum: might include: Continuous, Integer, ...
    LowerBound: double
    UpperBound: double
    Value: double
    Reduced cost (multiplier): double
    Identifier: int

  OsiConstraint
    Type enum
    LowerBound: double
    UpperBound: double
    Value: Ptr to Function of OsiVariables
    Price (multiplier): double
    Identifier: int

  OsiModel
    Member Data:
      Variables:   Collection of OsiVariable
      Constraints: Collection of OsiConstraint
      Objectives:  Collection of OsiConstraint

  OsiLinearConstraintModel inherits from OsiModel
    Member Data:
      Variables: use more efficient storage than
                 Collection of OsiVariable for runtime
                 performance
      Constraints: OsiPackedMatrix
    Methods:
      Re-implement OsiModel methods to use local
      member data.

JP Fasano
jpfasano at us.ibm.com
(914)945-1324  (tie line 862-1324)
COIN www.coin-or.org





More information about the Coin-discuss mailing list