Options

Display Options

These options regulate output from the display command. They affect only the formatting of the display output; AMPL’s internal record of the displayed param values or set members is not changed.

display_1col n (default 20)

Whether to display params in one or multiple columns. The display is in one column when the number of param values is less than or equal to n, and is in multiple columns when the number of param values is greater than n. (Specify n as zero to force multiple columns, and as a very large number to force one column.)

display_eps r (default 0)

The smallest magnitude that should be displayed as nonzero. For example when r is 0.00001, both 0.000001 and –0.000001 are displayed as zero.

display_max_2d_cols n (default 0)

The maximum number of columns in a multiple-column (2-dimensional) param display. If more than n columns are needed, the display is broken into tables of at most n columns each.

display_precision n (default 6)

The maximum number of significant digits shown in displayed numbers. Values are rounded if necessary, and trailing zeros after the decimal point are dropped; thus for example when n is 6, the value 12.3456789 is displayed as 12.3457, while 12.30001 is displayed as 12.3. Specify n as 0 to request full precision — the shortest representation that, when converted to binary and properly rounded, will give exactly the binary value stored in the computer.

display_round i (default "")

The number of digits shown relative to the decimal point in displayed numbers, overriding display_precision when not null. For example 1234.5678 displays as 1234.57 when i is 2, as 1235 when i is 0, and as 1200 when i is –2.

display_set_1col n (default 0)

Whether to display sets in one or multiple columns. The display is in one column when the number of set members is less than or equal to n, and is in multiple columns when the number of set members is greater than n. (Specify n as zero to force multiple columns, and as a very large number to force one column.)

display_transpose i (default 0)

Whether to transpose 2-dimensional tables. The displayed table is transposed if the number of rows minus the number of columns is less than i, and is not transposed if the number of rows minus the number of columns is greater than or equal to i. (Specify i as 0 to display all non-square tables with more rows than columns. Specify i as a large positive number for force transposition, and as a large negative number to prevent transposition.)

display_width n (default 79)

The maximum number of characters in each line of display output.

gutter_width n (default 3)

The number of spaces between columns in display output.

omit_zero_cols b (default 0)

Whether to omit columns that are all zeros. When b is set to 1, only columns that have at least one nonzero value are displayed. Values that are missing or that are less than display_eps in magnitude are considered to be zeros for purposes of this option.

omit_zero_rows b (default 0)

Whether to omit rows that are all zeros. When b is set to 1, only rows that have at least one nonzero value are displayed. Values that are missing or that are less than display_eps in magnitude are considered to be zeros for purposes of this option.