• Nenhum resultado encontrado

Progress Reports: Interpreting the Node Log

No documento ILOG CPLEX 7.5 (páginas 168-173)

As we explained earlier, when ILOG CPLEX optimizes mixed integer programs, it builds a tree with the linear relaxation of the original MIP at the root and subproblems to optimize at the nodes of the tree. ILOG CPLEX reports its progress in optimizing the original problem in a node log file as it traverses this tree.

Solving MIP Problems

<functionhead>

Through ILOG CPLEX parameters, you control how information in the log file is recorded and displayed. You can use those parameters at their default values (adequate for most problems), or you can reset them through commands in the Interactive Optimizer, through member functions in the Concert Technology Library, or through routines from the Callable Library. Table 5.7 summarizes those parameters, and the following paragraphs explain how to use them.

Generally, ILOG CPLEX records a line in the node log about every node with an integer solution and about every n nodes solved, where n is controlled by the MIP interval parameter.

◆ In the Interactive Optimizer, use the command set mip interval i to change the MIP interval parameter in order to log node information more (a smaller value of i) or less (a larger value of i) frequently.

◆ From the Callable Library, use the routine CPXsetintparam() with arguments to indicate the environment, the parameter CPX_PARAM_MIPINTERVAL, and a positive integer value. The default value is 100.

Here is an example of such a node log file:

In that example, ILOG CPLEX found the optimal objective function value of 5 at 13 of the nodes in 41 iterations, and ILOG CPLEX found an optimal integer solution at node 4. The MIP interval parameter was set at 10, so every tenth node was logged, in addition to the node where an integer solution was found.

Table 5.7 Parameters for Controlling the ILOG CPLEX Node Log File

Default Interactive Command

Concert Technology Library

Function Callable Library Routine

2 set mip display IloCplex::setParam(MIPDisplay, i) CPXsetintparam(env,CPX_PARAM_MIPDISPLAY,i) 100 set mip interval IloCplex::setParam(MIPInterval, i) CPXsetintparam(env,CPX_PARAM_MIPINTERVAL,i)

Tried aggregator 1 time.

No MIP presolve or aggregator reductions.

Presolve time = 0.00 sec.

Root relaxation solution time = 0.00 sec Objective is integral.

Nodes Cuts/

Node Left Objective IInf Best Integer Best Node ItCnt Gap 0 0 4.0000 6 4.0000 12

* 4 2 5.0000 0 5.0000 4.0000 17 20.00%

10 1 cutoff 5.0000 4.0000 31 20.00%

Integer optimal solution: Objective = 5.0000000000e+000 Solution time = 0.02 sec. Iterations = 41 Nodes = 13

PR O G R E S S RE P O R T S: IN T E R P R E T I N G T H E NO D E LO G

As you can see in that example, ILOG CPLEX logs an asterisk (*) in the left-most column for any node where it finds an integer-feasible solution. In the next column, it logs the node number. It next logs the number of nodes left to explore.

In the next column, ILOG CPLEX either records the objective value at the node or a reason to fathom the node. (A node is fathomed if the solution of a subproblem at the node is infeasible; or if the value of objective function at the node is worse than the cutoff value for branch & cut; or if the node supplies an integer solution.)

In the column labeled IInf, ILOG CPLEX records the number of integer-infeasible variables and special ordered sets. If no solution has been found, the next column is left blank; otherwise, it records the best integer solution found so far.

The column labeled Cuts/Best Node records the best objective function value of all the unexplored nodes. If the word Cuts appears in this column, it means various cuts were generated; if a particular name of a cut appears, then only that kind of cut was generated.

The column labeled ItCnt records the cumulative iteration count of the algorithm solving the subproblems. Until a solution has been found, the column labeled Gap is blank. If a solution has been found, the relative gap value is printed when it is less than 999.99; otherwise, hyphens are printed. The gap is computed as abs(best integer -

best node)/(1e-10 + abs(best integer)). Consequently, the printed gap value may not always move smoothly. In particular, there may be sharp improvements whenever a new best integer solution is found.

ILOG CPLEX also logs its addition of cuts to a model. Here is an example of a node log file from a problem where ILOG CPLEX made cover cuts.

ILOG CPLEX also logs the number of clique inequalities in the clique table at the beginning of optimization and the number eventually applied. Cuts generated at intermediate nodes are not logged individually unless they happen to be generated at a node logged for other reasons. ILOG CPLEX logs the number of applied cuts of all classes at the end.

MIP Presolve eliminated 0 rows and 1 columns.

MIP Presolve modified 12 coefficients.

Reduced MIP has 15 rows, 32 columns, and 97 nonzeros.

Presolve time = 0.00 sec.

Nodes Cuts/

Node Left Objective IInf Best Integer Best Node ItCnt Gap 0 0 2819.3574 7 2819.3574 35 2881.8340 8 Covers: 4 44 2881.8340 12 Covers: 3 48

* 7 6 3089.0000 0 3089.0000 2904.0815 62 5.99%

Cover cuts applied: 30

Integer optimal solution: Objective = 3.0890000000e+003 Solution time = 0.10 sec. Iterations = 192 Nodes = 44

Solving MIP Problems

<functionhead>

CPLEX also indicates, in the node log file, each instance of a successful application of the node heuristic. The following example shows a node log file for a problem where the heuristic found a solution at node 0. The + denotes a node generated by the heuristic.

Periodically, if the MIP display parameter is greater than 0 (zero), ILOG CPLEX records the cumulative time spent since the beginning of the current MIP optimization and the amount of memory used by branch & cut. (By periodically, we mean that time and memory information appears either every 20 nodes or ten times the MIP display parameter, whichever is greater. The default value of the MIP display parameter is 2.) The following example shows you one line from a node log file indicating elapsed time and memory use.

To change the MIP display parameter:

◆ In the Interactive Optimizer, use the command set mip display.

◆ From the Callable Library, use the routine CPXsetintparam() with arguments to indicate the environment, the parameter CPX_PARAM_MIPDISPLAY, and a value.

Table 5.8 lists the acceptable values for this parameter.

ILOG CPLEX prints an additional summary line in the log if optimization stops before it is complete. This summary line shows the best MIP bound, that is, the best objective value among all the remaining node subproblems. The following example shows you lines from a

Nodes Cuts/

Node Left Objective IInf Best Integer Best Node ItCnt Gap 0 0 403.8465 640 403.8465 4037 405.2839 609 Cliques: 10 5208 405.2891 612 Cliques: 2 5288 Heuristic: feasible at 437.000, still looking

Heuristic: feasible at 437.000, still looking Heuristic complete

* 0+ 0 436.0000 0 436.0000 405.2891 5288 7.04%

Elapsed b&b time = 120.01 sec. (tree size = 0.09 MB)

Table 5.8 Values of the MIP Display Parameter

Value Effect

0 no display

1 display integer feasible solutions 2 display nodes under mip interval control 3 same as 2, but add information on node cuts 4 same as 3, but add LP display for root node 5 same as 3, but add LP display for all nodes

PR O G R E S S RE P O R T S: IN T E R P R E T I N G T H E NO D E LO G

node log file where an integer solution has not yet been found, and the best remaining objective value is 2973.9912281.

Sample: Stating a MIP Problem on page 152 offers a typical MIP problem. Here is the node log file for that problem with the default setting of the MIP display parameter:

These additional items appear only in the node log file (not on screen):

◆ Variable records the name of the variable where ILOG CPLEX branched to create this node. If the branch was due to a special ordered set, the name listed here will be the right-most variable in the left subset.

◆ B indicates the branching direction:

D means the variables was restricted to a lower value;

U means the variable was restricted to a higher value;

L means the left subset of the special ordered set was restricted to 0 (zero);

R means the right subset of the special ordered set was restricted to 0 (zero).

◆ Parent indicates the node number of the parent.

◆ Depth indicates the depth of this node in the branch & cut tree.

Node limit, no integer solution.

Current MIP best bound = 2.9739912281e+03 (gap is infinite) Solution time = 0.01 sec. Iterations = 68 Nodes = 7 (7)

Tried aggregator 1 time.

Aggregator did 1 substitutions.

Reduced MIP has 2 rows, 3 columns, and 6 nonzeros.

Presolve time = 0.00 sec.

Clique table:0 GUB, 0 GUBEQ, 0 two-covers, 0 probed ImplBd table: 0 bounds

Root relaxation solution time = 0.00 sec.

Nodes Cuts/

Node Left Objective IInf Best Integer Best Node ItCnt Gap 0 0 125.2083 1 125.2083 3

* 122.5000 0 122.5000 Cuts: 2 4 Mixed integer rounding cuts applied: 1

Gomory fractoinal cuts applied: 1

Integer optimal solution: Objective = 1.2250000000e+002 Solution time = 0.02 sec. Iterations = 4 Nodes = 0

Solving MIP Problems

<functionhead>

No documento ILOG CPLEX 7.5 (páginas 168-173)