Closed hhoeschle closed 5 years ago
The transport test in example/mcp/transmcp.jl could be extended as follows:
w_start = Dict("seattle"=> 0, "san-diego"=>0)
@variable(m, w[i in plants] >= 0, start=w_start[i])
p_start = Dict("new-york"=>0.225, "chicago"=>0.153, "topeka"=>0.126)
@variable(m, p[j in markets] >= 0, start=p_start[j])
x_start = Dict(
("seattle","new-york")=>50,
("seattle","chicago")=>300,
("seattle","topeka")=>0,
("san-diego","new-york")=>275,
("san-diego","chicago")=>0,
("san-diego","topeka")=>275,
)
@variable(m, x[i in plants, j in markets] >= 0, start=x_start[(i,j)])
warmstart is enabled now.
Very well done. I have had some first tests today and I am super happy with the time saving because of new feature.
Glad that it worked out nicely for you. Sorry for taking long time.
@AndradeTiago has developed the possibility of using a warm start for the PATHSolver and provided the code in a pull request: https://github.com/chkwon/PATHSolver.jl/pull/25
Using the feature requires some changes to the Complementarity Package. I have setup a test and will put the changes here:
adding the start value to the type:
initialize starting value
initialize the starting value in linear index (for now i have put in the function
getBoundsLinearIndex
)retrieve the value in
_solve_path(m::Model; linear=false)
include the start value when calling the PATHSolver.solveMCP/LCP