-
-
Notifications
You must be signed in to change notification settings - Fork 396
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
add additional example - factory schedule MILP #1948
Conversation
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.
Can you copy the structure of the other examples and place everything in a function please? Make sure to add a doctoring to the function describing what the example is and where it is from.
Codecov Report
@@ Coverage Diff @@
## master #1948 +/- ##
=======================================
Coverage 91.17% 91.17%
=======================================
Files 33 33
Lines 4147 4147
=======================================
Hits 3781 3781
Misses 366 366 Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #1948 +/- ##
=========================================
+ Coverage 91.17% 91.5% +0.32%
=========================================
Files 33 33
Lines 4147 4212 +65
=========================================
+ Hits 3781 3854 +73
+ Misses 366 358 -8
Continue to review full report at Codecov.
|
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.
Looking good. Just a few minor style comments.
#Factory B is shut down during month 5, so production and status are both zero. | ||
@constraints(model, begin | ||
status[5, :B] == 0 | ||
production[5, :B]==0 |
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.
production[5, :B] == 0
I have not looked at this in over a year. I am going to close this PR and submit a new one that is properly branched instead of on master (and fix that space issue...). My fork is so far behind I am having trouble getting everything working again XD |
After getting help on this discourse thread, I wanted to submit the finished problem as a 0.19 ready example.
This pull request adds an additional complete MILP example problem.
Notes:
I originally wrote this using
Cbc
. I did not seeCbc
listed in theProject.TOML
and was not sure what the standards were on solver dependencies in testing, so I changed it toGLPK
as other examplesThis adds 2 data CSV files to the
/data
folder. Again, didn't want to mess with adding anything so I switched to usingDelimitedFiles
for reading in data rather thanCSV
For file naming I just used
problemtype_name.jl
, not sure if there is a standard. While clicking through the example folder while working through the problem, I thought more explicit names would be helpful FWIWThis has been tested locally with
--project=examples run_examples.jl
and I get all tests passed on my machine (72/72)