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

example9 #138

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

example9 #138

wants to merge 5 commits into from

Conversation

HesamShaelaie
Copy link
Collaborator

No description provided.

@HesamShaelaie
Copy link
Collaborator Author

@odow, could you please check the model and tell me how I should write the model?
I have put time into it and come with something, but I am not sure if it is correct.

@codecov
Copy link

codecov bot commented Jun 27, 2021

Codecov Report

Merging #138 (f621f4d) into master (4bdf3e2) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4bdf3e2...f621f4d. Read the comment docs.

docs/src/examples/IEGT_example1.jl Outdated Show resolved Hide resolved
docs/src/examples/IEGT_example1.jl Show resolved Hide resolved

# Model with doul variable
# ```math
# \min 40000x + 8760*(10y_1-\lambda * y_1),\\
Copy link
Collaborator

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?

Copy link
Collaborator Author

@HesamShaelaie HesamShaelaie Jun 27, 2021

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.

Copy link
Owner

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)
Copy link
Collaborator

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/

Copy link
Owner

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),\\
Copy link
Owner

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....

# y_2 \leq 150,\\
# y_3 \leq 100,\\
# y[i] \geq 0, \forall i \in I\\
# ```
Copy link
Owner

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 Show resolved Hide resolved
# ```math
# \min 10y_1 + 12y_2 + 15y_3,\\
# \notag s.t.\\
# y_1 + y_2 + y_3 = 200,\\
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# y_1 + y_2 + y_3 = 200,\\
# y_1 + y_2 + y_3 = 200, \quad [\lambda]\\

Copy link
Collaborator

@odow odow left a 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.

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.

3 participants