Skip to content
Snippets Groups Projects
Commit 42b448fc authored by David Hendriks's avatar David Hendriks
Browse files

implemented montecarlo generator routine

parent 45c89d5d
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@ import time
import json
import queue
import signal
import inspect
import datetime
import functools
import multiprocessing
......@@ -714,7 +715,7 @@ class evolution_functions:
# Check if all keys are known to binary_c.
if number_of_systems_run == 0:
# Check if keys match known binary_c arguments
self._check_full_system_dict_keys()
self._check_full_system_dict_keys(full_system_dict)
######################
# Handle logging of progress
......
......@@ -215,7 +215,9 @@ class monte_carlo_sampling:
# Load generator
self._monte_carlo_sampling_load_generator()
generator = self.grid_options["_monte_carlo_sampling_generator"]
generator = self.grid_options["_monte_carlo_sampling_generator"](
self, print_results=False
)
return generator
......@@ -237,6 +239,7 @@ class monte_carlo_sampling:
self.grid_options["_monte_carlo_current_total_mass_evolved"]
> self.grid_options["monte_carlo_mass_threshold"]
):
print("YOYOYO MONTE CARLO THRESHOLD REACHED")
self.grid_options["_monte_carlo_threshold_reached"] = True
def _monte_carlo_sampling_check_custom_threshold(self, result_queue):
......@@ -245,4 +248,5 @@ class monte_carlo_sampling:
TODO: put in the user-defined custom threshold function
"""
raise NotImplementedError("Functionality in not implemented")
# raise NotImplementedError("Functionality in not implemented")
pass
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment