Skip to content

Simulator Setup

KyrusMama edited this page Sep 26, 2020 · 6 revisions

Simulator setup:

Simulator setup is used to specify general details in the model. It can contain the following commands:

  • timestep <int>: This denotes the size of one time step in the model in milliseconds. As of now, it is strongly recommended that the user use timestep 1 only (time steps should be 1ms long). This command should be used exactly once in each model.
  • final_timestep <int>: This indicates how many timesteps the model should run for. This command should be used exactly once in each model.

The model also has the ability to save and load "save states". More details can be found here: Save States

Extra info:

Syntax for saving and loading:

  • save_directory <str>: This command is optional. If it is included, the simulator will save the model's state at the end of the simulation in the specified directory. This will include a new generated model txt file called state.txt, as well as a file called data.npz which will store other model data. If not included, the model will not save its state.
  • load_directory <str>: This command should only be used if this model already has a corresponding data.npz file generated by saving. It should point to the directory containing it.
  • keep_loaded_data <bool>: Must be used if and only if load_directory <str> is used. If True, this will preserve data from the loaded save in the output of this simulation. If false it will only output newly computed data. Note that this command has no effect on the computation itself.

Clone this wiki locally