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

Flux constraints JuMP #14

Merged
merged 75 commits into from
Feb 1, 2024
Merged

Flux constraints JuMP #14

merged 75 commits into from
Feb 1, 2024

Conversation

andrewrosemberg
Copy link
Owner

@andrewrosemberg andrewrosemberg commented Jan 12, 2024

(WIP: WORK IN PROGRESS)

Description:

This pull request introduces several key enhancements focusing on enabling the use of neural networks within JuMP constraints and enhancing the handling of two-stage Mixed-Integer Linear Programming (MILP) problems.

Neural Network Integration:

Added a new function dispatch to facilitate the use of neural networks within JuMP constraints.
Specifically adapted the "relu" layer to ensure compatibility with the requirements.

https://github.com/andrewrosemberg/L2O.jl/blob/bf6384cfe56cf1e40462a1065bf51ae63c0b36e5/examples/unitcommitment/unitcommitment.jl#L297-L302

Two-Stage MILP Separation:

Implemented code to effectively separate any MILP problem into a two-stage problem.
Introduced two JuMP objects to represent the two stages of the MILP problem, providing greater flexibility in problem formulation.

https://github.com/andrewrosemberg/L2O.jl/blob/bf6384cfe56cf1e40462a1065bf51ae63c0b36e5/src/cutting_planes.jl#L88-L94

https://github.com/andrewrosemberg/L2O.jl/blob/ar/flux_constraints/src/cutting_planes.jl

Cutting Planes Approach:

Developed code to implement a cutting planes approach for solving the two-stage MILP.
This approach aims to enhance the optimization process by iteratively adding valid cutting planes to tighten the feasible region.

https://github.com/andrewrosemberg/L2O.jl/blob/bf6384cfe56cf1e40462a1065bf51ae63c0b36e5/src/cutting_planes.jl#L177

https://github.com/andrewrosemberg/L2O.jl/blob/ar/flux_constraints/src/cutting_planes.jl

ICNN Fitting:

Introduced code to fit an ICNN to the second stage of a problem created using UnitCommitment.jl.

https://github.com/andrewrosemberg/L2O.jl/blob/bf6384cfe56cf1e40462a1065bf51ae63c0b36e5/examples/unitcommitment/unitcommitment.jl#L217-L232

@andrewrosemberg andrewrosemberg changed the title Flux constraints JuMP WIP: Flux constraints JuMP Jan 12, 2024
Copy link

codecov bot commented Jan 29, 2024

Codecov Report

Attention: 176 lines in your changes are missing coverage. Please review.

Comparison is base (ef6c2fd) 97.54% compared to head (bde9270) 60.89%.
Report is 3 commits behind head on main.

Files Patch % Lines
src/cutting_planes.jl 0.00% 160 Missing ⚠️
src/FullyConnected.jl 16.66% 10 Missing ⚠️
src/metrics.jl 0.00% 4 Missing ⚠️
src/datasetgen.jl 81.81% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #14       +/-   ##
===========================================
- Coverage   97.54%   60.89%   -36.65%     
===========================================
  Files           7       10        +3     
  Lines         285      468      +183     
===========================================
+ Hits          278      285        +7     
- Misses          7      183      +176     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andrewrosemberg andrewrosemberg changed the title WIP: Flux constraints JuMP Flux constraints JuMP Feb 1, 2024
@andrewrosemberg andrewrosemberg merged commit 11465f3 into main Feb 1, 2024
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant