-
Notifications
You must be signed in to change notification settings - Fork 0
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
adding relative & absolute mip gaps #17
Changes from 9 commits
74f7af0
0942e4e
b45861f
70bfef1
bd93b75
e129658
a7ce888
5e50c53
199ed83
a620357
982fef8
677af3f
558fe68
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,6 +81,8 @@ end | |
# solve and check output is expected for each input json file | ||
@testset "$j" for j in json_names | ||
output = JSON3.read(run_solve(read_json("inputs", j))) | ||
@info output | ||
#isdefined(Main, :Infiltrator) && Main.infiltrate(@__MODULE__, Base.@locals, @__FILE__, @__LINE__) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove comment There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh my goodness. thought i 've removed them. :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
@test output.solver_version isa String | ||
@test output.solve_time_sec isa Float64 | ||
expect = JSON3.read(read_json("outputs", j)) | ||
|
@@ -122,6 +124,10 @@ end | |
("feas_with_obj", "InvalidFormat"), | ||
# no objective function specified for a minimization problem | ||
("min_no_obj", "InvalidFormat"), | ||
# absolute_gap_tolerance out of range, e.g., -0.1 | ||
("abs_gap_out_of_range", "NotAllowed"), | ||
# relative_gap_tolerance must be within [0,1] | ||
("rel_gap_out_of_range", "NotAllowed"), | ||
# unsupported sense such as 'feasibility' | ||
("unsupported_sense", "InvalidFormat"), | ||
# range: wrong number of args | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"version":"0.1","sense":"min","variables":["x","y"],"constraints":[["and",["==",["+","x",["*",3,"y"]],1],[">=",["+","x","y"],1]],["and",["Int","x"],["Nonneg","x"]],["Int","y"]],"objectives":[["+",["*",2,"x"],"y"]],"options":{"solver":"HIGHS", "absolute_gap_tolerance":-0.1}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"version":"0.1","sense":"min","variables":["x","y"],"constraints":[["and",["==",["+","x",["*",3,"y"]],1],[">=",["+","x","y"],1]],["and",["Int","x"],["Nonneg","x"]],["Int","y"]],"objectives":[["+",["*",2,"x"],"y"]],"options":{"solver":"HIGHS", "relative_gap_tolerance":1.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.
makes a little more sense to do
and then only set
res["relative_gap"]
if it's finite.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.
thanks. good point