Initializing help system before first use

Built in functions and procedures

The following is a list of built in functions and procedures of the Mosel language (excluding modules). Functions return a value; procedures do not.

Dynamic array handling
create    exists    delcell   isdynamic
Freeze (finalize) a dynamic set
finalize
Rounding functions
ceil      floor     round     abs
Mathematical functions
exp       log       ln        sqrt
cos       sin       arctan
isodd
Special real values
isfinite  isinf     isnan 
Random number generator
random    setrandseed
Minimum/maximum of a list of values
v := minlist(5, 7, 2, 9)
w := maxlist(CAP(1), CAP(2))
Inline ``if'' function
MAX_INVEN(t) := if(t < MAX_TIME, 1000, 0)

Inven(t) := stock(t) = buy(t) - sell(t) +
              if(t > 1, stock(t-1), 0)
Matrix export to file
exportprob
File handling
fopen         fclose        fselect
getfid        getfname      getreadcnt
iseof         fflush        fskipline
fwrite[_] / fwriteln[_]
read / readln   write[_] / writeln[_]  
String handling
strfmt        substr        _
Access and modify model objects
getcoeff[s]   setcoeff      getvars
sethidden     ishidden      setname      setrange
gettype       settype       getsize
makesos1      makesos2
getelt        getfirst      getlast      findfirst
findlast      gethead       gettail      cutelt
cutfirst      cutlast       cuthead      cuttail
reverse       getreverse    splithead    splittail
Access solution values
getobjval
getsol        getrcost
getslack      getact        getdual
Exit from a model
exit
Mosel controls
getparam      setparam    localsetparam  restoreparam
Date/time
currentdate   currenttime   timestamp
Bit value handling
bitflip       bitneg        bitset
bitshift      bittest       bitval
Miscellaneous
asproc        assert        reset
setioerr      setmatherr    publish      unpublish
memoryuse     newmuid       versionnum   versionstr
  • Overloading of subroutines
    • Some functions or procedures are overloaded: a single subroutine can be called with different types and numbers of arguments
  • Additional subroutines are provided by Mosel library modules, which extend the basic Mosel language, e.g.,
    • mmxprs: Xpress Optimizer
    • mmodbc: ODBC data connection
    • mmsystem: system calls; text handling
    • mmjobs: handling multiple models and (remote) Mosel instances
    • mmsvg: graphics
    ⇒See the `Mosel Language Reference Manual' for full details
  • User-defined functions and procedures
    • You can also write your own functions and procedures within a Mosel model
    • Structure of subroutines is similar to a model (may have declarations blocks)
    • User subroutines may define overloaded versions of built in subroutines
    ⇒See examples in the `Mosel User Guide' (Chapter Functions and procedures)
  • Packages
    • Additional subroutines may also be provided through packages (Mosel libraries written in the Mosel language as opposed to Mosel modules that are implemented in C)
    ⇒See the `Mosel User Guide' for further detail (Chapter Packages)

© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.