PRINT Statement

PRINT options / qualifiers ;

The options available with the PRINT statement of PROC NETFLOW are summarized by purpose in the following table.

Table 6.2: Functional Summary, PRINT Statement

Description

Statement

Option

PRINT Statement Options:

Display everything

PRINT

PROBLEM

Display arc information

PRINT

ARCS

Display nonarc variable information

PRINT

NONARCS

Display variable information

PRINT

VARIABLES

Display constraint information

PRINT

CONSTRAINTS

Display information for some arcs

PRINT

SOME_ARCS

Display information for some nonarc variables

PRINT

SOME_NONARCS

Display information for some variables

PRINT

SOME_VARIABLES

Display information for some constraints

PRINT

SOME_CONS

Display information for some constraints associated with some arcs

PRINT

CON_ARCS

Display information for some constraints associated with some nonarc variables

PRINT

CON_NONARCS

Display information for some constraints associated with some variables

PRINT

CON_VARIABLES

PRINT Statement Qualifiers:

Produce a short report

PRINT

/ SHORT

Produce a long report

PRINT

/ LONG

Display arcs/variables with zero flow/value

PRINT

/ ZERO

Display arcs/variables with nonzero flow/value

PRINT

/ NONZERO

Display basic arcs/variables

PRINT

/ BASIC

Display nonbasic arcs/variables

PRINT

/ NONBASIC


The PRINT statement enables you to examine part or all of the problem. You can limit the amount of information displayed when a PRINT statement is processed by specifying PRINT statement options. The name of the PRINT option indicates what part of the problem is to be examined. If no options are specified, or PRINT PROBLEM is specified, information about the entire problem is produced.

The amount of displayed information can be limited further by following any PRINT statement options with a slash (/) and one or more of the qualifiers SHORT or LONG, ZERO or NONZERO, BASIC or NONBASIC.

Some of the PRINT statement options require you to specify a list of some type of entity, thereby enabling you to indicate what entities are of interest. The entities of interest are the ones you want to display. These entities might be tail node names, head node names, nonarc variable names, or constraint names. The entity list is made up of one or more of the following constructs. Each construct can add none, one, or more entities to the set of entities to be displayed.

  • _ALL_ Display all entities in the required list.

  • entity Display the named entity that is interesting.

  • entity1 - entity2 (one hyphen) entity1 -- entity2 (two hyphens) entity1 - CHARACTER - entity2 or entity1 - CHAR - entity2 Both entity1 and entity2 have names made up of the same character string prefix followed by a numeric suffix. The suffixes of both entity1 and entity2 have the same number of numerals but can have different values. A specification of entity1 - entity2 indicates that all entities with the same prefix and suffixes with values on or between the suffixes of entity1 and entity2 are to be put in the set of entities to be displayed. The numeric suffix of both entity1 and entity2 can be followed by a character string. For example, _OBS07_ - _OBS13_ is a valid construct of the forms entity1 - entity2.

  • part_of_entity_name: Display all entities in the required list that have names beginning with the character string preceding the colon.

The following options can appear in the PRINT statement:

ARCS

indicates that you want to have displayed information about all arcs.

SOME_ARCS (taillist,headlist)

is similar to the statement PRINT ARCS except that, instead of displaying information about all arcs, only arcs directed from nodes in a specified set of tail nodes to nodes in a specified set of head nodes are included. The nodes or node constructs belonging to the taillist list are separated by blanks. The nodes or node constructs belonging to the headlist list are also separated by blanks. The lists are separated by a comma.

NONARCS
VARIABLES

indicates that information is to be displayed about all nonarc variables.

SOME_NONARCS (nonarclist)

is similar to the PRINT NONARCS statement except that, instead of displaying information about all nonarc variables, only those belonging to a specified set of nonarc variables have information displayed. The nonarc variables or nonarc variable constructs belonging to the nonarclist list are separated by blanks.

CONSTRAINTS

indicates that you want to have displayed information about all constraint coefficients.

SOME_CONS (conlist)

displays information for coefficients in a specified set of constraints. The constraints or constraint constructs belonging to the conlist list are separated by blanks.

CON_ARCS (taillist, headlist)

is similar to the PRINT SOME_CONS (conlist) statement except that, instead of displaying information about all coefficients in specified constraints, information about only those coefficients that are associated with arcs directed from a set of specified tail nodes toward a set of specified head nodes is displayed. The constraints or constraint constructs belonging to the conlist list are separated by blanks; so too are the nodes or node constructs belonging to the taillist list and the nodes or node constructs belonging to the headlist list. The lists are separated by commas.

CON_NONARCS (conlist, nonarclist)
CON_VARIABLES (conlist, variablelist)

is similar to the PRINT SOME_CONS (conlist) statement except that, instead of displaying information about all coefficients in specified constraints, information about only those coefficients that are associated with nonarc variables in a specified set is displayed. The constraints or constraint constructs belonging to the conlist list are separated by blanks. The nonarc variables or nonarc variable constructs belonging to the nonarclist list are separated by blanks. The lists are separated by a comma.

PROBLEM

is equivalent to the statement PRINT ARCS NONARCS CONSTRAINTS.

Following a slash (/), the qualifiers SHORT or LONG, ZERO or NONZERO, BASIC or NONBASIC can appear in any PRINT statement. These qualifiers are described below.

  • BASIC Only rows that are associated with arcs or nonarc variables that are basic are displayed. The _STATUS_ column values are KEY_ARC BASIC or NONKEY ARC BASIC for arcs, and NONKEY_BASIC for nonarc variables.

  • LONG All table columns are displayed (the default when no qualifier is used).

  • NONBASIC Only rows that are associated with arcs or nonarc variables that are nonbasic are displayed. The _STATUS_ column values are LOWERBD NONBASIC or UPPERBD NONBASIC.

  • NONZERO Only rows that have nonzero _FLOW_ column values (nonzero arc flows, nonzero nonarc variable values) are displayed.

  • SHORT The table columns are _N_, _FROM_, _TO_, _COST_, _CAPAC_, _LO_, _NAME_, and _FLOW_, or the names of the SAS variables specified in the corresponding variable lists (TAILNODE, HEADNODE, COST, CAPACITY, LO, and NAME lists). _COEF_ or the name of the SAS variable in the COEF list specification will head a column when the SHORT qualifier is used in PRINT CONSTRAINTS, SOME_CONS, CON_ARCS, or CON_NONARCS.

  • ZERO Only rows that have zero _FLOW_ column values (zero arc flows, zero nonarc variable values) are displayed.

The default qualifiers are BASIC, NONBASIC, ZERO, NONZERO, and LONG.

Displaying Information On All Constraints

In the oil refinery problem, if you had entered

   print constraints;

after the RUN statement, the output in Figure 6.9 would have been produced.

Displaying Information About Selected Arcs

In the oil refinery problem, if you had entered

   print some_arcs(refin:,_all_)/short;

after the RUN statement, the output in Figure 6.10 would have been produced.

Figure 6.9: PRINT CONSTRAINTS

Constrained Optimum

The NETFLOW Procedure

_N_ _CON_ _type_ _rhs_ _name_ _from_ _to_ _cost_ _capac_ _lo_ _SUPPLY_ _DEMAND_ _FLOW_ _COEF_ _FCOST_ _RCOST_ _STATUS_
1 _OBS1_ GE -15 m_e_ref1 middle east refinery 1 63 95 20 100 . 80 -2 5040 . KEY_ARC BASIC
2 _OBS1_ GE -15 thruput1 refinery 1 r1 200 175 50 . . 145 1 29000 . KEY_ARC BASIC
3 _OBS2_ GE -15 m_e_ref2 middle east refinery 2 81 80 10 100 . 20 -2 1620 . NONKEY ARC BASIC
4 _OBS2_ GE -15 thruput2 refinery 2 r2 220 100 35 . . 35 1 7700 29 LOWERBD NONBASIC
5 _OBS3_ EQ 0 thruput1 refinery 1 r1 200 175 50 . . 145 -3 29000 . KEY_ARC BASIC
6 _OBS3_ EQ 0 r1_gas r1 ref1 gas 0 140 0 . . 108.75 4 0 . KEY_ARC BASIC
7 _OBS4_ EQ 0 thruput2 refinery 2 r2 220 100 35 . . 35 -3 7700 29 LOWERBD NONBASIC
8 _OBS4_ EQ 0 r2_gas r2 ref2 gas 0 100 0 . . 26.25 4 0 . KEY_ARC BASIC


Figure 6.10: PRINT SOME_ARCS

Constrained Optimum

The NETFLOW Procedure

_N_ _from_ _to_ _cost_ _capac_ _lo_ _name_ _FLOW_
1 refinery 1 r1 200 175 50 thruput1 145
2 refinery 2 r2 220 100 35 thruput2 35


Displaying Information About Selected Constraints

In the oil refinery problem, if you had entered

  print some_cons(_obs3_-_obs4_)/nonzero short;

after the RUN statement, the output in Figure 6.11 would have been produced.

Figure 6.11: PRINT SOME_CONS

Constrained Optimum

The NETFLOW Procedure

_N_ _CON_ _type_ _rhs_ _name_ _from_ _to_ _cost_ _capac_ _lo_ _FLOW_ _COEF_
1 _OBS3_ EQ 0 thruput1 refinery 1 r1 200 175 50 145 -3
2 _OBS3_ EQ 0 r1_gas r1 ref1 gas 0 140 0 108.75 4
3 _OBS4_ EQ 0 thruput2 refinery 2 r2 220 100 35 35 -3
4 _OBS4_ EQ 0 r2_gas r2 ref2 gas 0 100 0 26.25 4


If you had entered

  print con_arcs(_all_,r1 r2,_all_)/short;

after the RUN statement, the output in Figure 6.12 would have been produced. Constraint information about arcs directed from selected tail nodes is displayed.

Figure 6.12: PRINT CON_ARCS

Constrained Optimum

The NETFLOW Procedure

_N_ _CON_ _type_ _rhs_ _name_ _from_ _to_ _cost_ _capac_ _lo_ _FLOW_ _COEF_
1 _OBS3_ EQ 0 r1_gas r1 ref1 gas 0 140 0 108.75 4
2 _OBS4_ EQ 0 r2_gas r2 ref2 gas 0 100 0 26.25 4


Cautions

This subsection has two parts; the first part is applicable if you are running Version 7 or later of the SAS System, and the second part is applicable if you are running Version 6. You can get later versions to act like Version 6 by specifying

  options validvarname=v6;

For Version 7 onward, PROC NETFLOW strictly respects case sensitivity. The PRINT statements of PROC NETFLOW that require lists of entities will work properly only if the entities have the same case as in the input data sets. Entities that contain blanks must be enclosed in single or double quotes. For example,

  print some_arcs (_all_,"Ref1 Gas");

In this example, a head node of an arc in the model is Ref1 Gas (without the quotes). If you omit the quotes, PROC NETFLOW issues a message on the SAS log:

  WARNING: The node Ref1 in the list of head nodes in the PRINT
           SOME_ARCS or PRINT CON_ARCS is not a node in the
           problem. This statement will be ignored.

If you had specified

  print some_arcs (_all_,"ref1 Gas");

(note the small r), you would have been warned

  WARNING: The node ref1 Gas in the list of head nodes in the PRINT
           SOME_ARCS or PRINT CON_ARCS is not a node in the
           problem. This statement will be ignored.

If you are running Version 6, or if you are running a later version and you have specified

  options validvarname=v6;

when information is parsed to procedures, the SAS System converts the text that makes up statements into uppercase. The PRINT statements of PROC NETFLOW that require lists of entities will work properly only if the entities are uppercase in the input data sets. If you do not want this uppercasing to occur, you must enclose the entity in single or double quotes.

  print some_arcs('lowercase tail','lowercase head');
  print some_cons('factory07'-'factory12');
  print some_cons('_factory07_'-'_factory12_');
  print some_nonarcs("CO2 content":);

Entities that contain blanks must be enclosed in single or double quotes.