- •Disclaimer
- •Contact information
- •Version information
- •Changes in version 3.00
- •Changes in version 2.20
- •Changes in version 2.10
- •Introduction
- •Typing convention
- •Terms used in this document
- •System structure
- •Creating a simple model
- •SetupProblem
- •ModelEquations
- •EndCalc
- •Compiling
- •Simulation
- •Model file format
- •Common parameters and datatypes
- •SetupProblem
- •SetupModel
- •SetupState
- •SetTimeFactor
- •SolverSettings
- •Dynamic variables
- •States
- •Static variables
- •Parameter pages
- •Initial Parameters
- •Floating point parameters
- •Integer parameters
- •Boolean parameters
- •List parameters
- •Enumerated parameters
- •Enumerated choice parameters
- •Explicit variables
- •Action buttons
- •Info Labels
- •HideSampleTime
- •Model help file
- •PreCalc
- •SetStartState
- •AddExplicitVar
- •SetSampleTime
- •ModelEquations
- •StateShift
- •OnStateChange
- •OnSolution
- •OnSample
- •EndCalc
- •OnQuit
- •OnUIValueChange
- •Running simulations from the model
- •OnSaveSettings
- •OnLoadSettings
- •Using Initial parameters
- •SetInitial
- •SetGuess
- •AddDynVar
- •AddStatVar
- •Mathematical text
- •Debugging
- •Common problems
- •Using refrigerant equations
- •WinDali Model Editor
- •Compiler Options
- •Environment Options
- •WinDali Simulation Interface
- •Menu commands
- •Online parameters
- •Varying parameters
- •Dali solver
- •Using Profiles in models
- •Generating profiles
- •Using profiles in a model
- •Using Post Process
- •Distributing models
- •References
38 6 Model file format
6.2.20 Model help file
As of version 1.37 it is possible to specify a help file for the model. The help file can be in any format as the simulation program executes the application, which is associated with the help file.
The help file should be located in the same directory as the model. If the help file consists of several files then you should manually include files other than the installed help file when creating a distributable copy (see chapter 13).
The help file is installed by calling the following procedure within SetupProblem:
Heading
procedure AddHelpFile(FileName : PChar);
Parameters
FileName Name of the help file (without directory information).
Example
AddHelpFile('Example.html');
6.3 PreCalc
PreCalc is called just before the simulation is started. This procedure can be used to initiate variables, allocating memory etc. Furthermore PreCalc is used to specify initial values for dynamic variables based on initial value parameters, and to add static variables. This is treated in chapter 6.14.
If you set the ShowStartState parameter in a call to SetupState to false, you can specify the initial state in PreCalc. This is done by calling SetStartState.
You can also add explicit variables in PreCalc by calling AddExplicitVar and control the sample time by calling SetSampleTime.
6.3.1 SetStartState
Heading
procedure SetStartState(Value : TInteger);
Parameters
Value Number of the initial state.
Example
SetStartState(1);
WinDali |
Morten Juel Skovrup |