diff --git a/nbs/04_hierarchy.ipynb b/nbs/04_hierarchy.ipynb index cca07f95..f6a0eb09 100644 --- a/nbs/04_hierarchy.ipynb +++ b/nbs/04_hierarchy.ipynb @@ -1087,7 +1087,7 @@ "\n", "\n", " @classmethod\n", - " def run_from_file(cls, filename, seed=None, render=False, history=False, move=None, plots=None, hpct_verbose= False, runs=None, outdir=None, early_termination = None):\n", + " def run_from_file(cls, filename, env_props=None, seed=None, render=False, history=False, move=None, plots=None, hpct_verbose= False, runs=None, outdir=None, early_termination = None):\n", " \n", " prp = PCTRunProperties()\n", " prp.load_db(filename)\n", @@ -1095,8 +1095,10 @@ " error_collector_type = prp.db['error_collector_type'].strip()\n", " error_response_type = prp.db['error_response_type']\n", " error_limit = eval(prp.db['error_limit'])\n", - " environment_properties = eval(prp.db['environment_properties'])\n", - " \n", + " if env_props is None:\n", + " environment_properties = eval(prp.db['environment_properties'])\n", + " else:\n", + " environment_properties = env_props \n", " error_properties = prp.get_error_properties()\n", " \n", " if runs==None:\n", diff --git a/pct/hierarchy.py b/pct/hierarchy.py index a957475e..503a83b3 100644 --- a/pct/hierarchy.py +++ b/pct/hierarchy.py @@ -1009,7 +1009,7 @@ def run_from_config(cls, config, min, render=False, error_collector_type=None, @classmethod - def run_from_file(cls, filename, seed=None, render=False, history=False, move=None, plots=None, hpct_verbose= False, runs=None, outdir=None, early_termination = None): + def run_from_file(cls, filename, env_props=None, seed=None, render=False, history=False, move=None, plots=None, hpct_verbose= False, runs=None, outdir=None, early_termination = None): prp = PCTRunProperties() prp.load_db(filename) @@ -1017,8 +1017,10 @@ def run_from_file(cls, filename, seed=None, render=False, history=False, move=No error_collector_type = prp.db['error_collector_type'].strip() error_response_type = prp.db['error_response_type'] error_limit = eval(prp.db['error_limit']) - environment_properties = eval(prp.db['environment_properties']) - + if env_props is None: + environment_properties = eval(prp.db['environment_properties']) + else: + environment_properties = env_props error_properties = prp.get_error_properties() if runs==None: