Commit 5c8ab611 authored by David Bommes's avatar David Bommes

added one linear inequality constraint to example small_miq

git-svn-id: http://www.openflipper.org/svnrepo/CoMISo/trunk@132 1355f012-dd97-4b2f-ae87-10fa9f823a57
parent 1484741c
......@@ -122,6 +122,12 @@ int main(void)
std::cout << "---------- 4) setup constraints..." << std::endl;
std::vector<COMISO::NConstraintInterface*> constraints;
// setup constraint x+y <= 0
COMISO::LinearConstraint::SVectorNC coeffs(2);
coeffs.coeffRef(0) = 1.0;
coeffs.coeffRef(1) = 1.0;
COMISO::LinearConstraint lc(coeffs, 0, COMISO::LinearConstraint::NC_LESS_EQUAL);
constraints.push_back(&lc);
// check if IPOPT solver available in current configuration
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment