chore: refine dashboard layout and timestep

This commit is contained in:
Andrii Prokhorov
2025-11-21 17:26:39 +02:00
parent 146e8fd26b
commit 8dec574ac6
2 changed files with 166 additions and 62 deletions

View File

@@ -72,10 +72,16 @@ def main() -> None:
else:
duration = None if realtime else 600.0
reactor = Reactor.default()
sim = ReactorSimulation(reactor, timestep=5.0, duration=duration, realtime=realtime)
dashboard_mode = os.getenv("FISSION_DASHBOARD", "0") == "1"
timestep_env = os.getenv("FISSION_TIMESTEP")
if timestep_env:
timestep = float(timestep_env)
else:
timestep = 1.0 if dashboard_mode or realtime else 5.0
sim = ReactorSimulation(reactor, timestep=timestep, duration=duration, realtime=realtime)
load_path = os.getenv("FISSION_LOAD_STATE")
save_path = os.getenv("FISSION_SAVE_STATE")
dashboard_mode = os.getenv("FISSION_DASHBOARD", "0") == "1"
if load_path:
sim.start_state = reactor.load_state(load_path)
if dashboard_mode: