diff --git a/binarycpython/utils/grid.py b/binarycpython/utils/grid.py index 9350ea5a43919c80afb2c98284d77634519206b2..956d232eb668d745d07ed564cb29ec19ecfbff21 100644 --- a/binarycpython/utils/grid.py +++ b/binarycpython/utils/grid.py @@ -1207,9 +1207,18 @@ class Population: start_runtime_binary_c = time.time() - # Evolve the system + # If we want to actually evolve the systems if self.grid_options["_actually_evolve_system"]: - self._evolve_system_mp(full_system_dict) + run_system = True + + # Check option to ignore 0 probability systems + if not self.grid_options["run_zero_probability_system"]: + if full_system_dict['probability'] == 0: + run_system = False + + if run_system: + # Evolve the system + self._evolve_system_mp(full_system_dict) end_runtime_binary_c = time.time() diff --git a/binarycpython/utils/grid_options_defaults.py b/binarycpython/utils/grid_options_defaults.py index c7f1a10776b064685ccdd42206680900b36dc8e8..f0f640669770cda12afaeb4e7b114cce47da6017 100644 --- a/binarycpython/utils/grid_options_defaults.py +++ b/binarycpython/utils/grid_options_defaults.py @@ -41,6 +41,7 @@ grid_options_defaults_dict = { "_actually_evolve_system": True, # Whether to actually evolve the systems of just act as if. for testing. used in _process_run_population_grid "max_queue_size": 1000, # Maximum size of the system call queue. Can't be too big! "_set_ms_grid": False, # Whether the M&S grid has been loaded + "run_zero_probability_system": True, # Whether to run the zero probability systems ########################## # Execution log: ########################## @@ -480,6 +481,7 @@ grid_options_descriptions = { "_actually_evolve_system": "Whether to actually evolve the systems of just act as if. for testing. used in _process_run_population_grid", "max_queue_size": "Maximum size of the queue that is used to feed the processes. Don't make this too big! Default: 1000. Input: int", "_set_ms_grid": "Internal flag whether the M&S grid has been loaded", + "run_zero_probability_system": "Whether to run the zero probability systems. Default: True. Input: boolean", } ###