Skip to content

Commit

Permalink
Merge pull request #827 from gridsingularity/feature/D3ASIM-2616
Browse files Browse the repository at this point in the history
D3ASIM-2616: Added override of the slowdown factor using an env varia…
  • Loading branch information
spyrostz authored Jul 14, 2020
2 parents 8b49401 + 904e101 commit 7020c49
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/d3a/d3a_core/d3a_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,17 @@ def start(scenario, settings, events, aggregator_device_mapping):
"pricing_scheme": 0,
"seed": settings.get('random_seed', 0)}

slowdown_factor = environ.get('D3A_SLOWDOWN_FACTOR', None)

if slowdown_factor is None:
slowdown_factor = settings.get('slowdown', 0)
else:
slowdown_factor = float(slowdown_factor)

run_simulation(setup_module_name=scenario_name,
simulation_config=config,
simulation_events=events,
slowdown=settings.get('slowdown', 0),
slowdown=slowdown_factor,
redis_job_id=job.id,
kwargs=kwargs)
except Exception:
Expand Down

0 comments on commit 7020c49

Please sign in to comment.