FICO
FICO Xpress Optimization Examples Repository
FICO Optimization Community FICO Xpress Optimization Home
Back to examples browserPrevious exampleNext example

Working with models and accessing dynamic libraries in Mosel

Description
mmexlib-cs: Working with models and accessing dynamic libraries in Mosel (requires burglari.mos, chess2.mos, trans.mos)
  • load and unload BIM models
  • run a model in Mosel
  • display information about loaded models
  • display information about additional libraries required by the loaded models
mmdispmod-cs: Display the contents of a model; the information is read from a bim file
  • display run-time parameters, requirements, symbols, package/module dependencies, annotations
mmdispdso-cs: Display the contents of a module
  • display constants, types, control paramters, subroutines, I/O drivers
Further explanation of this example: 'Mosel Library Reference .NET doc'

mmexinfocs.zip[download all files]

Source Files

Data Files





chess2.mos

(!*******************************************************
  * Mosel Example Problems                              *
  * ======================                              *
  *                                                     *
  * file chess2.mos                                     *
  * ```````````````                                     *
  * Example for the use of the Mosel language           *
  * (Small LP-problem from XPRESS-MP User Guide)        *
  *                                                     *
  * (c) 2008 Fair Isaac Corporation                     *
  *     author: S. Heipcke, 2001                        *
  *******************************************************!)

model 'Chess Problem'

uses "mmxprs"                     ! Load the optimizer library

declarations
 xs: mpvar                        ! Number of small chess sets to make
 xl: mpvar                        ! Number of large chess sets to make
end-declarations

 Profit:= 5*xs + 20*xl            ! Objective: maximize total profit

 mc_time:= 3*xs + 2*xl <= 400     ! Limit on available machine time
 wood:=      xs + 3*xl <= 200     ! Limit on available wood

 maximize(Profit)                 ! Solve the LP-problem

end-model

Back to examples browserPrevious exampleNext example