chore: refine dashboard layout and timestep
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user