Get planner from solution

support Strategy select different planner
Implements: bp watcher-planner-selector

Change-Id: I586e67f782e2965234826634ba3ff51681af4df8
This commit is contained in:
licanwei
2019-09-17 19:36:07 -07:00
parent 62020cac30
commit 0c191a2da9
3 changed files with 15 additions and 8 deletions

View File

@@ -72,7 +72,7 @@ class BaseSolution(object):
:type strategy: :py:class:`~.BaseStrategy` instance
"""
self.goal = goal
self.strategy = strategy
self._strategy = strategy
self.origin = None
self.model = None
self.efficacy = efficacy.Efficacy(self.goal, self.strategy)
@@ -85,6 +85,10 @@ class BaseSolution(object):
def efficacy_indicators(self):
return self.efficacy.indicators
@property
def strategy(self):
return self._strategy
def compute_global_efficacy(self):
"""Compute the global efficacy given a map of efficacy indicators"""
self.efficacy.compute_global_efficacy()