Skip to content

Commit c322268

Browse files
committed
black
1 parent 9e07d35 commit c322268

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/omlt/linear_tree/lt_definition.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def unscaled_input_bounds(self):
111111
def is_scaled(self):
112112
"""Returns bool indicating whether model is scaled"""
113113
return self.__is_scaled
114+
114115
@property
115116
def splits(self):
116117
"""Returns dict containing split information."""

src/omlt/linear_tree/lt_formulation.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ def _build_formulation(self):
9999
self.model_definition.scaled_input_bounds,
100100
)
101101

102-
input_vars=self.block.scaled_inputs
102+
input_vars = self.block.scaled_inputs
103103
if self.model_definition.is_scaled is True:
104104
output_vars = self.block.scaled_outputs
105105
else:
106106
output_vars = self.block.outputs
107-
107+
108108
_add_gdp_formulation_to_block(
109109
block=self.block,
110110
model_definition=self.model_definition,
@@ -307,7 +307,9 @@ def _add_gdp_formulation_to_block( # noqa: PLR0913
307307
# Use the input_bounds and the linear models in the leaves to calculate
308308
# the lower and upper bounds on the output variable. Required for Pyomo.GDP
309309
scaled_output_bounds = _build_output_bounds(model_definition, scaled_input_bounds)
310-
unscaled_output_bounds = _build_output_bounds(model_definition, unscaled_input_bounds)
310+
unscaled_output_bounds = _build_output_bounds(
311+
model_definition, unscaled_input_bounds
312+
)
311313

312314
# Ouptuts are automatically scaled based on whether inputs are scaled
313315
block.outputs.setub(unscaled_output_bounds[1])

0 commit comments

Comments
 (0)