-
Notifications
You must be signed in to change notification settings - Fork 57
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
Eliminate bounds relaxation in WaterTAP Ipopt #1162
Changes from all commits
3a0b38c
ead7792
a003f09
1634301
19a7dec
ebf38ee
a21d4c7
00dfac7
b9fa62b
e9552d9
e0e91c9
c449a2e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -658,9 +658,9 @@ def build(self): | |
self.flowsheet().time, | ||
self.diluate.length_domain, | ||
initialize=0.9, | ||
bounds=(0, 1), | ||
bounds=(0, 1 + 1e-10), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What happened without this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At least one test fails, and the solves look uglier.. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it were possible to eliminate these bounds that would probably be better. |
||
units=pyunits.dimensionless, | ||
doc="The overall current efficiency for deionizaiton", | ||
doc="The overall current efficiency for deionization", | ||
) | ||
self.recovery_mass_H2O = Var( | ||
self.flowsheet().time, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,7 +117,7 @@ def initialize(m, solver=None): | |
optarg = solver.options | ||
|
||
# initialize evaporator | ||
m.fs.evaporator.initialize_build( | ||
m.fs.evaporator.initialize( | ||
delta_temperature_in=30, delta_temperature_out=5, outlvl=idaeslog.INFO_HIGH | ||
) | ||
|
||
|
@@ -130,7 +130,7 @@ def initialize(m, solver=None): | |
|
||
# initialize condenser | ||
propagate_state(m.fs.s02) | ||
m.fs.condenser.initialize_build(heat=-m.fs.evaporator.heat_transfer.value) | ||
m.fs.condenser.initialize(heat=-m.fs.evaporator.heat_transfer.value) | ||
|
||
|
||
@pytest.mark.requires_idaes_solver | ||
|
@@ -148,7 +148,7 @@ def test_mvc(): | |
solver = get_solver() | ||
initialize(m, solver=solver) | ||
|
||
results = solver.solve(m, tee=False) | ||
results = solver.solve(m, tee=True) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we set back to False? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, because pytest suppresses the output by default, and if the test fails we always want to look at the solver logs. Which is part of the reason I left some other debugging outputs in the tests as well. I don't see any point in not having them immediately when needed. |
||
assert_optimal_termination(results) | ||
|
||
m.fs.compressor.report() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we tested this as a global default? Or does that break many flowsheets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not tested it extensively. I think I will explore it as a next step.
Ipopt will increase this automatically if it thinks it's "needed", so an in-between would be to set
ma27_pivtolmax
higher than the current default of1e-04
.