Solving the submodel

Provides the syntax.

  1. Write the writeln statement:

          if ( subCplex.solve() &&
               subCplex.getObjValue() <= -RC_EPS) {
            writeln();
            writeln("SUB OBJECTIVE: ",subCplex.getObjValue());
          } else {
            writeln("No new good pattern, stop.");
               subData.end();
            subOpl.end();         
            break;
          }
    
  2. Check the objective:

          if (subCplex.getObjValue() > -RC_EPS) { 
            break;
          }
    

If the objective is not favorable, you stop the process. Remember that the objective represents the reduced cost of the new candidate pattern.