Skip to content
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

Added the small batch on the gdplib #10

Merged
merged 9 commits into from
Aug 19, 2024
Merged

Added the small batch on the gdplib #10

merged 9 commits into from
Aug 19, 2024

Conversation

AlbertLee125
Copy link
Member

Added the gdp_small_batch.py on the gdp library.

Copy link
Member

@ZedongPeng ZedongPeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good and well-structured PR.

gdplib/small_batch/gdp_small_batch.py Outdated Show resolved Hide resolved
gdplib/small_batch/gdp_small_batch.py Outdated Show resolved Hide resolved
gdplib/small_batch/gdp_small_batch.py Outdated Show resolved Hide resolved
gdplib/small_batch/gdp_small_batch.py Outdated Show resolved Hide resolved
@bernalde
Copy link
Member

I will only want us to work on this PR once all the other examples from GDPLib are updated to the latest version of Pyomo.

Copy link
Member

@bernalde bernalde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is the first PR with our own newly contributed models, we need to be way more strict with the formatting. Debugging comments are no longer allowed. Only functions relevant to the model should be included (not the solution method). THe example itself is not the one found in Kocis and Grossmann, it is a simplification made for the LDSDA paper, so update the references.

gdplib/small_batch/gdp_small_batch.py Outdated Show resolved Hide resolved
gdplib/small_batch/gdp_small_batch.py Outdated Show resolved Hide resolved
gdplib/small_batch/gdp_small_batch.py Outdated Show resolved Hide resolved
gdplib/small_batch/gdp_small_batch.py Outdated Show resolved Hide resolved
gdplib/small_batch/gdp_small_batch.py Outdated Show resolved Hide resolved
gdplib/small_batch/gdp_small_batch.py Outdated Show resolved Hide resolved
Copy link
Member Author

@AlbertLee125 AlbertLee125 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I renewed the documentation of the small_batch.py and fixed it from Google format to Numpy format.

@AlbertLee125 AlbertLee125 added the documentation Improvements or additions to documentation label May 21, 2024
Copy link
Member

@bernalde bernalde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, @ZedongPeng if this code already runs with your LDSDA implementation, feel free to merge

@bernalde
Copy link
Member

Replace gam by gamma as it is the ration of Cp and Cv

@AlbertLee125
Copy link
Member Author

The spelling check is failing because of the hda files. Besides the spelling check, there are no issues with the gdp_small_batch.py and I strongly believe this is ready to be merged. And I am not sure whether we have to discuss for the format of HDA files, There are two gammas one is the gamma for the ratio of the Cv and Cp the other is the decision variables related to the absorption process.

Copy link
Member

@bernalde bernalde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a typo is my last name in the references and the master branch needs to be merged before the tests will pass.


[1] Kocis, G. R.; Grossmann, I. E. Global Optimization of Nonconvex Mixed-Integer Nonlinear Programming (MINLP) Problems in Process Synthesis. Ind. Eng. Chem. Res. 1988, 27 (8), 1407-1421. https://doi.org/10.1021/ie00080a013

[2] Ovalle, D., Liñán, D. A., Lee, A., Gómez, J. M., Ricardez-Sandoval, L., Grossmann, I. E., & Neira, D. E. B. (2024). Logic-Based Discrete-Steepest Descent: A Solution Method for Process Synthesis Generalized Disjunctive Programs. arXiv preprint arXiv:2405.05358. https://doi.org/10.48550/arXiv.2405.05358
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My last name to be cited is Bernal Neira, not Neira

gdplib/small_batch/gdp_small_batch.py Outdated Show resolved Hide resolved
@ZedongPeng ZedongPeng merged commit d00d572 into main Aug 19, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants