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 in 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. Any cycle whose length is greater than number is removed from the results. The default is the positive number that has the largest absolute value that can be represented 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. Any cycle whose sum of link weights is greater than number is removed from the results. The default is the positive number that has the largest absolute value that can be represented 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. Any cycle whose sum of node weights is greater than number is removed from the results. The default is the positive number that has the largest absolute value that can be represented 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. Any cycle that has fewer links than number is removed from the results. By default MINLENGTH=1 and 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. Any cycle whose sum of link weights is less than number is removed from the results. The default is the negative number that has the largest absolute value that can be represented 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. Any cycle whose sum of node weights is less than number is removed from the results. The default is the negative number that has the largest absolute value that can be represented 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.


By default, MODE=FIRST_CYCLE.

OUT=SAS-data-set

specifies the output data set to contain the cycles found.