Skip to content

0 iteration while R2 is used as a subsolver in R2N #322

@BenjaminPINEAU

Description

@BenjaminPINEAU

In some configuration, while R2 is used as a subsolver (in R2N in my case), the log display 0 iteration for R2 (see the screenshot). Nonetheless, one proximal step is compute : prox!(s, ψ, mν∇fk, ν) and done = stats.status != :unknown is True. Then the subsolver do not enter the loop but the incrementation of the iteration number is done in this loop.
In this case, display inner = 0 is quite ambiguous because R2 does indeed perform a prox calculation. Maybe we can increment the number of iteration after the first proximal step calculation ?
Please find attached a simple exemple to reproduce the issue and a screenshot associated.

# Initialization
x0 = [-1.0, 2.0]

# Create a simple regularized optimization problem
f =  x -> (1 - x[1])^2 + 100*(x[2] - x[1]^2)^2
f_model = ADNLPModel(f, x0)
h = NormL1(1.0)
f_model_lsr1 = LSR1Model(f_model)
regularized_pb_lsr1 = RegularizedNLPModel(f_model_lsr1, h)

# Solve the problem
solver = R2NSolver(regularized_pb_lsr1)
stats = RegularizedExecutionStats(regularized_pb_lsr1)
RegularizedOptimization.solve!(solver, regularized_pb_lsr1, stats, verbose = 1, atol = 1e-6, rtol = 1e-6)
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions