Up and Running in Xpress Insight
Before you can begin to add custom views to your Mosel model, some small but mandatory changes need to be made to the model code. These changes ensure that your model can be recognized by Xpress Insight itself, and that it can continue to be run independently via the Mosel command line.
- The mminsight package must be loaded - it includes the mminsight.dso Mosel module and implements the necessary interactions between Xpress Insight and the model.
- To work with Xpress Insight, your model must implement the two required modes LOAD and RUN:
- The model must implement the LOAD mode via code that initializes all managed model entities. 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 - related code must be conditional on insightgetmode=INSIGHT_MODE_RUN and begin with a call to insightpopulate. Run mode code typically includes statements to construct the model from scenario data, optimize it and process the results.
- Calls to maximize and minimize should be replaced with calls to insightmaximize and insightminimize.
- Input or results data entities that you wish exposed to Xpress Insight should be declared with the public qualifier. Entities declared locally within procedures or functions are not visible to Xpress Insight, they need to be declared globally to be visible.