The OPTGRAPH Procedure

ODS Table Names

Each table that the OPTGRAPH procedure creates has a name associated with it, and you must use this name to refer to the table when you use ODS statements. These names are listed in Table 1.59.

Table 1.59: ODS Tables Produced by PROC OPTGRAPH

Table Name

Description

Required Statement or Option

PerformanceInfo

Information about the computing environment

Default output

ProblemSummary

Summary of the graph (or matrix) input

Default output

SolutionSummary

For each algorithm, summary of the solution status

Default output

Timing

Detailed real times for each phase of the procedure

PERFORMANCE with DETAILS option


The following code uses the example in the section Traveling Salesman Problem of a Simple Undirected Graph and calculates both an optimal traveling salesman tour and a minimum spanning tree. This code produces all four ODS output tables listed in Table 1.59.

data LinkSetIn;
   input from $ to $ weight @@;
   datalines;
A B 1.0 A C 1.0 A D 1.5 B C 2.0 B D 4.0
B E 3.0 C D 3.0 C F 3.0 C H 4.0 D E 1.5
D F 3.0 D G 4.0 E F 1.0 E G 1.0 F G 2.0
F H 4.0 H I 3.0 I J 1.0 C J 5.0 F J 3.0
F I 1.0 H J 1.0
;
proc optgraph
   loglevel   = moderate
   data_links = LinkSetIn
   out_nodes  = NodeSetOut;
   mst
     out      = MST;
   tsp
     out      = TSP;
   performance details;
run;
%put &_OPTGRAPH_;
%put &_OPTGRAPH_TSP_;
%put &_OPTGRAPH_MST_;

The performance information table in Figure 1.135 provides information about the computing environment. The value for Number of Threads is the maximum number of threads that are used in processing.

Figure 1.135: Performance Information Table

The OPTGRAPH Procedure

Performance Information
Execution Mode Single-Machine
Number of Threads 4



The procedure task timing table in Figure 1.136 provides a breakdown of each task and the amount of real time spent in processing.

Figure 1.136: Task Timing Table

Procedure Task Timing
Task Time
(sec.)
% Time
Input 0.01 49.99%
Setup 0.00 0.01%
Minimum Spanning Tree 0.00 0.01%
Traveling Salesman Problem 0.00 29.99%
Output 0.00 20.00%



The problem summary table in Figure 1.137 provides a basic summary of the graph (or matrix) input.

Figure 1.137: Problem Summary Table

Problem Summary
Input Type Graph
Number of Nodes 10
Number of Links 22
Graph Direction Undirected



The solution summary tables in Figure 1.138 and Figure 1.139 provide a basic solution summary for each algorithm that is processed. The information in these tables matches the information that is provided in the macro variables for each algorithm, described in the section Macro Variables.

Figure 1.138: Solution Summary Table for MST

Solution Summary
Problem Type Minimum Spanning Tree
Solution Status Optimal
Objective Value 10
CPU Time 0.00
Real Time 0.00



Figure 1.139: Solution Summary Table for TSP

Solution Summary
Problem Type Traveling Salesman Problem
Solution Status Optimal
Objective Value 16
Relative Gap 0
Absolute Gap 0
Primal Infeasibility 0
Bound Infeasibility 0
Integer Infeasibility 0
Best Bound 16
Nodes 1
Iterations 17
CPU Time 0.00
Real Time 0.00