Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Albrja/mic 5383/psimulate clock configuration #236

Merged
merged 6 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
**2.0.4 - 10/07/24**

- Update how vivarium work horse gets number of simulation steps

**2.0.3 - 09/10/24**

- Bugfix for job_parameters with simulation backups
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def work_horse(job_parameters: dict) -> Tuple[pd.DataFrame, Dict[str, pd.DataFra
logger.info(
f'Simulation setup completed in {exec_time["setup_minutes"]:.3f} minutes.'
)
start_time = sim.current_time
else:
sim = ParallelSimulationContext(
job_parameters.model_specification,
Expand All @@ -92,10 +91,7 @@ def work_horse(job_parameters: dict) -> Tuple[pd.DataFrame, Dict[str, pd.DataFra
logger.info(
f'Simulant initialization completed in {exec_time["simulant_initialization_minutes"]:.3f} minutes.'
)
start_time = pd.Timestamp(**sim.configuration.time.start.to_dict())
end_time = pd.Timestamp(**sim.configuration.time.end.to_dict())
step_size = pd.Timedelta(days=sim.configuration.time.step_size)
num_steps = int(math.ceil((end_time - start_time) / step_size))
num_steps = sim.get_number_of_steps_remaining()
logger.info(f"Starting main simulation loop with {num_steps} time steps")
backup_path = (
job_parameters.backup_configuration["backup_dir"] / str(get_current_job().id)
Expand Down
Loading