| |||||||||||
| |||||||||||
|
Working with multiple models: submodels, coordination, communication, and parallelization Description The Mosel module mmjobs enables the user to
work with several models concurrently. We show here
a series of examples of basic tasks that typically need
to be performed when working with several models in Mosel: Parallel computing:
Source Files By clicking on a file name, a preview is opened at the bottom of this page. runsubshm.mos
(!*******************************************************
Mosel Example Problems
======================
file runsubshm.mos
``````````````````
Running a model from another Mosel model.
Communication of data to/from submodel
using 'shmem' IO driver with 'bin'.
(c) 2011 Fair Isaac Corporation
author: S. Heipcke, April 2011
*******************************************************!)
model "Run model testsubshm"
uses "mmjobs"
declarations
modSub: Model
A = 30..40
B: array(A) of real
end-declarations
! Compile the model file
if compile("testsubshm.mos")<>0 then exit(1); end-if
load(modSub, "testsubshm.bim") ! Load the bim file
initializations to "bin:shmem:indata"
A
end-initializations
run(modSub) ! Start model execution
wait ! Wait for model termination
dropnextevent ! Ignore termination event message
initializations from "bin:shmem:resdata"
B
end-initializations
writeln(B)
end-model
| |||||||||||
| © Copyright 2025 Fair Isaac Corporation. |