Simulator#
- class Simulator(scenario, prefix='temp', verbosity=0, generate_tst_file=True, generate_out_file=False)[source]#
Bases:
object
The SANSMIC Python simulator.
- Parameters:
scenario (Scenario) – The scenario to run
prefix (str, optional) – The output file prefix to use, by default “temp”
vebosity (int, optional) – The verbosity level for console output, by default 0
generate_tst_file (bool, optional) – Generate an old-style .TST file, by default True
generate_out_file (bool, optional) – Generate an old-style .OUT file, by default False
Summary
close
()Close and garbage collect the C++ model object.
Get the current state of the model as a single-timestep results object.
open
([prefix])Open a simulation.
run_sim
()Run the complete simulation; requires the Simulator to have been opened first.
The current stage of the simulation
The current time (within the stage) of the simulation
The current simulated cavern volume
Is this simulator attached to a C++ SANSMIC model?
Is the simulation mid-stage?
The total number of stages that have been defined
The results for an entire simulation.
Provides an iterator that will run each step of each stage in turn.
Details
- get_current_state()[source]#
Get the current state of the model as a single-timestep results object.
- open(prefix=None)[source]#
Open a simulation.
- Parameters:
prefix (str) – The output filename prefix to use, by default None which uses the value specified when the Simulator was created.
- property steps: StepwiseIterator#
Provides an iterator that will run each step of each stage in turn.