-
Notifications
You must be signed in to change notification settings - Fork 27
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
example9 #138
base: master
Are you sure you want to change the base?
example9 #138
Conversation
@odow, could you please check the model and tell me how I should write the model? |
Codecov Report
@@ Coverage Diff @@
## master #138 +/- ##
=======================================
Coverage 89.16% 89.16%
=======================================
Files 10 10
Lines 1449 1449
=======================================
Hits 1292 1292
Misses 157 157 Continue to review full report at Codecov.
|
|
||
# Model with doul variable | ||
# ```math | ||
# \min 40000x + 8760*(10y_1-\lambda * y_1),\\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does the 8760 come from? What is \lambda
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lambda is the dual variable of one of the constraints in the second-level problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8760 is the number of hours in the year.
that is part of the formulation in the paper. as @odow said we should add a tiny bit of context. Explaining physical meaning of variables and constraints....
@@ -0,0 +1,91 @@ | |||
# # Foundations of Bilevel Programming: Example 9 | |||
# This example is from the book Investment in Electricity Generation and Transmission. [url](https://www.springer.com/gp/book/9783319294995) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this example is more realistic, it needs a description of the physical problem. What the variables represent, etc.
Some (not all. I can do better) of the JuMP tutorials do this:
https://jump.dev/JuMP.jl/stable/tutorials/Nonlinear%20programs/space_shuttle_reentry_trajectory/
https://jump.dev/JuMP.jl/stable/tutorials/Mixed-integer%20linear%20programs/sudoku/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we need a bit of story telling, nothing complex. something like:
In this example we consider a power system with two existing generators and one being planned.
Their costs are... and existing generators have... available capacity.
The problem is to optimize the size of the new generators given that....
|
||
# Model with doul variable | ||
# ```math | ||
# \min 40000x + 8760*(10y_1-\lambda * y_1),\\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8760 is the number of hours in the year.
that is part of the formulation in the paper. as @odow said we should add a tiny bit of context. Explaining physical meaning of variables and constraints....
docs/src/examples/IEGT_example1.jl
Outdated
# y_2 \leq 150,\\ | ||
# y_3 \leq 100,\\ | ||
# y[i] \geq 0, \forall i \in I\\ | ||
# ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should go straight to model with dual
docs/src/examples/IEGT_example1.jl
Outdated
# ```math | ||
# \min 10y_1 + 12y_2 + 15y_3,\\ | ||
# \notag s.t.\\ | ||
# y_1 + y_2 + y_3 = 200,\\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# y_1 + y_2 + y_3 = 200,\\ | |
# y_1 + y_2 + y_3 = 200, \quad [\lambda]\\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still needs a better intro explaining the problem, etc.
No description provided.