SCIP++ refs/heads/main
 
Loading...
Searching...
No Matches
lin_ineq.hpp
1#pragma once
2
3#include <optional>
4#include <vector>
5
6#include "scippp/lin_expr.hpp"
7
8namespace scippp {
9
16class LinIneq {
18 double m_lhs;
20 std::optional<double> m_rhs;
22 LinExpr m_linExpr;
23 friend class Model;
24 friend LinIneq operator<=(const LinExpr& lhs, const LinExpr& rhs);
25 friend LinIneq operator==(const LinExpr& lhs, const LinExpr& rhs);
27 LinIneq() = default;
28};
29
37LinIneq operator<=(const LinExpr& lhs, const LinExpr& rhs);
38
46LinIneq operator==(const LinExpr& lhs, const LinExpr& rhs);
47
55LinIneq operator>=(const LinExpr& lhs, const LinExpr& rhs);
56
57}
Represents a linear combination of variables plus a constant term.
Definition lin_expr.hpp:13
Represents a linear inequality: lhs <= expr <= rhs.
Definition lin_ineq.hpp:16
friend LinIneq operator==(const LinExpr &lhs, const LinExpr &rhs)
Creates the equality lhs == rhs.
friend LinIneq operator<=(const LinExpr &lhs, const LinExpr &rhs)
Creates the inequality lhs <= rhs.
A SCIP optimization model.
Definition model.hpp:39
C++ wrapper for SCIP.
LinIneq operator<=(const LinExpr &lhs, const LinExpr &rhs)
Creates the inequality lhs <= rhs.
LinIneq operator>=(const LinExpr &lhs, const LinExpr &rhs)
Creates the inequality lhs >= rhs.
LinIneq operator==(const LinExpr &lhs, const LinExpr &rhs)
Creates the equality lhs == rhs.