gdplib
An open library of Generalized Disjunctive Programming (GDP) models
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.8%) to scientific vocabulary
Repository
An open library of Generalized Disjunctive Programming (GDP) models
Basic Info
- Host: GitHub
- Owner: SECQUOIA
- License: bsd-3-clause
- Language: Python
- Default Branch: main
- Size: 1.21 MB
Statistics
- Stars: 11
- Watchers: 2
- Forks: 9
- Open Issues: 34
- Releases: 0
Metadata Files
README.md
GDPlib
We envision GDPlib as an open library of GDP models to provide examples for prospective modelers, and to provide a benchmarking set for algorithm developers. We invite contributions to this library from the community, provided under the same BSD-3-clause or compatible license.
Installation
GDPlib is an installable model library in Python. To install GDPlib, you can use:
pip install gdplib
To update GDPlib:
pip install --upgrade gdplib
For a developer install, please clone this repository, activate the correct python environment, and run:
bash
pip install -r requirements.txt
pip install -e .
Development Setup
For development work with enhanced Copilot integration:
Install development dependencies:
bash pip install -r requirements-dev.txtSet up GitHub Copilot with custom instructions:
- The repository includes custom Copilot instructions in
.github/copilot-instructions.md - Project-specific configurations are available in
.copilot/
- The repository includes custom Copilot instructions in
Run tests:
bash pytest tests/Code formatting and linting:
bash black gdplib/ flake8 gdplib/
Model descriptions
Details for each model are given in a separate README.md file in each directory. Navigate to these directories to read the files.
Using this library
Once GDPlib is installed, functions for constructing the desired models can be imported from each of the main subpackages.
For example, biofuel/__init__.py exposes a build_model function, allowing the user to write the following:
python
from gdplib.biofuel import build_model as build_biofuel_model
pyomo_model = build_biofuel_model()
Adding models to the library
To add new models to the library, the following steps should be taken:
- Ensure that you have the requisite permissions to contribute the model to an open source library.
- Add your files into one of the existing directories or a new project directory:
gdplib/mynewmodel. - If a new directory is created, add the corresponding import to
gdplib/__init__.py. - Within your project directory, add the requisite imports and edits to the
__all__statement ingdplib/mynewmodel/__init__.pyto expose the appropriate build functions. See the other project directories for examples. - Within your project directory, create a
README.mdfile describing the new model.
Directories are free to implement their own subpackages.
Relative vs. absolute imports
Note that __main__ scripts within projects (i.e. those that you plan to execute directly) will need to use absolute imports rather than relative imports.
For example, in gdplib/gdp_col/main.py, we need to write from gdplib.gdp_col.fenske import calculate_Fenske rather than from .fenske import calculate_Fenske.
Owner
- Name: SECQUOIA
- Login: SECQUOIA
- Kind: organization
- Location: United States of America
- Repositories: 1
- Profile: https://github.com/SECQUOIA
The Systems Engineering Classical and Quantum Optimization for Industrial Applications (SECQUOIA) research group at Purdue University.
Citation (CITATION.cff)
cff-version: 1.0.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Bernal Neira
given-names: David E.
orcid: https://orcid.org/0000-0002-8308-5016
- family-names: Peng
given-names: Zedong
orcid: https://orcid.org/0000-0001-6001-1738
- family-names: Chen
given-names: Qi
orcid: https://orcid.org/0000-0002-2389-2238
- family-names: Liu
given-names: Yunshan
- family-names: Johnson
given-names: Emma
orcid: https://orcid.org/0000-0002-4285-5184
title: "GDPLib: an open library of Generalized Disjunctive Programming (GDP) models"
version: 1.0.0
url: https://github.com/SECQUOIA/gdplib
license-url: https://github.com/SECQUOIA/gdplib/blob/master/LICENSE
preferred-citation:
type: incollection
booktitle: "Computer Aided Chemical Engineering"
volume: 49
start: 1285
end: 1290
title: "Advances in Generalized Disjunctive and Mixed-Integer Nonlinear Programming Algorithms and Software for Superstructure Optimization"
year:2022
publisher: "Elsevier"
authors:
- family-names: "Bernal Neira"
given-names: "David E."
- family-names: "Liu"
given-names: "Yunshan"
- family-names: "Bynum"
given-names: "Michael L"
- family-names: "Laird"
given-names: "Carl D"
- family-names: "Siirola"
given-names: "John D"
- family-names: "Grossmann"
given-names: "Ignacio E"
GitHub Events
Total
- Issues event: 18
- Watch event: 2
- Delete event: 1
- Issue comment event: 41
- Push event: 98
- Pull request event: 28
- Pull request review event: 38
- Pull request review comment event: 78
- Fork event: 2
- Create event: 17
Last Year
- Issues event: 18
- Watch event: 2
- Delete event: 1
- Issue comment event: 41
- Push event: 98
- Pull request event: 28
- Pull request review event: 38
- Pull request review comment event: 78
- Fork event: 2
- Create event: 17
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 1
- Total pull requests: 16
- Average time to close issues: N/A
- Average time to close pull requests: 22 days
- Total issue authors: 1
- Total pull request authors: 4
- Average comments per issue: 0.0
- Average comments per pull request: 1.88
- Merged pull requests: 11
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 16
- Average time to close issues: N/A
- Average time to close pull requests: 22 days
- Issue authors: 1
- Pull request authors: 4
- Average comments per issue: 0.0
- Average comments per pull request: 1.88
- Merged pull requests: 11
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- tristantc (15)
- ZedongPeng (12)
- bernalde (2)
Pull Request Authors
- AlbertLee125 (20)
- ZedongPeng (9)
- bernalde (9)
- tristantc (6)
- Copilot (2)
- parkyr (2)
- Yunshan-Liu (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- Pyomo >=5.6.1
- matplotlib >=2.2.2
- pandas >=1.0.1
- setuptools >=39.0.1