JuliaGameTheoreticPlanning / ParametricMCPs.jl

Mixed complementarity problems parameterized by "runtime"-parameters with support for implicit differentiation.
MIT License
17 stars 2 forks source link

Request for Example: Warm Start the PATH Solver #16

Closed yj-Tang closed 1 year ago

yj-Tang commented 1 year ago

Hi Lasse, Thanks for sharing the package. I've been using it for a while and it works perfectly. Could you please give an example of how to warm start the solver?

lassepe commented 1 year ago

Done in https://github.com/lassepe/ParametricMCPs.jl/commit/b76df1401d3e220219efb8073b3253cb8a239a56

For reference, I have added the following comment to the README:

# You can also warm-start the solver with an initial guess.
# For example, say that we want to solve the problem at a slightly perturbed parameter value, `some_other_parameter = some_parameter .+ 0.01`.
# Here, we can warm-start the solver by passing in the old solution as an intial guess.
# This is particularly handy for online optimization as in receding-horizon applications.
some_other_parameter = some_parameter .+ 0.01
other_solution = solve(problem, some_other_parameter; initial_guess = solution.z)