The OPTNET Procedure

CYCLE Statement

CYCLE < options > ;

The CYCLE statement invokes an algorithm that finds the cycles (or the existence of a cycle) in the input graph. Cycles are described in the section Cycle.

You can specify the following options in the CYCLE statement:

LOGLEVEL=number | string

controls the amount of information that is displayed in the SAS log. Table 2.13 describes the valid values for this option.

Table 2.13: Values for LOGLEVEL= Option

number

string

Description

0

NONE

Turns off all algorithm-related messages in the SAS log

1

BASIC

Displays a basic summary of the algorithmic processing

2

MODERATE

Displays a summary of the algorithmic processing

3

AGGRESSIVE

Displays a detailed summary of the algorithmic processing


The default is the value that is specified by the LOGLEVEL= option in the PROC OPTNET statement (or BASIC if that option is not specified).

MAXCYCLES=number

specifies the maximum number of cycles to return. The default is the positive number that has the largest absolute value representable in your operating environment. This option works only when you also specify MODE=ALL_CYCLES.

MAXLENGTH=number

specifies the maximum number of links to allow in a cycle. If a cycle is found whose length is greater than number, that cycle is removed from the results. The default is the positive number that has the largest absolute value representable in your operating environment. By default, nothing is removed from the results. This option works only when you also specify MODE=ALL_CYCLES.

MAXLINKWEIGHT=number

specifies the maximum sum of link weights to allow in a cycle. If a cycle is found whose sum of link weights is greater than number, that cycle is removed from the results. The default is the positive number that has the largest absolute value representable in your operating environment. By default, nothing is filtered. This option works only when you also specify MODE=ALL_CYCLES.

MAXNODEWEIGHT=number

specifies the maximum sum of node weights to allow in a cycle. If a cycle is found whose sum of node weights is greater than number, that cycle is removed from the results. The default is the positive number that has the largest absolute value representable in your operating environment. By default, nothing is filtered. This option works only when you also specify MODE=ALL_CYCLES.

MAXTIME=number

specifies the maximum amount of time to spend finding cycles. The type of time (either CPU time or real time) is determined by the value of the TIMETYPE= option. The value of number can be any positive number; the default value is the positive number that has the largest absolute value that can be represented in your operating environment. This option works only when you also specify MODE=ALL_CYCLES.

MINLENGTH=number

specifies the minimum number of links to allow in a cycle. If a cycle is found that has fewer links than number, that cycle is removed from the results. The default is 1. By default, nothing is filtered. This option works only when you also specify MODE=ALL_CYCLES.

MINLINKWEIGHT=number

specifies the minimum sum of link weights to allow in a cycle. If a cycle is found whose sum of link weights is less than number, that cycle is removed from the results. The default is the negative number that has the largest absolute value representable in your operating environment. By default, nothing is filtered. This option works only when you also specify MODE=ALL_CYCLES.

MINNODEWEIGHT=number

specifies the minimum sum of node weights to allow in a cycle. If a cycle is found whose sum of node weights is less than number, that cycle is removed from the results. The default is the negative number that has the largest absolute value representable in your operating environment. By default, nothing is filtered. This option works only when you also specify MODE=ALL_CYCLES.

MODE=option

specifies the mode for processing cycles.

Table 2.14: Values for the MODE= Option

Option Value

Description

ALL_CYCLES

Returns all (unique, elementary) cycles found.

FIRST_CYCLE

Returns the first cycle found.


The default is FIRST_CYCLE.

OUT=SAS-data-set

specifies the output data set to contain the cycles found.