13 #include "CoinHelperFunctions.hpp"
14 #include "CoinTime.hpp"
16 #include "CbcBranchActual.hpp"
37 using namespace Couenne;
111 std::set <exprAux *, compExpr>::iterator i;
114 domain_. current () -> resize (var_ind + 1);
116 symbolic -> getBounds (
domain_. lb (var_ind),
122 1 + symbolic -> rank (),
142 (*i) -> increaseMult ();
152 std::vector <std::pair <exprVar *, CouNumber> > &lcoeff) {
155 for (
int i=0; indexL [i] >= 0; i++)
156 lcoeff.push_back (std::pair <exprVar *, CouNumber> (
Var (indexL [i]), coeff [i]));
164 std::vector <quadElem> &qcoeff) {
167 for (
int i=0; indexI [i] >= 0; i++)
168 qcoeff.push_back (
quadElem (
Var (indexI [i]),
Var (indexJ [i]), coeff [i]));
178 int nvars =
nVars ();
189 for (
int ii = 0; ii < nvars; ii++) {
193 if (
Var (index) -> Multiplicity () <= 0) {
198 bool isInt =
Var (index) -> isDefinedInteger ();
203 if (
Var (index) -> Type () ==
AUX) {
205 std::set <int> deplist;
207 if (
Var (index) -> Image () -> DepList (deplist,
STOP_AT_AUX) != 0)
208 for (std::set <int>::iterator i = deplist.begin (); i != deplist.end (); ++i) {
219 jnlst_->Printf (Ipopt::J_VECTOR,
J_PROBLEM,
"Free (original) integers\n");
224 for (
int i=0; i<nOrigVars_ -
ndefined_; i++)
225 if ((
variables_ [i] -> isDefinedInteger ()) &&
237 jnlst_->Printf (Ipopt::J_VECTOR,
J_PROBLEM,
"numInteger [neglect non-originals]\n");
void setObjective(int indObj=0, expression *=NULL, const std::string &="min")
Add (non linear) objective function.
GlobalCutOff * pcutoff_
Pointer to a global cutoff object.
void setLastPrioSort(int givenLastPS)
void addLEConstraint(expression *, expression *=NULL)
Add constraint, .
int nVars() const
Total number of variables.
void addObjective(expression *, const std::string &="min")
Add (non linear) objective function.
std::vector< CouenneObjective * > objectives_
Objectives.
int nIntVars_
Number of discrete variables.
void fillIntegerRank() const
fill freeIntegers_ array
DepGraph * graph_
Dependence (acyclic) graph: shows dependence of all auxiliary variables on one another and on origina...
int * integerRank_
each element is true if variable is integer and, if auxiliary, depends on no integer ...
std::set< exprAux *, compExpr > * auxSet_
Expression map for comparison in standardization and to count occurrences of an auxiliary.
exprAux * addAuxiliary(expression *)
Add auxiliary variable and associate it with expression given as argument (used in standardization) ...
CouNumber getCutOff() const
Get cutoff.
CouNumber * getCutOffSol() const
Get cutoff solution.
Class to represent nonlinear constraints.
int ndefined_
Number of "defined variables" (aka "common expressions")
void addEQConstraint(expression *, expression *=NULL)
Add equality constraint .
ConstJnlstPtr Jnlst() const
Provide Journalist.
std::vector< int > numberInRank_
numberInRank_ [i] is the number of integer variables in rank i
std::vector< CouenneConstraint * > constraints_
Constraints.
expression * addVariable(bool isint=false, Domain *d=NULL)
Add original variable.
OSSmartPtr< const U > ConstPtr(const OSSmartPtr< U > &smart_ptr)
expression clone (points to another expression)
exprVar * Var(int i) const
Return pointer to i-th variable.
std::vector< exprVar * > variables_
Variables (original, auxiliary, and defined)
Domain domain_
current point and bounds;
int * numbering_
numbering of variables.
void addGEConstraint(expression *, expression *=NULL)
Add constraint, .
double CouNumber
main number type in Couenne
int nOrigVars_
Number of original variables.
void addRNGConstraint(expression *, expression *=NULL, expression *=NULL)
Add range constraint, .
JnlstPtr jnlst_
SmartPointer to the Journalist.
void indcoe2vector(int *indexL, CouNumber *coeff, std::vector< std::pair< exprVar *, CouNumber > > &lcoeff)
translates pair (indices, coefficients) into vector with pointers to variables
void fint fint fint real fint real real real real real real real real * w
const Ipopt::EJournalCategory J_PROBLEM(Ipopt::J_USER4)
Define a dynamic point+bounds, with a way to save and restore previous points+bounds through a LIFO s...