13#ifndef MINOTAURCONSTRAINT_H
14#define MINOTAURCONSTRAINT_H
24typedef std::set<std::pair<VariablePtr, FunctionType>>::const_iterator
94 double getActivity(
const double* x,
int* error)
const;
144 const std::string getName()
const;
185 void setUB(
double newub)
223 void write(std::ostream& out)
const;
227 void add_(
double cb);
Get information about a Function.
Declare important 'types' used in Minotaur.
Define the Variable class.
The Constraint class is used to manage a constraint.
Definition: Constraint.h:61
NonlinearFunctionPtr getNonlinearFunction() const
Get the nonlinear part of the constraint function 'f'.
Definition: Constraint.cpp:111
void setBFlag(bool b)
Set the value of the bool flag.
Definition: Constraint.h:206
ConsSrcType getSrcType() const
Get the src type of the constraint.
Definition: Constraint.h:159
void setIndex_(UInt n)
Set the index.
Definition: Constraint.h:255
FunctionPtr getFunction() const
Return a pointer to the function.
Definition: Constraint.h:114
void setUb_(double newub)
Set a new upper bound.
Definition: Constraint.h:287
ConsState getState() const
Get the current state of the constraint: freed, fixed etc.
Definition: Constraint.h:153
void subst_(VariablePtr out, VariablePtr in, double rat, bool *instay)
Substitute a variable by .
Definition: Constraint.cpp:134
double getLb() const
Get the 'l' value. or the lower bound constraint on 'f'.
Definition: Constraint.h:135
void changeNlf_(NonlinearFunctionPtr nlf)
Change the nonlinear part of constraint.
Definition: Constraint.cpp:70
LinearFunctionPtr getLinearFunction() const
Get the linear part of the constraint function 'f'.
Definition: Constraint.cpp:101
void write(std::ostream &out) const
display the constraint
Definition: Constraint.cpp:144
void setId_(UInt n)
Set the id.
Definition: Constraint.h:249
double getActivity(const double *x, int *error) const
Get the value or activity at a given point.
Definition: Constraint.cpp:91
bool getBFlag() const
Get the value of the bool flag.
Definition: Constraint.h:97
FunctionType getFunctionType() const
Get the function type.
Definition: Constraint.cpp:96
void setSrcType(ConsSrcType src)
Set src type.
Definition: Constraint.h:212
UInt getIndex() const
Return the index of the constraint.
Definition: Constraint.h:129
void delFixedVar_(VariablePtr v, double val)
Delete variables fixed at value val.
Definition: Constraint.cpp:75
Constraint()
Default constructor.
Definition: Constraint.cpp:23
double getUb() const
Get the 'u' value. or the upper bound constraint on 'f'.
Definition: Constraint.h:170
void setName_(std::string name)
Set name of the constraint.
Definition: Constraint.cpp:129
void setLb_(double newlb)
Set a new lower bound.
Definition: Constraint.h:266
UInt getId() const
Return the unique id of the constraint.
Definition: Constraint.h:123
void add_(double cb)
Add a constant to the constraint function. lb - c <= f <= ub - c.
Definition: Constraint.cpp:59
void reverseSense_()
Negate the constraint.
Definition: Constraint.cpp:121
void changeLf_(LinearFunctionPtr lf)
Change the linear part of constraint.
Definition: Constraint.cpp:65
QuadraticFunctionPtr getQuadraticFunction() const
Get the quadratic part of the constraint function 'f'.
Definition: Constraint.cpp:116
virtual ~Constraint()
Destroy.
Definition: Constraint.cpp:52
void setState_(ConsState state)
Set state of the constraint.
Definition: Constraint.h:275
Definition: Function.h:37
The base class linear function is of the form c'x.
Definition: LinearFunction.h:31
Base class for nonlinear functions.
Definition: NonlinearFunction.h:31
Definition: PerspCon.h:81
Handler for convex constraints, based on quesada-grossmann algorithm.
Definition: QGHandler.h:45
Definition: QuadraticFunction.h:38
Definition: TransSep.h:40
Definition: Variable.h:31
Definition: ActiveNodeStore.h:20
ConsSrcType
Where did the constraint originate from?
Definition: Types.h:94
unsigned int UInt
Unsigned integer.
Definition: Types.h:30
Convexity
Convexity of a function or a constraint.
Definition: Types.h:244
ConsType
Definition: Types.h:104
FunctionType
Different types of functions in Minotaur.
Definition: Types.h:65
ConsState
Different states a constraint can be in.
Definition: Types.h:145