xprslp

Execute a Mosel program.

Syntax

moselexec(srcfile)
moselexec(srcfile,parlist)
moselexec(srcfile,parlist,options)
retcode=moselexec(..)
[retcode, exitcode]=moselexec(..)

Description

Compile and run a Mosel program.

Input Arguments

srcfile

Name of the Mosel source file to run, can be any Mosel generalized file.

parlist

String composed of model parameter initializations separated by commas.

options

Compilation options (documented in the Mosel Language Reference Manual).

Output Arguments

retcode

Compilation and execution result code.

 

< 0

compilation failed.

 

0

program executed successfully.

 

> 0

an error occured during model execution.

exitcode

SExit status returned by the Mosel program.

Further information

  1. Compilation options are documented in the Mosel Language Reference Manual.
  2. If the output argument retcode is omitted and execution is not successful (that is, retcode is non-zero), then its value is printed with a warning message (to disable this message, just add the output argument in the call).