Skip to content

Commit

Permalink
manual changes
Browse files Browse the repository at this point in the history
  • Loading branch information
samgdotson committed Dec 23, 2024
1 parent f074eac commit 095b045
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions osier/models/logic_dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,19 @@ def solve(self):
if not self.curtailment and (v < 0):
if self.verbosity <= 20:
print(
'solve failed -- too much overproduction (no curtailment allowed)')
('solve failed -- '
'too much overproduction '
'(no curtailment allowed)'))
raise ValueError

self._format_results()
self._calculate_objective()
except ValueError:
if self.verbosity <= 30:
warnings.warn(
f"Infeasible or no solution. Objective set to {LARGE_NUMBER}")
(f"Infeasible or no solution."
f"Objective set to {LARGE_NUMBER}")
)
self.objective = LARGE_NUMBER

return

0 comments on commit 095b045

Please sign in to comment.