Originally posted by: SystemAdmin
[rdumeur said:]
Hello Salma,
* To display your model, you need to iterate over the IloExtractable objects stored in the IloModel and print them.
For instance:
int main(int argc, char** argv) {
IloEnv env;
IloModel model(env);
IloIntVar x(env, 0, 10, "x");
IloIntVar y(env, 0, 10, "y");
model.add(x < y);<br /> for(IloModel::Iterator it(model); it.ok(); ++it) {
cout <<
it << endl;<br /> }
}
yields:
x[0..10] < y[0..10]<br />
I don't understand your question about resetting a variable in a buckle (you mean a loop)? What exactly do you want to do?
* IloInt is the data type used to specify integer values when writing a constraint model. IlcInt is the integer data type used when writing search goals. More generally, Ilc prefixed data types are meant to be used when writing search code and Ilo prefixed ones are to be used during modeling.
I hope it helps. Please let me know if you need more information.
Cordially,
#CPOptimizer#DecisionOptimization