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

Burglar - In-memory data exchange between Mosel models

Description
  • runburglar.mos, burglar.mos - compile/load/run another model
  • runburglario.mos, burglar2r.mos - data exchange between models in memory using bin format
  • runburglarior.mos, burglar2r.mos - data exchange between models in memory using raw format
  • runburglardistr.mos, burglar2m.mos - data exchange between models in memory on the local host, combining 'bin:', 'rmt:', 'shmem:'
  • runburglardistr2.mos, burglar2m.mos - data exchange between models in memory on the remote Mosel instance, combining 'bin:', 'rmt:', 'shmem:'
  • runburglarmem.mos - compiling a model source from memory
Further explanation of this example: Whitepaper 'Generalized file handling in Mosel', Sections 6 Exchange of information with embedded models, 7 bin: using Mosel's binary format


Source Files





runburglar.mos

(!*******************************************************
   Mosel Example Problems 
   ======================

   file runburglar.mos
   ```````````````````
   Running a model from another Mosel model.
   Save bim file in Mosel's temporary directory.
       
   (c) 2013 Fair Isaac Corporation
       author: S. Heipcke, Mar. 2013
*******************************************************!)

model "Run model burglar"
 uses "mmjobs"

 declarations
  modBurg: Model
 end-declarations

                                   ! Compile the model, save bim in temp. dir.
 if compile("", "burglar.mos", "tmp:burglar.bim")<>0 then exit(1); end-if
 load(modBurg, "tmp:burglar.bim")  ! Load the bim file
 run(modBurg)                      ! Start model execution
 wait                              ! Wait for model termination
 dropnextevent                     ! Ignore termination event message

end-model 

Back to examples browserPrevious example