Skip to content

Commit

Permalink
Fix setUpperBound and updateUpperBound in osqp plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro authored Nov 12, 2024
1 parent 1d05b8d commit 89be072
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/osqp/QpSolversEigenOsqp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ bool ProxqpSolver::updateLowerBound(const Eigen::Ref<const Eigen::Matrix<double,
bool ProxqpSolver::updateUpperBound(const Eigen::Ref<const Eigen::Matrix<double, Eigen::Dynamic, 1>>& upperBound)
{
bool ok = convertQpSolversEigenInftyToOsqpEigenInfty(upperBound, upperBoundBufferWithOsqpEigenInfty);
return ok && osqpEigenSolver.updateUpperBound(lowerBoundBufferWithOsqpEigenInfty);
return ok && osqpEigenSolver.updateUpperBound(upperBoundBufferWithOsqpEigenInfty);
}

bool ProxqpSolver::updateBounds(const Eigen::Ref<const Eigen::Matrix<double, Eigen::Dynamic, 1>>& lowerBound,
Expand Down Expand Up @@ -292,7 +292,7 @@ bool ProxqpSolver::setLowerBound(Eigen::Ref<Eigen::Matrix<double, Eigen::Dynamic
bool ProxqpSolver::setUpperBound(Eigen::Ref<Eigen::Matrix<double, Eigen::Dynamic, 1>> upperBoundVector)
{
bool ok = convertQpSolversEigenInftyToOsqpEigenInfty(upperBoundVector, upperBoundBufferWithOsqpEigenInfty);
return osqpEigenSolver.data()->setUpperBound(upperBoundVector);
return osqpEigenSolver.data()->setUpperBound(upperBoundBufferWithOsqpEigenInfty);
}

bool ProxqpSolver::setBounds(Eigen::Ref<Eigen::Matrix<double, Eigen::Dynamic, 1>> lowerBound,
Expand Down Expand Up @@ -426,4 +426,4 @@ SolverInterface* ProxqpSolver::allocateInstance() const
return new ProxqpSolver();
}

}
}

0 comments on commit 89be072

Please sign in to comment.