idaes-pse
idaes-pse copied to clipboard
Fixing Modifying graph elements in the flowsheet
Fixes
#913
Summary/Motivation:
Cleaning up the logic of merging updates between an old flowsheet and an new one in FlowsheetDiff
Changes proposed in this PR:
Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution:
- I agree my contributions are submitted under the license terms described in the LICENSE.txt file at the top level of this directory.
- 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 Report
Merging #915 (6f4a40c) into main (5f87d78) will decrease coverage by
0.00%
. The diff coverage is70.37%
.
@@ Coverage Diff @@
## main #915 +/- ##
==========================================
- Coverage 70.20% 70.19% -0.01%
==========================================
Files 574 574
Lines 64296 64285 -11
Branches 12127 12127
==========================================
- Hits 45141 45128 -13
+ Misses 16860 16859 -1
- Partials 2295 2298 +3
Impacted Files | Coverage Δ | |
---|---|---|
idaes/core/ui/flowsheet.py | 84.06% <70.37%> (-0.17%) |
:arrow_down: |
idaes/ver.py | 61.53% <0.00%> (-4.62%) |
:arrow_down: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
It works! -- but with a couple of little issues. What I did was to the F101, F102 sequence in the example notebook without deleting the saved file in between. That worked quite well. Then I added this code to delete the F102 unit again:
del m.fs.s10
del m.fs.purity, m.fs.heating_cost
del m.fs.F102
TransformationFactory("network.expand_arcs").apply_to(m)
_ = vistut.initialize_model(m)
And when I hit refresh, voila, F102 goes away. There were some minor display issues though:
- I had toggled "show stream names" off, but when I refreshed the stream names showed up again; I had to toggle on/off to re-remove them
- The labels of units that I had rotated showed as rotated until I went and re-rotated them (at which point they corrected), for example:
After re-adding and re-removing F102, it still works (with above minor bugs).
@dangunter will review