RunLingo

Windows and Linux versions of LINGO include a utility program called RunLingo. RunLingo can be used to process LINGO script files, however, RunLingo does not include the front-end graphical interface found in the interactive version of LINGO.  RunLingo is invoked from the command line, where you may enter a script file name.  RunLingo writes its output to the standard output device.  RunLingo can be useful in a production environment, where you want LINGO to operate quietly in the background as part of a larger planning system.

The following example illustrates RunLingo being invoked from the command line to process a small transportation model contained in the script file TRAN.LTF (also included in the main LINGO folder).

C:\LINGO17>runlingo tran.ltf

 LINGO/WIN32 17.0.1.10 (11 Feb 17)

 

 LINDO API 11.0.1905.126 (10 Feb 2017 23:27:41)

 

 Copyright (C) 2011-2017 LINDO Systems Inc. Licensed material,

 all rights reserved. Copying except as authorized in license

 agreement is prohibited.

 

 License location: C:\LINGO17\lndlng17.lic

 Config  location: C:\LINGO17\LINGO.CNF

 

 Licensed for commercial use.

 Branch-and-bound solver enabled.

 Nonlinear solver enabled.

 Barrier solver enabled.

 Global solver enabled.

 Integer solver enabled.

 Stochastic solver enabled.

 Conic solver enabled.

 

 

 Default parameter values restored.

 

 

  Parameter        Old Value     New Value

   ECHOIN             0             1

 

:  MODEL:

? ! A 3 Warehouse, 4 Customer

?    Transportation Problem;

? SETS:

?    WAREHOUSE / WH1, WH2, WH3/   : CAPACITY;

?    CUSTOMER   / C1, C2, C3, C4/ : DEMAND;

?    ROUTES( WAREHOUSE, CUSTOMER) : COST, VOLUME;

? ENDSETS

? ! The objective;

?  [OBJ] min = @SUM( ROUTES: COST * VOLUME);

? ! The demand constraints;

?  @FOR( CUSTOMER( J): [DEM]

?   @SUM( WAREHOUSE( I): VOLUME( I, J)) >=

?    DEMAND( J));

? ! The supply constraints;

?  @FOR( WAREHOUSE( I): [SUP]

?   @SUM( CUSTOMER( J): VOLUME( I, J)) <=

?    CAPACITY( I));

? ! Here are the parameters;

? DATA:

?    CAPACITY =   30, 25, 21 ;

?    DEMAND =   15, 17, 22, 12;

?    COST =      6,  2,  6,  7,

?                4,  9,  5,  3,

?                8,  8,  1,  5;

? ENDDATA

? END

: set terseo 1

 

  Parameter        Old Value     New Value

   TERSEO             0             1

 

: go

 Compiling model ...

 Structural analysis, pass 1 ...

 Scalarizing model ...

 Generating nonzero matrix ...

 Solving...

 

 Global optimal solution found.

 Objective value:                              161.0000

 Infeasibilities:                              0.000000

 Total solver iterations:                             6

 

: nonz volume

 Global optimal solution found.

 Objective value:                              161.0000

 Infeasibilities:                              0.000000

 Total solver iterations:                             6

 

                               Variable           Value        Reduced Cost

                       VOLUME( WH1, C1)        2.000000            0.000000

                       VOLUME( WH1, C2)        17.00000            0.000000

                       VOLUME( WH1, C3)        1.000000            0.000000

                       VOLUME( WH2, C1)        13.00000            0.000000

                       VOLUME( WH2, C4)        12.00000            0.000000

                       VOLUME( WH3, C3)        21.00000            0.000000

 

: quit

 

C:\LINGO17>