Commit 6cdb1ac6 authored by Leonardo Rochael Almeida's avatar Leonardo Rochael Almeida Committed by Julien Muchembled

AcceptSolver/AdoptSolver: do not lose information when grouped

A TargetSolver might have its configuration updated multiple times, if the same
solver type was chosen for different divergences (solver_decisions).

We must take care not to overwrite configuration from earlier updates with the
data from later ones.
parent add8d9dc
...@@ -88,6 +88,19 @@ class ConfigurablePropertySolverMixin(SolverMixin, ...@@ -88,6 +88,19 @@ class ConfigurablePropertySolverMixin(SolverMixin,
, PropertySheet.TargetSolver , PropertySheet.TargetSolver
) )
def updateConfiguration(self, **kw):
# This method is called once for each 'Solver Decision' of a
# 'Solver Process' that maps into this solver for the same
# Simulation Movement, so we need to take care not to lose
# information by overwriting.
configuration = self._getConfigurationPropertyDict()
tested_property_list = configuration.get('tested_property_list')
if tested_property_list is not None:
tested_property_set = set(tested_property_list)
tested_property_set.update(kw.get('tested_property_list', ()))
kw['tested_property_list'] = list(tested_property_set)
super(ConfigurablePropertySolverMixin, self).updateConfiguration(**kw)
def getTestedPropertyList(self): def getTestedPropertyList(self):
configuration_dict = self.getConfigurationPropertyDict() configuration_dict = self.getConfigurationPropertyDict()
tested_property_list = configuration_dict.get('tested_property_list') tested_property_list = configuration_dict.get('tested_property_list')
......
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