jeremyomer / KidneyExchange.jl

MIT License
4 stars 2 forks source link

Errors with certain instances and parameters #25

Open WPettersson opened 5 months ago

WPettersson commented 5 months ago

Hi, it's me again :) We're doing a large survey, hence my repeated questions. I will say that this package is looking very good in the results so far, but there are a few experiments where the code throws errors.

This next issue is only evident on a small number of our instances, not on the preflib instances, so I've uploaded one of those as failing_instances.zip

If I run julia --project KEPTestBPPICEF.jl uk_2019_splitpra_bandxmatch_pra0_pdd_0.20_50_8 3 3 I get the following error

User-callback calls 427, time in user-callback 0.00 sec
Termination status : OPTIMAL
Set parameter TimeLimit to value 50
ERROR: LoadError: There should always be a fractional arc when entering this function
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] get_branching_arc(column_flow::Dict{Pair{Int64, Int64}, Float64}, pief_flow::Dict{Pair{Int64, Int64}, Float64})
   @ KidneyExchange ~/src/git/KidneyExchange.jl/src/branch&price/branch_and_price.jl:456
 [3] macro expansion
   @ ~/.julia/packages/TimerOutputs/RsWnF/src/TimerOutput.jl:237 [inlined]
 [4] branch_and_price(instance::KidneyExchange.Instance, subgraphs::KidneyExchange.Graph_copies, bp_params::BP_params, timer::TimerOutput, time_limit::Float64)
   @ KidneyExchange ~/src/git/KidneyExchange.jl/src/branch&price/branch_and_price.jl:329
 [5] macro expansion
   @ ~/.julia/packages/TimerOutputs/RsWnF/src/TimerOutput.jl:237 [inlined]
 [6] solve_with_BP(filename::String, K::Int64, L::Int64, bp_params::BP_params, timer::TimerOutput, time_limit::Float64)
   @ KidneyExchange ~/src/git/KidneyExchange.jl/src/branch&price/branch_and_price.jl:84
 [7] top-level scope
   @ ~/src/git/KidneyExchange.jl/KEPTestBPPICEF.jl:33
in expression starting at /home/wpette/src/git/KidneyExchange.jl/KEPTestBPPICEF.jl:33

Full log at https://gist.github.com/WPettersson/f6bfa5d282308511774771c8efe50b3f

Of course, there may be a concern that this is an issue with the file, so I have tested the file with k = 3 and l = 4, and the correct solution is found without error. The correct solution is also found if I try k = 3 and l = 5, but if I try k = 2 and l = 4 then the error returns.

I also tried using the KEPTestBP.jl file, and the correct solution is found with k = 3 and l = 4 (as well as other choices of parameters), which makes me think that the actual input file doesn't have problems with it.

pnavaro commented 5 months ago

Dear Ayse @aysnrarsln , do you have some time to take a look at this ?

WPettersson commented 5 months ago

I have another potential bug. I say potential because with a different input file, the error message is different, and this time it's KEPTestBP.jl that crashes yet KEPTestBPPICEF.jl runs successfully. However, I cannot rule out the actual bug being the same. Do you want me to share this extra test case?

pnavaro commented 5 months ago

Dear William, Unfortunately @jeremyomer the original author is currently on long-term leave and the errors you mentioned are beyond my abilities :-(