3. Año 2010: cambios internos y giro en la política exterior de Colombia
3.2. Diseño de la propuesta
3.2.3. El nuevo ministerio: de ambiente y desarrollo sostenible
6.1 Starting and Stopping a Simulation – General This chapter deals with the following main topics:
• Starting a Simulation,
• Stopping a Simulation,
• Generation of Object Definition, Data Model and UCA2 Agency Configuration Files.
6.2 Starting a Simulation
After you have finished the preparation steps, described under "Preparing a Simulation", you can start a simulation.
Choose Simulation - Start, press F5 or click the symbol on the toolbar to start a simulation.
The Equipment Simulator starts a simulation by performing the following tasks:
• For every server simulated and every server the Equipment Simulator connects to a object definition file is dynamically created from the device structure.
• For every object definition file the OdFoundry tool is called to generate the data model files needed by the UCA2 Agency.
• All scenarios which are attached to device objects and must be started during simulation start are syntax checked.
• The data leaf references of all scenarios attached to device objects are resolved.
• The UCA2 Agency is started and initialized.
• For every server a UCA2 Agency server session is started and initialized.
• For all servers the Equipment Simulator should connect to a single client session is started and initialized.
• The Equipment Simulator automatically subscribes to all reports offered by the server that the Equipment Simulator connects to, as soon as the connection is active.
• The OnSimulationStart handlers of all attached scenarios are executed.
If an error occurs in one of these steps the simulation start is cancelled and the error reason is displayed.
If a syntax error is detected in a scenario or data leaf references in a scenario cannot be resolved, the Equipment Simulator automatically jumps to the faulty scenario and displays the line where the error occurred.
After the simulation is started, you are able to simulate UCA2 operations (see "
Simulation of UCA2 Operations", "Simulation of Files" and "Simulation of goose" for more details).
6.3 Stopping a Simulation
When you have finished with your simulation simply choose Simulation - Stop, press
<Ctrl>+F5 or click the symbol on the toolbar.
The Equipment Simulator stops all client and server sessions and terminates the UCA2 Agency.
Scenarios which were started during the simulation are detached from their device objects.
Only Scenarios which were attached before a simulation remain attached to their respective device objects.
6.4 Generation of Object Definition, Data Model and UCA2 Agency Configuration Files This section describes the internal procedures of how the Equipment Simulator dynamically generates the environment for the UCA2 Agency. The section is primarily not intended for the end user but it may be useful to understand what is going on in the background if something goes wrong during the generation of this environment.
The following sections describe the steps the Equipment Simulator performs to configure the UCA2 Agency and generate the data model files needed.
Depending on the configuration settings Remove temporary UCA2 Agency configuration files after simulation and Remove temporary Object Foundry files after simulation the Equipment Simulator automatically removes the dynamically generated configuration and data model files or not. The options can be found in the UCA2 Agency Settings- General and Object Foundry Settings - General categories in the configuration settings under Tools - Options....
Not removing the files can be useful to investigate them when there is a problem generating the data model files or starting the UCA2 Agency.
6.4.1 LEAN.CFG
The network configuration file is dynamically generated from the settings defined in the Equipment Simulator and the devices which should be simulated.
The configuration settings can be displayed and modified using Tools - Options....
Under the category UCA2 Agency Settings - Network Configuration File the SISCO Stack Parameters, the Local Server Parameters and the Remote Server Parameters can be configured.
The SISCO Stack Parameters and the Local Server Parameters are taken over unchanged to the network configuration file. The Remote Server Parameters must contain placeholders for the server name, AE qualifier and IP address. This parameters are automatically replaced with the appropriate settings from the XML configuration file when the Equipment Simulator generates the network configuration file. The Equipment Simulator creates a remote server entry in the network configuration file for every client or server simulated.
Normally you need not change any of the above settings. The Equipment Simulator has default settings built in, which should be suitable in most cases.
The network configuration file is always named LEAN.CFG and is created in the UCA2 Agency directory configured under Tools - Options... in the UCA2 Agency Settings - General category.
6.4.2 AGENCY.CFG
The agency configuration file does not contain any dynamic components. The file is created without any modification from the settings in the UCA2 Agency Settings - Agency Configuration File category under Tools - Options....
The Equipment Simulator has default settings for the agency configuration file built in. If these settings do not suit your needs you can modify them as needed. For example if you are simulating a large number of servers you may need to increase the MaxServerSession parameter which is 3 by default. See the MiCOM SYSTEMS UCA2 Communications Agency - Installation Guide for a detailed description of all UCA2 Agency parameters which can be influenced using the agency configuration file.
The agency configuration file is always named AGENCY.CFG and is created in the UCA2 Agency directory configured under Tools - Options... in the UCA2 Agency Settings - General category.
6.4.3 MMS_LOG.CFG
The MMS log configuration file does not contain any dynamic components. The file is created without any modification from the settings in the UCA2 Agency Settings - MMS Log Configuration File category under Tools - Options....
The Equipment Simulator has default settings for the configuration file built in. If these settings do not suit your needs you can modify them as needed. See the MiCOM SYSTEMS UCA2 Communications Agency - Installation Guide for more details on the MMS log configuration file.
The MMS log configuration file is always named MMS_LOG.CFG and is created in the UCA2 Agency directory configured under Tools - Options... in the UCA2 Agency Settings - General category.
6.4.4 Generation of Data Model Files
When using a stand-alone XML configuration file, the Equipment Simulator creates data model files device which should be simulated at the start of the simulation. This generation is done in two steps:
1. Generation of the object foundry files.
2. Generation of the data model files.
When stopping the simulation/restarting it with the same devices to simulate, Data Model files are not rebuilt.
When using a configuration from an SCE zip file, the equipment simulator uses directly the Data Model files included in the zip file.
6.4.4.1 Object Foundry Files
When using a stand-alone XML configuration file, the Equipment Simulator creates an object foundry file for every device which should be simulated.
At the beginning of every object foundry file the Equipment Simulator places the execution control settings configured in the Object Foundry Settings - Execution Control category under Tools - Options.... The default execution control settings delivered with the Equipment Simulator should be suitable in most cases and need no modification.
Then all basic types, common classes, bricks, etc., a device consists of, are dynamically generated and appended to the object foundry file.
Because the type ids of basic types, common classes and some bricks generated by the object foundry tool must exactly match the ids used by the UCA2 Agency a predefined order of types must be retained by the Equipment Simulator when generating the object foundry files.
A configuration file is used for this purpose. This configuration file, which is normally named BASTYPES.CFG, lists all types together with their predefined id,. When generating the object foundry file for a specific device, the Equipment Simulator ensures that the object foundry will generate the ids listed in the file by generating the types in the needed order.
The configuration file used can be configured in the Object Foundry Settings - General category under Tools - Options....
If the predefined type ids are modified in the UCA2 Agency a new BASTYPES.CFG file must be generated and used with the Equipment Simulator.
6.4.4.2 Data Model Files
For every object foundry file generated, the Equipment Simulator executes the object foundry tool to create the associated data model files.
An alignment control file is generated for this purpose which consists of the contents configured in the Object Foundry Settings - Alignment Control category under Tools - Options.... As for most other settings the built in default alignment control should be suitable in most cases.
After the object foundry tool is finished, the Equipment Simulator scans the generated data model files to extract the data ids needed for the communication with the UCA2 Agency.