Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
eirikurj committed Dec 8, 2023
1 parent 5535829 commit 5bedf92
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyoptsparse/pySNOPT/pySNOPT.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,11 @@ def __call__(
sol_inform["text"] = self.informs[inform]

# Create the optimization solution
if parse_version(self.version) > parse_version("7.7.0") and parse_version(self.version) < parse_version("7.7.7"):
if parse_version(self.version) > parse_version("7.7.0") and parse_version(self.version) < parse_version(
"7.7.7"
):
# SNOPT obj value is buggy and returned as 0, its thus overwritten with the solution objective value
obj = np.array([obj.value*obj.scale for obj in self.optProb.objectives.values()])
obj = np.array([obj.value * obj.scale for obj in self.optProb.objectives.values()])

sol = self._createSolution(optTime, sol_inform, obj, xs[:nvar], multipliers=pi)
restartDict = {
Expand Down

0 comments on commit 5bedf92

Please sign in to comment.