Skip to content

Commit

Permalink
Fixed error on passing the bounds with linear scalarisation
Browse files Browse the repository at this point in the history
  • Loading branch information
tmnp19 committed Jul 30, 2024
1 parent facf480 commit 0f8b837
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions piglot/objectives/design.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ def __composition(
reductions=[t.quantity for t in targets],
flatten_list=[t.flatten_utility for t in targets],
scalarisation=scalarisation,
bounds=[t.bounds for t in targets] if scalarisation == 'stch' else None,
types=[t.negate for t in targets] if scalarisation == 'stch' else None,
bounds=[t.bounds for t in targets] if scalarisation in ('stch', 'linear') else None,
types=[t.negate for t in targets] if scalarisation in ('stch', 'linear') else None,
)

@staticmethod
Expand Down Expand Up @@ -283,9 +283,9 @@ def _objective(self, values: np.ndarray, concurrent: bool = False) -> ObjectiveR
results,
self.scalarisation,
variances if self.stochastic else None,
[t.weight for t in self.targets] if self.scalarisation == 'stch' else None,
[t.bounds for t in self.targets] if self.scalarisation == 'stch' else None,
[t.negate for t in self.targets] if self.scalarisation == 'stch' else None,
[t.weight for t in self.targets] if self.scalarisation in ('stch', 'linear') else None,
[t.bounds for t in self.targets] if self.scalarisation in ('stch', 'linear') else None,
[t.negate for t in self.targets] if self.scalarisation in ('stch', 'linear') else None,
)

def plot_case(self, case_hash: str, options: Dict[str, Any] = None) -> List[Figure]:
Expand Down

0 comments on commit 0f8b837

Please sign in to comment.