Skip to content

Commit 2f0e57a

Browse files
committed
Addressed feedback, ran black.
1 parent 7ffbf48 commit 2f0e57a

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

Diff for: pyomo/contrib/doe/doe.py

+3-11
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
import inspect
4444

45-
import pyomo.contrib.parmest.utils as utils
45+
from pyomo.common import DeveloperError
4646

4747

4848
class CalculationMode(Enum):
@@ -457,11 +457,6 @@ def _sequential_finite(self, read_output, extract_single_model, store_output):
457457
# add zero (dummy/placeholder) objective function
458458
mod.Obj = pyo.Objective(expr=0, sense=pyo.minimize)
459459

460-
# convert params to vars
461-
# print("self.param.keys():", self.param.keys())
462-
# mod = utils.convert_params_to_vars(mod, self.param.keys(), fix_vars=True)
463-
# mod.pprint()
464-
465460
# solve model
466461
square_result = self._solve_doe(mod, fix=True)
467462

@@ -545,9 +540,6 @@ def _direct_kaug(self):
545540
# add zero (dummy/placeholder) objective function
546541
mod.Obj = pyo.Objective(expr=0, sense=pyo.minimize)
547542

548-
# convert params to vars
549-
# mod = utils.convert_params_to_vars(mod, self.param.keys(), fix_vars=True)
550-
551543
# set ub and lb to parameters
552544
for par in self.param.keys():
553545
cuid = pyo.ComponentUID(par)
@@ -1294,8 +1286,8 @@ def trace_calc(m):
12941286
return m.trace == sum(m.fim[j, j] for j in m.regression_parameters)
12951287

12961288
def det_general(m):
1297-
"""Calculate determinant. Can be applied to FIM of any size.
1298-
det(A) = sum_{sigma in Sn} (sgn(sigma) * Prod_{i=1}^n a_{i,sigma_i})
1289+
r"""Calculate determinant. Can be applied to FIM of any size.
1290+
det(A) = \sum_{\sigma in \S_n} (sgn(\sigma) * \Prod_{i=1}^n a_{i,\sigma_i})
12991291
Use permutation() to get permutations, sgn() to get signature
13001292
"""
13011293
r_list = list(range(len(m.regression_parameters)))

0 commit comments

Comments
 (0)