Scenarios

From SysCAD Documentation
Jump to navigation Jump to search

Navigation: User Guide ➔ Menu Commands ➔ Project ➔ Scenarios


Introduction

A scenario is a complete binary dump of the state of a project and is saved to a file with the extension scn. It saves all the configuration and calculated data for all unit models in the project.

If the SysCAD model is to be used for scenario testing, it is recommended to save a scenario file for each test case performed, so that user can quickly recall the scenario data back on screen for further analysis.

The scenario is often used with the command script file or the COM Automation.

Save Scenario

Command Button SaveScenario.png
Command Path Project - Scenario - Save Scenario
Shortcut Key Shift+F6

Once a project is loaded, user can use "Save Scenario" at anytime to save a "snapshot" of the project.

  1. A scenario is a complete binary dump of the state of a project and is saved to a file with the extension scn.
  2. It saves all the configuration and calculated data for all unit models in the project at the current time step / iteration.
    The save scenario includes:
    • All model configuration data, including PID controllers, Set Tag controllers. If the configuration data is altered after the scenario save, reloading the scenario will return the controllers to the state at the time the scenario is saved. This could mean any addition / deletion / modification to the controllers can be lost.
    • Model configuration also applies to all sub-model configurations, reactions, heat loss, split flow configuration and so on. If the sub-models were changed after the scenario save, reloading of the scenario will reset the sub-models to the state at the time the scenario is saved. This could mean any addition / deletion / modification to the sub-models can be lost.
    • This also including model procedures, and general controllers. However, if the PGM / MP file was edited to include modified logic, this could mean the "saved scenario" may have different calculated results to the "solved results".
    The save scenario excludes:
    • Graphical page changes. Flowsheet changes are only saved during project save or manual graphical page save (actioned by the user)
    • reaction file changes. The reaction file is saved by the reaction editor (or text editor), the scenario will only save values such as reaction extent, not the actual reaction.
    • PGM file / MP file changes. The PGM file / MP file is saved by the text editor, then scenario will only save values such as input variables, not the actual logic.
    • Configuration file changes. The species list used by the project is saved via "edit configuration". The scenario will only save the current list of species, this may be different if user has changed the configuration file or species data after the scenario save.
    • Any other external files.
  3. The save scenario is often used with the Command Script or the COM Automation.
  4. The time taken to save a scenario is significantly faster than project save and the user can request a Save Scenario while SysCAD is solving or running. However, for best results:
    • for steady state projects, we recommend user to fully solve the project before saving a scenario. If any changes has been made, re-solve and then re-save the scenario to keep it up-to-date.
    • for dynamic projects, we recommend user to pause the project before saving a scenario. The scenario for dynamic project normally refers to a time reference, e.g.: "starting point", "end of week1", "end of run" etc.
  5. Once Scenarios are saved, it can be

Scenario File Format

The scenario files can be saved compressed or uncompressed.

For large projects, it is recommended that the scenarios be saved in the compressed file format to reduce file size.

From Tools - General Options dialog box, General Tab:

General Options2.png

Select option Zip Scenario files during save will save the files in a ZIP format, reducing the file size for storage purposes.

Load Scenario

Command Button LoadScenario.png
Command Path Project - Scenario - Load Scenario
Shortcut Key Ctrl+F6

Once a project is loaded, previously saved scenarios can be loaded. The Load scenario is often used with the Command Script or the COM Automation.

To load a scenario, just select the appropriate file from the list and press Open.

LoadScenarioDialog.png
  1. The above "Open Scenario" box shows four scenario files, note the difference between Zipped and unzipped file name and file size.
    • The zipped scenario is saved by selecting the Zip Scenario files during save option, see Scenario File Format
    • The zipped scenario file name has extension .scn.zip.
    • The zipped scenario is very small compared to the unzipped version of the file.
  2. The time taken to load a scenario is significantly faster than a project load.
  3. SysCAD may be running while scenarios are being loaded. However, for best results, pause the project before loading a scenario.
  4. When a scenario is loaded, models that exist in the scenario but not in the project are ignored, and models that exist in the project but not in the scenario are left unchanged.
  5. When a scenario is loaded, species that exist in the scenario but not in the project are ignored, and species that exist in the project but not in the scenario are left unchanged.
  6. Please check General Controllers, reaction, MP sub-models to make sure they are still functioning properly (if these external files have changed, make sure they are using valid values).
  7. Please see save scenarios for what is included / excluded with save scenario.
  8. For steady state projects, we normally recommend user to re-solve the project after the scenario is loaded, this can be used to "check" if the scenario matches the project, if the project doesn't recover solved, then it normally means something has changed in the project.
  9. User can generate a report as soon as the scenario is loaded, however, as a precaution, we normally do recommend a re-solve just to make sure the project is still in the solved state before report is generated.
  10. Scenarios can be used for Scenario Comparisons since a saved scenario saves all the calculated values, which are required for meaningful scenario comparisons. See Compare Scenarios.

Compare Scenarios

Command Path Project - Scenario - Compare Scenarios

This command can be used to:

  1. Compare previously saved Scenarios.
  2. Compare a previously saved Scenario with current values.

These are done through the Compare Tag Values Dialog box.

CompareScenario1.png
  • Use the Add... button to add in files for comparison:
    CompareScenario2.png
    Use the browse button to find the 1st scenario file.
    Enter the 2nd file name if required or you can choose to compare the 1st file with the current values.
    Enter the output file name or use the window as the output destination.
    Press OK when completed and you will be back to the Compare tag Values dialog box.
  • The Delete button allows you to delete a comparison entry.
  • The Edit button brings you back to the Compare dialog box.
  • The Compare button performs the comparison of the files.
  • The Done button closes the Compare Dialog box.
  • The Options button opens the Tag Value Comparison Options dialog box:
CompareScenario3.png
This dialog box lets you to customise the compare output file.