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

Declaring a static module

Description
Declaring a static module (the module is embedded in the program instead of being a dso file) and initializing an array from data stored in the C program.

The same functionality can be obtained by using I/O drivers instead of a static module (see second version of the program in file mmstatdsoio.c).

Further explanation of this example: 'Mosel Native Interface User Guide', Chapter 6 Defining a static module


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

Data Files





meminitio.mos

(!*******************************************************
   Mosel Example Problems 
   ======================  
 
   file meminitio.mos 
   `````````````````` 
   I/O driver version of 'meminit.mos'
    
   (c) 2008 Fair Isaac Corporation  
       author: S. Heipcke, 2005
*******************************************************!)

model "Test initialization in memory (I/O)"
 parameters
  MEMDAT=''              ! Data block in memory
 end-parameters

 declarations
  a:array(1..20) of integer
 end-declarations

 initializations from "raw:"
  a as MEMDAT
 end-initializations

 writeln("a=", a)
 
end-model

Back to examples browserPrevious exampleNext example