Add constructor kwarg set_inner_silent#180
Add constructor kwarg set_inner_silent#180sandyspiers wants to merge 1 commit intojump-dev:masterfrom
set_inner_silent#180Conversation
defaults to true
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #180 +/- ##
===========================================
- Coverage 99.92% 88.11% -11.81%
===========================================
Files 12 12
Lines 1280 1279 -1
===========================================
- Hits 1279 1127 -152
- Misses 1 152 +151 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
On second thought, I think I would prefer if there was an attribute, so that the following would work: opt = optimizer_with_attributes(
() -> MOA.Optimizer(Gurobi.Optimizer),
MOA.SilentInner() => false,
)I guess this would require moving into the optimizer_inner! function.
Is either option preferred by the maintainers? |
|
The argument option please. Otherwise I can do this tomorrow. I had assumed the inner solves are too noisy, but I guess it can hep debugging |
|
Sounds good, I am happy to stick with the argument. Are any other changes required? |
|
Oh no, I mistyped. I meant the attribute. Sorry on phone |
Adds a keyword argument
set_inner_silentto model constructor, which can be used to avoid MOA setting the inner optimizer silent.Use case: I faced this issue when using Gurobi as in the lower level optimizer, where I could not find a way to turn back on the output. It seems like any output parameters are ignored and overwritten when
optimize!is called (I guess because of Gurobi's lazy model generation?).A workaround to get the output is if you call
optimize!first, then setOutputFlag=1, then re-optimize. But this is unreasonable for large models. An example is shown below.Which has the following output:
Thanks!