Commit f2afe1f5 authored by Jorn Baayen's avatar Jorn Baayen

HomotopyMixin: Use name mangling on private 'results' attribute.

parent b9843e09
...@@ -28,7 +28,7 @@ class HomotopyMixin(OptimizationProblem): ...@@ -28,7 +28,7 @@ class HomotopyMixin(OptimizationProblem):
if self.__theta > 0: if self.__theta > 0:
# Add previous results to seed # Add previous results to seed
# Do not override any previously seeded values, such as goal programming results. # Do not override any previously seeded values, such as goal programming results.
for key, result in self._results[ensemble_member].items(): for key, result in self.__results[ensemble_member].items():
times = self.times(key) times = self.times(key)
if key not in seed and len(result) == len(times): if key not in seed and len(result) == len(times):
# Only include seed timeseries which are consistent # Only include seed timeseries which are consistent
...@@ -89,7 +89,7 @@ class HomotopyMixin(OptimizationProblem): ...@@ -89,7 +89,7 @@ class HomotopyMixin(OptimizationProblem):
success = super().optimize(preprocessing=False, postprocessing=False, log_solver_failure_as_error=False) success = super().optimize(preprocessing=False, postprocessing=False, log_solver_failure_as_error=False)
if success: if success:
self._results = [self.extract_results(ensemble_member) for ensemble_member in range(self.ensemble_size)] self.__results = [self.extract_results(ensemble_member) for ensemble_member in range(self.ensemble_size)]
if self.__theta == 0.0: if self.__theta == 0.0:
self.check_collocation_linearity = False self.check_collocation_linearity = False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment