Created
October 19, 2022 04:04
-
-
Save upadhyan/c5a3e0f9ddd407f05c1395a79384a456 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
m = gp.Model("2SP") | |
m.ModelSense = GRB.MINIMIZE | |
m.setParam('OutputFlag', 0) # Telling gurobi to not be verbose | |
m.params.logtoconsole=0 | |
# VARIABLES | |
## First Stage Decision variable | |
x = m.addMVar((3,), vtype = GRB.INTEGER, name = "x") | |
## 2nd stage decision for each potential scenario | |
y = m.addMVar((3,K), vtype = GRB.INTEGER, name = "y") | |
### Gurobi automatically sets bounds to (0, inf) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment