0
$\begingroup$

I am new in C#-CPLEX. In public samples, the constraints are added one by one as follows:

IRange[] constraint = new IRange[nNutrs];
for (int i = 0; i < nNutrs; i++) {
constraint[i] = model.AddRange(data.nutrMin[i], data.nutrMax[i]);
} 

However, I would like to define all constraints using IRange and then add all to my model at the same time. I have no idea how to do that.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.