FICO
FICO Xpress Optimization Examples Repository
FICO Optimization Community FICO Xpress Optimization Home
Back to examples browserPrevious exampleNext example

Output formatting

Description
The printing format for real numbers may be changed individually with the functions strfmt, textfmt, formattext or by resetting the parameter REALFMT. The function strfmt may also be applied to strings, for instance to change the alignment of the text.

Further explanation of this example: 'Mosel User Guide', Sections 10.1 Producing formatted output and 10.3 Real number format


Source Files
By clicking on a file name, a preview is opened at the bottom of this page.
fo.mos[download]
numformat.mos[download]
transport2.mos[download]
transport2t.mos[download]

Data Files





transprt.dat

! Data file for 'transport.mos'
DEMAND: [ (Scotland) 2840 (North) 2800 (SWest) 2600 (SEast) 2820 
          (Midlands) 2750 ]

                     ! [CAP  COST] 
PLANTDATA: [ (Corby)   [3000 1700]
             (Deeside) [2700 1600]
             (Glasgow) [4500 2000]
             (Oxford)  [4000 2100] ]

                           ! [DIST CAP] 
ROUTES: [ (Corby   North)    [400 1000]
          (Corby   SWest)    [400 1000]
          (Corby   SEast)    [300 1000]
          (Corby   Midlands) [100 2000]
          (Deeside Scotland) [500 1000]
          (Deeside North)    [200 2000]
          (Deeside SWest)    [200 1000]
          (Deeside SEast)    [200 1000]
          (Deeside Midlands) [400  300]
          (Glasgow Scotland) [200 3000]
          (Glasgow North)    [400 2000]
          (Glasgow SWest)    [500 1000]
          (Glasgow SEast)    [900  200]
          (Oxford  Scotland) [800    *]
          (Oxford  North)    [600 2000]
          (Oxford  SWest)    [300 2000]
          (Oxford  SEast)    [200 2000]
          (Oxford  Midlands) [400  500] ]

FUELCOST: 17

Back to examples browserPrevious exampleNext example