SCIP++ refs/heads/main
 
Loading...
Searching...
No Matches
scippp Namespace Reference

C++ wrapper for SCIP. More...

Namespaces

namespace  params
 Enum equivalent of SCIP's string parameters.
 
namespace  statistics
 Parameters to access statistics with.
 

Classes

class  ConstantCoefficient
 A class which an index operator that always returns a constant value. More...
 
class  LinExpr
 Represents a linear combination of variables plus a constant term. More...
 
class  LinIneq
 Represents a linear inequality: lhs <= expr <= rhs. More...
 
class  Model
 A SCIP optimization model. More...
 
struct  Solution
 Wrapper for a SCIP solution. More...
 
struct  Var
 Wrapper for a SCIP variable. More...
 

Enumerations

enum class  Sense { MAXIMIZE = SCIP_OBJSENSE_MAXIMIZE , MINIMIZE = SCIP_OBJSENSE_MINIMIZE }
 Optimization goal. More...
 
enum class  VarType { BINARY = SCIP_VARTYPE_BINARY , INTEGER = SCIP_VARTYPE_INTEGER , IMPL_INT = SCIP_VARTYPE_IMPLINT , CONTINUOUS = SCIP_VARTYPE_CONTINUOUS }
 Type of a variable. More...
 

Functions

std::string_view getVersion ()
 Returns the version number.
 
LinExpr operator* (double factor, LinExpr rhs)
 Scales a linear expression by a factor.
 
LinExpr operator+ (LinExpr lhs, const LinExpr &rhs)
 Creates a new linear expression as the sum of two.
 
LinExpr operator- (LinExpr lhs, const LinExpr &rhs)
 Creates the new linear expression 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.
 
LinIneq operator>= (const LinExpr &lhs, const LinExpr &rhs)
 Creates the inequality lhs >= rhs.
 

Variables

static constexpr ConstantCoefficient COEFF_ONE { 1 }
 An object which index operator always returns 1.
 
static constexpr ConstantCoefficient COEFF_ZERO { 0 }
 An object which index operator always returns 0.
 

Detailed Description

C++ wrapper for SCIP.

Enumeration Type Documentation

◆ Sense

enum class scippp::Sense
strong

Optimization goal.

Enumerator
MAXIMIZE 

Maximize.

MINIMIZE 

Minimize.

Definition at line 26 of file model.hpp.

◆ VarType

enum class scippp::VarType
strong

Type of a variable.

Since
1.0.0
Enumerator
BINARY 

Binary variable.

Since
1.0.0
INTEGER 

Integral variable.

Since
1.0.0
IMPL_INT 

Implicit integral variable.

Since
1.0.0
CONTINUOUS 

Continuous variable.

Since
1.0.0

Definition at line 11 of file var_type.hpp.

Function Documentation

◆ getVersion()

std::string_view scippp::getVersion ( )

Returns the version number.

Since
1.0.0
Returns
Version number in semver-format.

◆ operator*()

LinExpr scippp::operator* ( double factor,
LinExpr rhs )

Scales a linear expression by a factor.

Since
1.0.0
Parameters
factorto scale the expression with.
rhsexpression to scale.
Returns
scaled expression.

◆ operator+()

LinExpr scippp::operator+ ( LinExpr lhs,
const LinExpr & rhs )

Creates a new linear expression as the sum of two.

Since
1.0.0
Parameters
lhsFirst summand.
rhsSecond summand.
Returns
Sum of both expressions.

◆ operator-()

LinExpr scippp::operator- ( LinExpr lhs,
const LinExpr & rhs )

Creates the new linear expression lhs - rhs.

Since
1.0.0
Parameters
lhsminuend.
rhssubtrahend.
Returns
minuend minus subtrahend.

◆ operator<=()

LinIneq scippp::operator<= ( const LinExpr & lhs,
const LinExpr & rhs )

Creates the inequality lhs <= rhs.

Since
1.0.0
Parameters
lhsLeft-hand-side of the less-or-equal inequality.
rhsRight-hand-side of the less-or-equal inequality.
Returns
Inequality less-or-equal.

◆ operator==()

LinIneq scippp::operator== ( const LinExpr & lhs,
const LinExpr & rhs )

Creates the equality lhs == rhs.

Since
1.0.0
Parameters
lhsLeft-hand-side of the equality.
rhsRight-hand-side of the equality.
Returns
Equality inequality.

◆ operator>=()

LinIneq scippp::operator>= ( const LinExpr & lhs,
const LinExpr & rhs )

Creates the inequality lhs >= rhs.

Since
1.0.0
Parameters
lhsLeft-hand-side of the greater-or-equal inequality.
rhsRight-hand-side of the greater-or-equal inequality.
Returns
Inequality greater-or-equal.

Variable Documentation

◆ COEFF_ONE

ConstantCoefficient scippp::COEFF_ONE { 1 }
staticconstexpr

An object which index operator always returns 1.

Since
1.0.0

Definition at line 45 of file constant_coefficient.hpp.

◆ COEFF_ZERO

ConstantCoefficient scippp::COEFF_ZERO { 0 }
staticconstexpr

An object which index operator always returns 0.

Since
1.0.0

Definition at line 40 of file constant_coefficient.hpp.