Xpress Insight Model Requirements
- Include the mminsight package which includes the mminsight.dso Mosel module and implements the necessary interactions between Xpress Insight and the model.
- The model must implement the LOAD mode by writing model code to initialize all managed model entities. The execution of this loading code must be conditional on insightgetmode = INSIGHT_MODE_LOAD. Any calls to finalize must be included in the loading code.
- The model must implement the RUN mode. The execution of this code must be conditional on insightgetmode = INSIGHT_MODE_RUN and begin with a call to insightpopulate. The RUN mode code will typically include statements to construct the model from the scenario data, optimize it and process results.
- Replace any call to minimize and maximize with insightminimize and insightmaximize.
- Use the public qualifier to declare any input or results data entities if the -s (strip private symbols) compiler option is used. Entities declared locally within a procedure or functions are not visible to Xpress Insight, they need to be declared globally to be made visible.
model mymodel uses "mminsight" uses "mmxprs" forward procedure datainput case insightgetmode of INSIGHT_MODE_LOAD: do datainput exit(0) ! Stop after data initialization end-do INSIGHT_MODE_RUN: insightpopulate ! Inject scenario data and continue else datainput ! Default (non-Xpress Insight): initialize data and continue end-case ! load input data procedure datainput writeln("loading data") end-procedure ! create model constraints ! optimize ! post-process results end-model
The case statement (equivalent to if .. else if .. else) implements the flow control for each mode. The RUN mode logic in the example above is implemented in the global scope of the model after the case statement. Larger models often encapsulate the RUN mode logic in one or more procedures called from the case statement.
© 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.