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

Topic/jrl qp #26

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Topic/jrl qp #26

wants to merge 6 commits into from

Conversation

aescande
Copy link
Collaborator

This PR adds supports for the Goldfarb-Idnani solver from jrl-qp (with the latest improvements from the branch topic/BlockStructure - waiting for me to clean it and merge it into master).
Nothing special here, the solver wrapping is a mix between LSSOLLeastSquareSolver and QuadprogLeastSquareSolver.

Copy link
Member

@gergondet gergondet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me except for a few changes.

Why not include it in the CI?

###################
# - jrl-qp - #
###################
option(TVM_WITH_JRLQP "Build with Quadprog support" OFF)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong description

class TVM_DLLAPI JRLQPLSSolverFactory : public abstract::LSSolverFactory
{
public:
std::unique_ptr<abstract::LSSolverFactory> clone() const override;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clone can return std::unique_ptr<JRLQPLSSolverFactory>

@@ -16,7 +16,7 @@ public: \
}

/** Adding an option \a optionName of type \a type with no default value.
* (The default value of the underlying solver will be used.
* The default value of the underlying solver will be used.
*/
#define TVM_ADD_DEFAULT_OPTION(optionName, type) \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not related to this PR but why do TVM_ADD_NON_DEFAULT_OPTION still store things as std::optional<T> when there's no way for them not to hold a value?

Comment on lines +20 to +24
TVM_PROCESS_OPTION(maxIter, options_);
TVM_PROCESS_OPTION(warmStart, options_);
TVM_PROCESS_OPTION(logFlags, options_);
if(options.logStream())
options_.logStream(*options.logStream().value());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't we simplify this by having a jrl::qp::SolverOptions field in JRLQPLSSolverOptions?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And why separate big_number and bigBnd from jrl::qp::SolverOptions which are the same things afaik?

Comment on lines +182 to +185
if(impact.equalityConstraints_)
impact.inequalityConstraints_ = true;
if(impact.inequalityConstraints_)
impact.equalityConstraints_ = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

impact.equalityConstraints_ |= impact.inequalityConstraints_;
impact.inequalityConstraints_ = impact.equalityConstraints_;

(generates branchless code godbolt)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants