libmpc icon indicating copy to clipboard operation
libmpc copied to clipboard

Should a negative cost ever occur?

Open pwintz opened this issue 10 months ago • 1 comments

I'm running into a surprising case where the cost is sometimes evaluated to be negative if the optimization algorithm fails to converge to a solution. Is this expected?

[MPC++] Optimization step completed
duration: 340.145 (sec)
status: 1 (opt code: -2)
cost: -1500.16
Scarab: inject roi stats dump end marker
Optimizer Info
         Return code: -2
       Result status: 1
Number of iterations: 800
                Cost: -1500.16
    Constraint error: 0.445752
          Dual error: 0.140763

pwintz avatar Apr 11 '24 04:04 pwintz

Hey @pwintz can you provide some context? Kind of problem you are solving, parameters, etc.

nicolapiccinelli avatar Apr 11 '24 08:04 nicolapiccinelli