Skip to content

feat: Add configurable barrier update strategies for interior point m…

f69f891
Select commit
Loading
Failed to load commit list.
Merged

Add configurable barrier update strategies for interior point methods #144

feat: Add configurable barrier update strategies for interior point m…
f69f891
Select commit
Loading
Failed to load commit list.
Cursor / Cursor BugBot completed Jul 19, 2025 in 1m 58s

BugBot Review

BugBot Analysis Progress (2m 0s elapsed)

✅ Gathered PR context (1s)
✅ Analyzed code changes (1s)
✅ Completed bug detection — 1 potential bug found (1m 56s)
✅ Validation and filtering completed (0s)
✅ Posted analysis results — 1 bug reported (2s)
✅ Analysis completed successfully (0s)

Final Result: BugBot completed review and found 1 potential issue

Request ID: serverGenReqId_5ecacc66-143d-4b08-adf7-5a9762cbb0c5

Details

Bug: Incorrect Debug Output for Barrier Strategy

The debug output for the IPOPT barrier strategy incorrectly displays the threshold kappa_epsilon * mu_. The value of mu_ used in the debug message is the updated value, not the original value that was used in the condition check (error_k <= kappa_epsilon * mu_), making the output misleading.

src/cddp_core/ipddp_solver.cpp#L1867-L1881

if (error_k <= kappa_epsilon * mu_)
{
double new_mu_linear = barrier_opts.mu_update_factor * mu_;
double new_mu_superlinear = std::pow(mu_, barrier_opts.mu_update_power);
mu_ = std::max(options.tolerance / 10.0,
std::min(new_mu_linear, new_mu_superlinear));
resetFilter(context);
if (options.debug)
{
std::cout << "[IPDDP Barrier] IPOPT update: error = "
<< std::scientific << std::setprecision(2) << error_k
<< "" << kappa_epsilon << " * μ = " << kappa_epsilon * mu_
<< " → μ = " << mu_ << std::endl;
}

src/cddp_core/msipddp_solver.cpp#L2281-L2295

if (error_k <= kappa_epsilon * mu_)
{
double new_mu_linear = barrier_opts.mu_update_factor * mu_;
double new_mu_superlinear = std::pow(mu_, barrier_opts.mu_update_power);
mu_ = std::max(options.tolerance / 10.0,
std::min(new_mu_linear, new_mu_superlinear));
resetFilter(context);
if (options.debug)
{
std::cout << "[MSIPDDP Barrier] IPOPT update: error = "
<< std::scientific << std::setprecision(2) << error_k
<< "" << kappa_epsilon << " * μ = " << kappa_epsilon * mu_
<< " → μ = " << mu_ << std::endl;
}

Fix in CursorFix in Web


BugBot free trial expires on July 22, 2025
Learn more in the Cursor dashboard.

Was this report helpful? Give feedback by reacting with 👍 or 👎