chkwon / Complementarity.jl

provides a modeling interface for mixed complementarity problems (MCP) and math programs with equilibrium problems (MPEC) via JuMP
Other
75 stars 20 forks source link

Using warm start feature of PATHSolver #32

Closed hhoeschle closed 5 years ago

hhoeschle commented 6 years ago

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

hhoeschle commented 6 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)])
chkwon commented 5 years ago

warmstart is enabled now.

hhoeschle commented 5 years ago

Very well done. I have had some first tests today and I am super happy with the time saving because of new feature.

chkwon commented 5 years ago

Glad that it worked out nicely for you. Sorry for taking long time.