FICO
FICO Xpress Optimization Examples Repository
FICO Optimization Community FICO Xpress Optimization Home
Back to examples browserNext example

Definition of constants of different types

Description
Language extensions provided by this module:
  • constants: integer, real, string, boolean
This functionality can also be implemented by a package.

Further explanation of this example: 'Mosel Native Interface User Guide', Chapter 1 Defining constants; package version: 'Mosel User Guide', Section 16.1 Definition of constants

myconstants.zip[download all files]

Source Files
By clicking on a file name, a preview is opened at the bottom of this page.
myconstants.c[download]
myconstants.mos[download]

Data Files





myconst_test.mos

(!******************************************************
   Mosel NI Examples
   =================

   File myconst_test.mos
   `````````````````````
   Using module myconstants

   (c) 2008 Fair Isaac Corporation
       author: S. Heipcke, 2002
*******************************************************!)

model "Test myconstants module"

 uses "myconstants"

 writeln(MYCST_LINE)
 writeln("BigM value: ",MYCST_BIGM,", tolerance value: ",MYCST_TOL)
 writeln("Boolean flags: ",MYCST_FLAG," ",MYCST_NOFLAG)
 writeln(MYCST_LINE)
 
end-model

Back to examples browserNext example