Using constants and parameters
Many mathematical models start with a set of definitions like the following:
NT:= 3 Months:= {'Jan', 'Feb', 'Mar'} MAXP:= 8.4 Filename= "mydata.dat"
If these values do not change later in the model, they should be defined as constants, allowing Mosel to handle them more efficiently:
declarations NT = 3 Months = {'Jan', 'Feb', 'Mar'} MAXP = 8.4 Filename= "mydata.dat" end-declarations
If such constants may change with the model instance that is solved, their definition should be moved into the parameters block (notice that this possibility only applies to simple types, excluding sets or arrays):
parameters NT = 3 MAXP = 8.4 Filename = "mydata.dat" end-parameters
Mosel interprets these parameters as constants, but their value may be changed at every execution of a model, e.g.
mosel exec mymodel NT=5 MAXP=7.5 Filename="mynewdata.dat"
© 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.