Get planner from solution
support Strategy select different planner Implements: bp watcher-planner-selector Change-Id: I586e67f782e2965234826634ba3ff51681af4df8
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user