File|Take Commands


windowsicon

The Take Commands command is used to submit a LINGO command script file for processing. For more information on LINGO's script language, refer to Command-line Commands.

As an example, we will build a small script file that contains a small product mix model and process it using Take Commands.

To build a script file, issue the File|New command. LINGO will present you with the following dialog box:

page93bxp

Select item 4, LINGO Command Script, and press the OK button. LINGO will open a blank script file.

Now, enter the following into the script file:

page101axp

This is a command script that inputs a small product mix model, solves it, and puts the solution in a text file. Save the command script to a file titled MyScript.ltf using the File|Save As command.

To run the script, issue the File|Take Commands command. You should see the following:

page101bxp

Double-click on the icon for MyScript.ltf to begin processing the command script. LINGO's command window will now appear and you should be able to watch LINGO's progress at processing the script by watching commands and output as they are logged in the command window. When LINGO finishes the command script, the command window will resemble the following:

page102xp

Also of interest is the solution file, SOLU.LGR, created as part of our command script. If you open this file, you should find the following solution to the model:

Variable           Value        Reduced Cost

      X        50.00000            0.000000

      Y        35.00000            0.000000

 

    Row    Slack or Surplus      Dual Price

      1        2050.000            1.000000

      2        0.000000            5.000000

      3        25.00000            0.000000

      4        0.000000            15.00000

The output that was routed to the command window can be routed to a file using the Log Output command.