Default behavior

Provides the code and the solution.

The following code from the flow control part of the model (the main block) shows what the default behavior would be:

  // Default behaviour
  writeln("Default Behaviour");
  var cplex1 = new IloCplex();
  var opl1 = new IloOplModel(def, cplex1);
  opl1.generate();
  cplex1.solve();   
  writeln(opl1.printSolution());

The solution is:


Default Behaviour
x = [10 0 0 0 0 0 0 0 0 0];
y = [1 2 3 4 5 6 7 8 9 10];

CPLEX calculates the first variable from the array such as to satisfy the sum constraint.