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 |
||
Display arc information |
||
Display nonarc variable information |
||
Display variable information |
||
Display constraint information |
||
Display information for some arcs |
||
Display information for some nonarc variables |
||
Display information for some variables |
||
Display information for some constraints |
||
Display information for some constraints associated with some arcs |
||
Display information for some constraints associated with some nonarc variables |
||
Display information for some constraints associated with some variables |
||
PRINT Statement Qualifiers: |
||
Produce a short report |
||
Produce a long report |
||
Display arcs/variables with zero flow/value |
||
Display arcs/variables with nonzero flow/value |
||
Display basic arcs/variables |
||
Display nonbasic arcs/variables |
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:
The default qualifiers are BASIC, NONBASIC, ZERO, NONZERO, and LONG.
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.
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 |
_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 |
_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 |
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 |
_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 |
_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 |
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.