The SOLU, or SOLUTION, command displays a solution report for the current model. The syntax of the SOLU command is:

SOLU ['header_text'] [ var_or_row_names]

For a standard solution report, omit the two optional arguments and enter the SOLU command by itself. LINGO will print primal and dual values for all the variables and rows in the model. LINGO will label all the columns in the report.

The first optional field, header_text, will be displayed as a title header in the solution report. If the header_text argument is included, LINGO prints primal values only, omitting all labels in the report.

The second optional field, var_or_row_names, is a variable and/or row name list that, if included, will limit the report to the given variable or row name. The standard wild card characters (* and %) are supported in the variable and row names.

As an example, in the following session, we load the Chess Snackfoods example from the Using Sets section and then generate several solution reports using SOLU:

: TAKE CHESS.LNG

: TERSE

: GO

 

Global optimal solution found at step:         0

Objective value:                       2692.308

 

: !Generate a standard SOLU report

: SOLU

 

                 Variable      Value  Reduced Cost

         SUPPLY( PEANUTS)   750.0000     0.0000000

         SUPPLY( CASHEWS)   250.0000     0.0000000

             PRICE( PAWN)   2.000000     0.0000000

           PRICE( KNIGHT)   3.000000     0.0000000

           PRICE( BISHOP)   4.000000     0.0000000

             PRICE( KING)   5.000000     0.0000000

           PRODUCE( PAWN)   769.2308     0.0000000

         PRODUCE( KNIGHT)   0.000000     0.1538461

         PRODUCE( BISHOP)   0.000000     0.7692297E-01

           PRODUCE( KING)   230.7692     0.0000000

  FORMULA( PEANUTS, PAWN)   15.00000     0.0000000

FORMULA( PEANUTS, KNIGHT)   10.00000     0.0000000

FORMULA( PEANUTS, BISHOP)   6.000000     0.0000000

  FORMULA( PEANUTS, KING)   2.000000     0.0000000

  FORMULA( CASHEWS, PAWN)   1.000000     0.0000000

FORMULA( CASHEWS, KNIGHT)   6.000000     0.0000000

FORMULA( CASHEWS, BISHOP)   10.00000     0.0000000

  FORMULA( CASHEWS, KING)   14.00000     0.0000000

 

           Row    Slack or Surplus      Dual Price

             1            2692.308        1.000000

             2            0.000000        1.769231

             3            0.000000        5.461538

 

: !Generate a SOLU report for PRODUCE

: SOLU PRODUCE

 

                Variable       Value  Reduced Cost

          PRODUCE( PAWN)    769.2308     0.0000000

        PRODUCE( KNIGHT)    0.000000     0.1538461

        PRODUCE( BISHOP)    0.000000     0.7692297E-01

          PRODUCE( KING)    230.7692     0.0000000

 

: !Now add a header and use a wildcard

: SOLU 'PRODUCTION QUANTITIES' PROD*

 

PRODUCTION QUANTITIES

        769.2308

        0.000000

        0.000000

        230.7692

If you would like to capture the solution report in a file, use the DIVERT command before the SOLU command.

For more information on the interpretation of the various fields in the solution report, see Getting Started with LINGO.

If the solution report is scrolling off the screen, you can use the PAGE command to set the page length to n lines, so LINGO will pause every time n lines are printed and wait until you are ready to proceed with the next page.