Simulator Engine Overview

The simulation engine is designed to represent the complex operations of various vessel systems. It combines user input from control consoles and stored system variables (which represent the behaviour of stuff) and paases them through a series of algorithms which represents the operation of ship systems. Where key system parameters diverge from design specifications, the simulation engine calculates the probability of event occurce and the impact of the event.


The simulator consists of variables and mathematical functions which represent the physical operation of the ship.

Simulator variables are divided into two main types, control and system.

Control variables include all values over which users have direct control, eg. ship speed. These variables are stored in the database table isdc_control. When users operate the ship's controls new values for these variables are written into the database.

System variables include all values over which users don't have direct control, eg. fuel to energy conversion ratio. These variables are stored in the database table isdc_system. Normally these variables would not change, i.e. they would be constants, but at least in the development stage admin users will be able to change them for testing purposes.

In the simulator script there is a third variable type, process, which is a temporary variable used to calculate other values. They are not stored in the database.

Based on this division there are two primary scripts which control the simulator - control.php and system.php. The former accepts input from users and writes those values into the database. The latter runs once every second on an infinite loop and generates new system values based on current control and system variable values and functions in the script.