bool Variable::violated( Active<Constraint, Variable> *constraints, double *y, double *r) const { double rc = redCost(constraints, y); if (r) *r = rc; return violated(rc); }
bool Variable::useful( Active<Constraint, Variable> *actCon, double *y, double lpVal) const { if (!discrete()) return true; double rc = redCost(actCon, y); if (master_->optSense()->max()) return (lpVal + rc > master_->primalBound()); else return (lpVal + rc < master_->primalBound()); }
float totalCost(int numBlue, int numRed, int numWhite, float length) { return redCost(numRed) + blueCost(numBlue) + threadCost(length); //return beadCost(numBlue, numRed, numWhite) + threadCost(length); }