Initializing help system before first use

Using Custom Scenario Types

Custom scenarios can be employed to control what a user is able to do when the scenario is loaded into Xpress Insight.

This capability enables developers to add logic into their models that will only display certain controls to the user after a scenario has been fully configured.

The appearance and the availability of the controls are configured in the companion file, for more see Example Scenario Type Configuration. These settings are matched to the model declaration using the scenario id, for more see Declaring Custom Scenario Types in the Mosel Model.

Customizing the Default Scenario

A developer can globally change the behavior and style of the all scenarios by editing the default 'SCENARIO' type in the companion file.
<scenario-types>
    <scenario-type id="SCENARIO" name="Optimization">
    <shelf-pill-style
        …
        ></shelf-pill-style>
    <state-icons
        …
    ></state-icons>
        <actions
        …
        ></actions>
    </scenario-type>
</scenario-types>

Declaring New Custom Scenario Types

Additional scenario types can be added by declaring a new scenario-type in the Mosel model with a unique id. The name of the scenario type can be configured in the companion file. (Unicity of the id is enforced by the system, the name is used to identify the type in the user interface so it is recommended that this is unique too.)
<scenario-type id="MYCUSTOMSCENARIO" name="Custom">
<shelf-pill-style
       …
    ></shelf-pill-style>
<state-icons
        …
></state-icons>
    <actions
        …
    ></actions>
</scenario-type>