Skip to content

Pyomo.DoE bugfixes #3574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion pyomo/contrib/doe/doe.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ def _sequential_FIM(self, model=None):

# Simulate the model
try:
res = self.solver.solve(model)
res = self.solver.solve(model, tee=self.tee)
pyo.assert_optimal_termination(res)
except:
# TODO: Make error message more verbose, i.e., add unknown parameter values so the
Expand Down Expand Up @@ -1119,8 +1119,17 @@ def build_block_scenarios(b, s):
pyo.ComponentUID(param, context=m.base_model).find_component_on(
b
).set_value(m.base_model.unknown_parameters[param] * (1 + diff))

# Fix experiment inputs before solve (enforce square solve)
for comp in b.experiment_inputs:
comp.fix()

res = self.solver.solve(b, tee=self.tee)

# Unfix experiment inputs after square solve
for comp in b.experiment_inputs:
comp.unfix()

model.scenario_blocks = pyo.Block(model.scenarios, rule=build_block_scenarios)

# To-Do: this might have to change if experiment inputs have
Expand Down
Loading