Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warm starting issue through Convex.jl ? #135

Closed
lrnv opened this issue May 26, 2021 · 1 comment
Closed

Warm starting issue through Convex.jl ? #135

lrnv opened this issue May 26, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@lrnv
Copy link

lrnv commented May 26, 2021

Hi,

On last versions of COSMO, Convex and MathOptInterface, I am trying to warm start a BigFloat problem with the solution of the same problem on standard precision, through the following code:

using Convex, COSMO
y = Variable(3);
x = [1.0,2,3];
p = minimize(Convex.norm(y - x,2) + Convex.norm(y,1));
solve!(p, () -> COSMO.Optimizer(verbose=true),warmstart=true)

# Starting objective value : -4.001e+01
# Stoping objective value : 3.7417e+00

# Now find a better value with bigfloats (or other multi-precision type)
BigType = BigFloat;
x = BigType.(x);
eps = BigType("1e-50");
set_value!(y,BigType.(Convex.evaluate(y)));
p = minimize(Convex.norm(y - x,2) + Convex.norm(y,1); numeric_type = BigFloat);
solve!(p, () -> COSMO.Optimizer{BigType}(verbose=true,eps_abs=eps,eps_rel=eps),warmstart=true)

# Starting objective value : -4.001e+01
# Stoping objective value : 3.7417e+00 (greater precision in primal and dual res)

If i omit the numeric_type = BigFloat, i have an error, see this discourse thread telling me that indeed Convex is trying to use the warm start functionality in COSMO.

But when using the right call, it seems like, from COSMO outputs, that the warm starting did not change anything: the model re-started from the same objective, primal res and dual res.

Do i need to do something else to warm start the model ?

@lrnv lrnv added the bug Something isn't working label May 26, 2021
@migarstka
Copy link
Member

I will close and refer to the discussion on discourse: https://discourse.julialang.org/t/arbitrary-precision-refinnements-with-convex-jl-cosmo-jl/61806/8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants