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

Compilation to/from memory

Description
  • ugcompfrmem.mos, ugcompfrmem.c: Compiling a model held in memory
  • ugcompmem.mos, ugcompmem.c, ugcompmem.java, ugcompmemcs.cs: Compiling a model to memory (requires burglar2.mos, burglar.dat)
Further explanation of this example: 'Mosel User Guide', Section 17.1 Generalized file handling

ugcompmemc.zip[download all files]

Source Files

Data Files





ugcompmem.mos

(!******************************************************
   Mosel User Guide Example Problems
   ================================= 

   file ugcompmem.mos
   ``````````````````
   Compilation a model to memory.
   
   (c) 2014 Fair Isaac Corporation
       author: S. Heipcke, Sep. 2014
*******************************************************!)

model "Compile burglar.mos to memory"
 uses "mmjobs", "mmsystem"

 declarations
  modBurg: Model
 end-declarations

                                   ! Compile the model to memory
 if compile("", "burglar2.mos", "mem:bimfile")<>0 then exit(1); end-if
 load(modBurg, "mem:bimfile")      ! Load the bim file
 fdelete("mem:bimfile")
 run(modBurg)                      ! Start model execution
 wait                              ! Wait for model termination
 dropnextevent                     ! Ignore termination event message

end-model 



Back to examples browserPrevious exampleNext example