diff --git a/binarycpython/utils/population_extensions/monte_carlo_sampling.py b/binarycpython/utils/population_extensions/monte_carlo_sampling.py index c9b4ab10e6b3017ad2b0cc55cb8e8bd84801245c..548db7a10886c3b175f3558ec8155c7517d4d942 100644 --- a/binarycpython/utils/population_extensions/monte_carlo_sampling.py +++ b/binarycpython/utils/population_extensions/monte_carlo_sampling.py @@ -1,10 +1,5 @@ """ Main script to provide the Monte-Carlo sampling class extensions - -TODO: some of the parameters that we use to sample require previous parameters. We need to set up a method to include making CDFs for those: -TODO: rename the GridVariable to SamplingVariable -TODO: add a property of 'parameter_dependence' which holds a list of other parameters that the current samplingVariable needs to calculate their cdf from -TODO: build CDFS in a nested dict fashing where the parameter the current parameter depends on are stored in some binned way s.t. we can can access the CDFs """ import datetime @@ -1088,11 +1083,19 @@ class monte_carlo_sampling: Function to get the generator for the source_file sampling method. Called by _get_generator and used in the actual evolution loop. """ - # Write monte_carlo generator - self._monte_carlo_sampling_write_generator() + # Write the sampling functions file + self._monte_carlo_sampling_write_sampling_functions_file() + + # Load the sampling functions + self._monte_carlo_sampling_load_sampling_functions_file() + + # Write generator file + self._monte_carlo_sampling_write_generator_file() # Load generator self._monte_carlo_sampling_load_generator() + + # Get generator file generator = self.grid_options["_monte_carlo_sampling_generator"]( self, print_results=False )