Fix Project.toml; generate CPLEX cuts more aggresively

master
Alinson S. Xavier 3 years ago
parent 1eee63702d
commit 323fd8de63
Signed by: isoron
GPG Key ID: 0DA8E4B9E1109DCA

@ -1,35 +1,15 @@
name = "MIPLearn"
uuid = "2b1277c3-b477-4c49-a15e-7ba350325c68"
authors = ["Alinson S Xavier <git@axavier.org>"]
version = "0.2.0"
version = "0.3.0"
[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
Cbc = "9961bab8-2fa3-5c5a-9d89-47fab24efd76"
Clp = "e2554f3b-3117-50c0-817c-e040a3ddf72d"
Conda = "8f4d0f93-b110-5947-807f-2305c1781a2d"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
CPLEX = "a076750e-1247-5638-91d2-ce28b192dca0"
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
KLU = "ef3ab10e-7fda-4108-b977-705223b18434"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
ProgressBars = "49802e3a-d2f1-5c88-81d8-b72133a6f568"
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
[compat]
JuMP = "1"
MathOptInterface = "1"
julia = "1"

@ -35,6 +35,15 @@ function collect(
# Parameter: Stop processing at the root node
CPXsetintparam(env, CPX_PARAM_NODELIM, 0)
# Parameter: Make cutting plane generation more aggresive
CPXsetintparam(env, CPX_PARAM_AGGCUTLIM, 100)
CPXsetintparam(env, CPX_PARAM_FRACCAND, 1000)
CPXsetintparam(env, CPX_PARAM_FRACCUTS, 2)
CPXsetintparam(env, CPX_PARAM_FRACPASS, 100)
CPXsetintparam(env, CPX_PARAM_GUBCOVERS, 100)
CPXsetintparam(env, CPX_PARAM_MIRCUTS, 2)
CPXsetintparam(env, CPX_PARAM_ZEROHALFCUTS, 2)
# Load problem
lp = CPXcreateprob(env, status_p, "problem")
CPXreadcopyprob(env, lp, mps_filename, "mps")
@ -79,6 +88,7 @@ function collect(
push!(cuts_rhs, cset.upper)
end
end
@info "$(length(cuts_lhs)) CPLEX cuts collected"
cuts_lhs_matrix::Matrix{Float64} = vcat(cuts_lhs'...)
# Store cuts in HDF5 file

@ -14,7 +14,9 @@ function test_cuts_blackbox_cplex()
# Read HDF5 file
h5open(h5_filename, "r+") do h5
@test size(h5["cuts_cpx_lhs"]) == (12, 104)
@test size(h5["cuts_cpx_rhs"]) == (12,)
rhs = h5["cuts_cpx_rhs"]
lhs = h5["cuts_cpx_lhs"]
ncuts = length(rhs)
@test size(lhs) == (ncuts, 104)
end
end

Loading…
Cancel
Save