Commit db19fb72 authored by Jason Rhinelander's avatar Jason Rhinelander

add run_stage_proirity; move RunStage to eris

Simulation.RunStage.intra_begin was tedious to write, so export
RunStage directly in eris instead.
parent b455a392
......@@ -70,12 +70,13 @@ void bind_simulation(py::module &m) {
.def("run", &Simulation::run, "Runs one period of the simulation")
.def_property_readonly("t", &Simulation::t, "Accesses the simulation period number, where 1 is the first period, and 0 is the initialize stage (before the first call to run()).")
.def_property_readonly("run_stage", &Simulation::runStage, "Accesses the current simulation run stage.")
.def_property_readonly("run_stage_priority", &Simulation::runStagePriority, "Accesses the current simulation run stage priority level. The default priority (if not explicitly overridden by an optimizer) is 0.")
.def("stage_intra", &Simulation::runStageIntra, "Returns true if the current simulation stage is one of the intra-period stages.")
.def("stage_inter", &Simulation::runStageInter, "Returns true if the current simulation stage is one of the inter-period stages.")
.def("stage_optimize", &Simulation::runStageOptimize, "Returns true if the current simulation is one of the opimization stages, i.e. inter-optimize, intra-optimize, intra-reoptimize, or intra-reset")
py::enum_<Simulation::RunStage>(simulation, "RunStage")
py::enum_<Simulation::RunStage>(m, "RunStage")
// Don't export the internal runstage enum values: idle, kill, kill_all
// inter-period stages:
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment