Skip to content

Commit

Permalink
add minimal support for quadratic expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
hlefebvr committed Nov 19, 2024
1 parent d8bbe91 commit 3b13acb
Show file tree
Hide file tree
Showing 29 changed files with 617 additions and 948 deletions.
6 changes: 6 additions & 0 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,12 @@ add_library(idol STATIC
src/mixed-integer/modeling/variables/VarVersion.cpp
src/mixed-integer/modeling/constraints/CtrVersion.cpp
include/idol/mixed-integer/modeling/expressions/QuadExpr.h
include/idol/mixed-integer/modeling/constraints/QCtr.h
include/idol/mixed-integer/modeling/constraints/QCtrVersion.h
include/idol/mixed-integer/modeling/constraints/TempQCtr.h
src/mixed-integer/modeling/constraints/TempQCtr.cpp
src/mixed-integer/modeling/constraints/QCtrVersion.cpp
src/mixed-integer/modeling/constraints/QCtr.cpp
)

find_package(OpenMP REQUIRED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ class idol::Optimizers::Bilevel::MibS : public Optimizer {
void build() override;
void add(const Var &t_var) override;
void add(const Ctr &t_ctr) override;
void add(const QCtr &t_ctr) override;
void remove(const Var &t_var) override;
void remove(const Ctr &t_ctr) override;
void remove(const QCtr &t_ctr) override;
void update() override;
void write(const std::string &t_name) override;
void hook_optimize() override;
Expand Down
3 changes: 3 additions & 0 deletions lib/include/idol/general/optimizers/Optimizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ namespace idol {
class Model;
class Var;
class Ctr;
class QCtr;
class Constant;

namespace impl {
Expand Down Expand Up @@ -52,9 +53,11 @@ class idol::impl::Optimizer {

virtual void add(const Var& t_var) = 0;
virtual void add(const Ctr& t_ctr) = 0;
virtual void add(const QCtr& t_ctr) = 0;

virtual void remove(const Var& t_var) = 0;
virtual void remove(const Ctr& t_ctr) = 0;
virtual void remove(const QCtr& t_ctr) = 0;

virtual void update() = 0;

Expand Down
Loading

0 comments on commit 3b13acb

Please sign in to comment.