gmlc-dispatches / dispatches

Primary repository for distributed dispatches software tools
https://dispatches.readthedocs.io/
Other
12 stars 34 forks source link

updated gdpopt solver call #141

Closed nareshsusarla closed 2 years ago

nareshsusarla commented 2 years ago

Addresses issue:

Updates GDPopt solver call to address latest changes to pyomo GDPopt

Summary/Motivation:

Changes proposed in this PR:

-

Legal Acknowledgement

By contributing to this software project, I agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the license terms described in the LICENSE.md and COPYRIGHT.md file at the top level of this directory.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.
codecov[bot] commented 2 years ago

Codecov Report

Merging #141 (41e2c0d) into main (81847cb) will decrease coverage by 0.03%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #141      +/-   ##
==========================================
- Coverage   93.32%   93.29%   -0.04%     
==========================================
  Files          54       54              
  Lines        5904     5877      -27     
==========================================
- Hits         5510     5483      -27     
  Misses        394      394              
Impacted Files Coverage Δ
...e/charge_design_ultra_supercritical_power_plant.py 96.53% <100.00%> (-0.04%) :arrow_down:
...ischarge_design_ultra_supercritical_power_plant.py 95.35% <100.00%> (-0.09%) :arrow_down:
..._plant/storage/tests/test_charge_usc_powerplant.py 100.00% <100.00%> (ø)
...ant/storage/tests/test_discharge_usc_powerplant.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

lbianchi-lbl commented 2 years ago

@nareshsusarla @esrawli Is this the test that's currently causing the long runtimes?

https://github.com/gmlc-dispatches/dispatches/blob/main/dispatches/case_studies/fossil_case/ultra_supercritical_plant/storage/tests/test_discharge_usc_powerplant.py#L106-L108

If so, you can do this so that it's skipped:

@pytest.skip(reason="Temporary skip after significant runtime increase with Pyomo 6.4.2")
@pytest.mark.integration
def test_usc_discharge_model(model):
    # Add missing functions to complete the discharge model (add bounds
    # and disjunctions)
    discharge_usc.add_bounds(model, power_max=power_max)
    discharge_usc.disconnect_arcs(model)
    discharge_usc.add_disjunction(model)
esrawli commented 2 years ago

We added a maximum number of iterations to the NLP solver in GDPopt to reduce the runtime of discharge test instead of skipping the function that was causing the long runtime