To create scenarios outside of the Web User Interface, all scenario data including the Scenario Name, Scenario Actions, Scenario Selections and Scenario Updates must be entered into an excel workbook that is configured to the Gains Schema.
The makeup of a Scenario consists of Updates and Selections that make Actions, and one or more actions that make up a Scenario.
The Scenario Updates page, there are two fields which will require data, the Update Field, and the Update SQL Field.
The Update field is the name the user designates for the update.
The Update SQL field is the actual SQL statement that will be used to alter records for a given selection.
The Scenario Selections page consists of three fields, Selection, Selection table and Selection SQL.
The Selection field is the name the user designates for the Selection.
The Selection table field indicates the table that the data is to be pulled from.
The Selection SQL field is the SQL statement to be used for selecting from the Selection table.
The Scenario Actions page consists of three fields, Action, Selection, and Update.
The Action field is the name the user designates for the Action.
The Selection field is the name of a Selection from the Selections table.
Similarly, the Update field is the name of an Update from the Updates table.
The last table, the Scenarios table, has five fields, Base Scenario, Output Scenario, Action, Action number and SolverInclude.
The Base Scenario field allows the user to select which Base Scenario is to be used for the output scenario.
The Output Scenario is the name that will be used for the scenario card that will be created.
The Action field is the name of an Action from the Actions table.
The Action number field is the order in which the user would like the Actions to be executed within the Scenario.
Finally, the SolverInclude field indicates whether the Action should be included in the optimization.
Once all the tables have been completed, the Model Building Companion should be used to upload the schema into the cloud database. For more information on how this is done, please see the Model Building Companion Data Teleporting video.
Once the data has been uploaded, it can be viewed by using Microsoft SQL Server Management Studio. Now that the data is in the database, Gains' web-based user interface will sync with the data upon login and allow for optimizations to be performed on the scenarios that have just been created.
