Initializing help system before first use

insightpopulate

insightpopulate


Purpose
This procedure is called to inject the input data from the Xpress Insight scenario into the model's data structures.
Synopsis
procedure insightpopulate
procedure insightpopulate(baseidorpath:string)
Argument
baseidorpath 
The UUID or path of the scenario from which to read. When this parameter is specified, the local model's data structures will be injected from the input data of a different scenario. When not specified, the model's data structures will be injected from the input data of the current scenario.
Example
case insightgetmode of
 INSIGHT_MODE_LOAD: do
   ! Scenario is being 'loaded' through Xpress Insight
   ! Call user function to initialize input data and then terminate
    loaddata
   exit(0)
  end-do
  INSIGHT_MODE_RUN: do
    ! Scenario is being 'run' through Xpress Insight
    ! Populate with Insight scenario data and continue model run
    insightpopulate
  end-do
  else
    ! Model is being run outside of Xpress Insight
    ! Call user function to initialize input data and continue model run
    loaddata
end-case
Example of the basic flow of an Insight model, calling loaddata to populate the input data entities when the scenario is loaded or the model is run from outside of Insight, and insightpopulate to populate them when scenario is run within Insight.
Further information
1. When passing the UUID or path to a different scenario to insightpopulate, the other scenario must have identical Insight schema entities to this one. It is recommended that the other scenario be within the same app as this one.
2. Passing the UUID or path to a different scenario to insightpopulate should be considered an experimental feature.
3. When the model is executed outside of an Insight scenario, calling the 0-argument insightpopulate will not populate any entities, but will not abort the model with an error.
4. When the model is executed outside of an Insight scenario, calling the 1-argument insightpopulate will cause the model to abort with an error.
5. When the model is in run mode INSIGHT_MODE_LOAD, calling the 0-argument insightpopulate will cause the model to abort with an error.
Related topics