Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
bf27dc5
delete the rooney_biegler_with_constraint.py and updated the test_par…
smondal13 Nov 25, 2025
5cae869
fix the `parmest/rooney_biegler.py`. Previously, it was not calling t…
smondal13 Nov 25, 2025
fb38fee
1. delete name==__main__ block in rooney_biegler.py, and correspondin…
smondal13 Nov 25, 2025
8591371
change the SSE function in `test_parmest.py`. Everything works now an…
smondal13 Nov 25, 2025
108b9b7
update parmest/ rooney_biegler, added theta in the constructor
smondal13 Nov 26, 2025
2afd819
Revert "update parmest/ rooney_biegler, added theta in the constructor"
smondal13 Nov 26, 2025
2684599
imported the parmest/rooney_biegler in the doe/greybox_test.py file,…
smondal13 Nov 26, 2025
0226681
add comments to clarify suffix purposes, and solved the cov issue for…
smondal13 Nov 26, 2025
a0242ca
add nominal theta values in doe/test_greybox.py to pass inside the ex…
smondal13 Nov 26, 2025
ce24565
add measure_error argument in rooney_biegler in test_greybox. solve…
smondal13 Dec 3, 2025
e52bafa
Merge branch 'Pyomo:main' into parmest-consolidate-rooney-biegler
smondal13 Dec 3, 2025
99f36c5
delete copies of `rooney_biegler` in `doe/examples`
smondal13 Dec 3, 2025
95b2354
remove indexing problem of y data
smondal13 Dec 3, 2025
92b8a25
Solve the parmest/datarec.rst issue.
smondal13 Dec 4, 2025
8c2709f
Delete debugging print statement
smondal13 Dec 9, 2025
89b6ff5
Merge branch 'main' into parmest-consolidate-rooney-biegler
mrmundt Dec 10, 2025
a48eeb4
Remove the commented custom SSE objective function.
smondal13 Dec 10, 2025
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
4 changes: 2 additions & 2 deletions doc/OnlineDocs/explanation/analysis/parmest/datarec.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ The following example returns model values from a Pyomo Expression.

>>> # Define objective
>>> def SSE(model):
... expr = (model.experiment_outputs[model.y[model.hour]]
... - model.y[model.hour]
... expr = (model.experiment_outputs[model.y]
... - model.y
... ) ** 2
... return expr

Expand Down
148 changes: 0 additions & 148 deletions pyomo/contrib/doe/examples/rooney_biegler_example.py

This file was deleted.

100 changes: 0 additions & 100 deletions pyomo/contrib/doe/examples/rooney_biegler_experiment.py

This file was deleted.

28 changes: 21 additions & 7 deletions pyomo/contrib/doe/tests/test_greybox.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
from pyomo.contrib.doe.examples.reactor_example import (
ReactorExperiment as FullReactorExperiment,
)
from pyomo.contrib.doe.examples.rooney_biegler_example import (
RooneyBieglerExperimentDoE,
from pyomo.contrib.parmest.examples.rooney_biegler.rooney_biegler import (
RooneyBieglerExperiment,
)

import pyomo.environ as pyo
Expand Down Expand Up @@ -304,7 +304,12 @@ def make_greybox_and_doe_objects_rooney_biegler(objective_option):
fd_method = "central"
obj_used = objective_option

experiment = RooneyBieglerExperimentDoE(data={'hour': 2, 'y': 10.3})
data = pd.DataFrame(data=[[2, 10.3]], columns=['hour', 'y'])
theta = {'asymptote': 19.143, 'rate_constant': 0.5311}

experiment = RooneyBieglerExperiment(
data=data.loc[0, :], theta=theta, measure_error=1
)

DoE_args = get_standard_args(experiment, fd_method, obj_used)
DoE_args["use_grey_box_objective"] = True
Expand All @@ -318,12 +323,13 @@ def make_greybox_and_doe_objects_rooney_biegler(objective_option):
# Add the grey box solver to DoE_args
DoE_args["grey_box_solver"] = grey_box_solver

data = [[1, 8.3], [7, 19.8]]
data = pd.DataFrame(data=[[1, 8.3], [7, 19.8]], columns=['hour', 'y'])
theta = {'asymptote': 19.143, 'rate_constant': 0.5311}
FIM_prior = np.zeros((2, 2))
# Calculate prior using existing experiments
for i in range(len(data)):
prev_experiment = RooneyBieglerExperimentDoE(
data={'hour': data[i][0], 'y': data[i][1]}
prev_experiment = RooneyBieglerExperiment(
data=data.loc[i, :], theta=theta, measure_error=1
)
doe_obj = DesignOfExperiments(
**get_standard_args(prev_experiment, fd_method, obj_used)
Expand All @@ -347,7 +353,13 @@ def make_greybox_and_doe_objects_rooney_biegler(objective_option):
# linear solvers.
bad_message = "Invalid option encountered."
cyipopt_call_working = True
if numpy_available and scipy_available and ipopt_available and cyipopt_available:
if (
numpy_available
and scipy_available
and ipopt_available
and cyipopt_available
and pandas_available
):
try:
objective_option = "determinant"
doe_object, _ = make_greybox_and_doe_objects_rooney_biegler(
Expand Down Expand Up @@ -1110,6 +1122,7 @@ def test_solve_A_optimality_trace_of_inverse(self):
@unittest.skipIf(
not cyipopt_call_working, "cyipopt is not properly accessing linear solvers"
)
@unittest.skipIf(not pandas_available, "pandas is not available")
def test_solve_E_optimality_minimum_eigenvalue(self):
# Two locally optimal design points exist
# (time, optimal objective value)
Expand Down Expand Up @@ -1151,6 +1164,7 @@ def test_solve_E_optimality_minimum_eigenvalue(self):
@unittest.skipIf(
not cyipopt_call_working, "cyipopt is not properly accessing linear solvers"
)
@unittest.skipIf(not pandas_available, "pandas is not available")
def test_solve_ME_optimality_condition_number(self):
# Two locally optimal design points exist
# (time, optimal objective value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ def main():

# Sum of squared error function
def SSE(model):
expr = (
model.experiment_outputs[model.y[model.hour]] - model.y[model.hour]
) ** 2
expr = (model.experiment_outputs[model.y] - model.y) ** 2
return expr

# Create an experiment list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ def main():

# Sum of squared error function
def SSE(model):
expr = (
model.experiment_outputs[model.y[model.hour]] - model.y[model.hour]
) ** 2
expr = (model.experiment_outputs[model.y] - model.y) ** 2
return expr

# Create an experiment list
Expand Down
Loading
Loading