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

Working with lists

Description
A series of examples showing some of Mosel's list handling functionality:
  • definining lists and initializing lists with values (listinit.mos)
  • enumeration and reversal of lists (listenum.mos)
  • operators on lists (listops.mos)
  • enumeration and reversal of lists (listenum.mos)
  • list access functions (merging two ordered lists, listmerge.mos)
Further explanation of this example: 'Mosel User Guide', Section 8.4 Initializing lists, Section 8.5 Working with lists


Source Files
By clicking on a file name, a preview is opened at the bottom of this page.
listenum.mos[download]
listinit.mos[download]
listmerge.mos[download]
listops.mos[download]

Data Files





listinit.dat

! Data file for 'listinit.mos'

K: [5 4 3 2 1 1 2 3 4 5]

N: [(3 1) ['B' 'C' 'A']
    (5 3) ['D' 'E']
    (6 1) ['H' 'I' 'F' 'G']]

Back to examples browserPrevious exampleNext example