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

add additional example - factory schedule MILP #1948

Open
wants to merge 6 commits into
base: master
from

Conversation

@Crghilardi
Copy link

commented Apr 26, 2019

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:

  1. I originally wrote this using Cbc. I did not see Cbc listed in the Project.TOML and was not sure what the standards were on solver dependencies in testing, so I changed it to GLPK as other examples

  2. This adds 2 data CSV files to the /data folder. Again, didn't want to mess with adding anything so I switched to using DelimitedFiles for reading in data rather than CSV

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

This has been tested locally with --project=examples run_examples.jl and I get all tests passed on my machine (72/72)

@odow
Copy link
Member

left a comment

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.

examples/milp_factory_schedule.jl Outdated Show resolved Hide resolved
examples/milp_factory_schedule.jl Outdated Show resolved Hide resolved
examples/milp_factory_schedule.jl Outdated Show resolved Hide resolved
examples/milp_factory_schedule.jl Outdated Show resolved Hide resolved
examples/milp_factory_schedule.jl Outdated Show resolved Hide resolved
examples/milp_factory_schedule.jl Outdated Show resolved Hide resolved
@codecov

This comment has been minimized.

Copy link

commented Apr 28, 2019

Codecov Report

Merging #1948 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

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

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

@codecov

This comment has been minimized.

Copy link

commented Apr 28, 2019

Codecov Report

Merging #1948 into master will increase coverage by 0.32%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/objective.jl 90.9% <0%> (-4.33%) ⬇️
src/quad_expr.jl 92.66% <0%> (-0.54%) ⬇️
src/parse_expr.jl 88.09% <0%> (-0.07%) ⬇️
src/_Derivatives/subexpressions.jl 100% <0%> (ø) ⬆️
src/macros.jl 93.27% <0%> (+0.26%) ⬆️
src/aff_expr.jl 88.54% <0%> (+0.26%) ⬆️
src/parse_nlp.jl 90.72% <0%> (+0.66%) ⬆️
src/nlp.jl 91.93% <0%> (+0.67%) ⬆️
src/operators.jl 86.89% <0%> (+2.9%) ⬆️
src/optimizer_interface.jl 81.81% <0%> (+4.89%) ⬆️

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 94e2cbb...ad23b30. Read the comment docs.

@odow
Copy link
Member

left a comment

Looking good. Just a few minor style comments.

examples/milp_factory_schedule.jl Outdated Show resolved Hide resolved
examples/milp_factory_schedule.jl Outdated Show resolved Hide resolved
examples/milp_factory_schedule.jl Outdated Show resolved Hide resolved
examples/milp_factory_schedule.jl Outdated Show resolved Hide resolved
examples/milp_factory_schedule.jl Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.