The OPTNET Procedure

Matrix Input Data

This section describes the matrix input format that you can use with some of the algorithms in PROC OPTNET. The DATA_MATRIX= option in the PROC OPTNET statement defines the data set that contains the matrix values. You can specify any values that you want for the data set variable names (the columns) by using the DATA_MATRIX_VAR statement, as described in the section DATA_MATRIX_VAR Statement. If you do not specify a DATA_MATRIX_VAR statement, then PROC OPTNET assumes that all numeric variables in the data set are to be used in defining the matrix.

The following statements solve the linear assignment problem for the cost matrix that is defined in the data set CostMatrix:

data CostMatrix;
   input back breast fly free;
   datalines;
35.1 36.7 28.3 36.1
34.6 32.6 26.9 26.2
31.3 33.9 27.1 31.2
28.6 34.1 29.1 30.3
32.9 32.2 26.6 24.0
27.8 32.5 27.8 27.0
26.3 27.6 23.5 22.4
29.0 24.0 27.9 25.4
27.2 33.8 25.2 24.1
27.0 29.2 23.0 21.9
;
proc optnet
   data_matrix = CostMatrix;
   data_matrix_var
      back--free;
   linear_assignment
      out      = LinearAssign;
run;