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

Folio - Advanced modelling and solving tasks

Description
Advanced modelling and solving tasks for a portfolio optimization problem:
  • Automated solver tuning (foliolptune.mos)
  • Defining an integer solution callback (foliocb.mos)
  • Using the solution enumerator for multiple MIP solutions (folioenumsol.mos)
  • Handling infeasibility
    • handling infeasibility through deviation variables (folioinfeas.mos)
    • retrieving infeasible row/column from presolve (folioinfcause.mos)
    • retrieving IIS - LP or MIP infeasible (folioiis.mos, foliomiis.mos)
    • using the built-in infeasibility repair functionality (foliorep.mos)
    • same as foliorep, using an 'mpsol' object (foliorep_sol.mos)
  • Data transfer in memory
    • running foliomemio.mos with data transfer in memory (runfolio.mos)
    • same running foliomemio2.mos, grouping tables with identical index sets in "initializations" blocks (runfolio2.mos)
    • master model running several model instances in parallel (runfoliopar.mos)
  • Remote models on a distributed architecture
    • running foliomemio.mos on a remote instance of Mosel (runfoliodistr.mos)
    • master model running several model instances in parallel, each on a different (remote) instance of Mosel (runfoliopardistr.mos)
  • Remote execution via XPRD
    • See examples in the Mosel Whitepapers directory moselpar/XPRD
  • XML and JSON data formats
    • reading data from an XML file, solution output in XML format on screen and to a new file (folioxml.mos, folioxmlqp.mos)
    • generate HTML output file as an XML document (runfolioxml.mos)
    • using JSON-format data files, reading data from a JSON file, solution output in JSON format on screen and to a new file (foliojson.mos)
  • HTTP
    • starting an HTTP server managing requests from HTTP clients (foliohttpsrv.mos)
    • HTTP client exchanging XML data files with an HTTP server (foliohttpclient.mos)


Source Files

Data Files





folio10.dat

'RISK': ['hardware1' 'hardware2' 'hardware3' 'hardware4' 'hardware5' 'hardware6' 'hardware7'
 'hardware8' 'hardware9' 'hardware10' 'theater1' 'theater2' 'theater3' 'theater4'
 'theater5' 'theater6' 'theater7' 'theater8' 'theater9' 'theater10' 'telecom1'
 'telecom2' 'telecom3' 'telecom4' 'telecom5' 'telecom6' 'telecom7' 'telecom8'
 'telecom9' 'telecom10' 'software1' 'software2' 'software3' 'software4' 'software5'
 'software6' 'software7' 'software8' 'software9' 'software10' 'electronics1'
 'electronics2' 'electronics3' 'electronics4' 'electronics5' 'electronics6'
 'electronics7' 'electronics8' 'electronics9' 'electronics10']
'RET': [('treasury1') 5.29 ('treasury2') 2.8 ('treasury3') 3.59 ('treasury4') 6.97
 ('treasury5') 3.3 ('treasury6') 3.02 ('treasury7') 2.98 ('treasury8') 3.41
 ('treasury9') 3.93 ('treasury10') 3.86 ('hardware1') 11.36 ('hardware2') 17.23
 ('hardware3') 16.31 ('hardware4') 21.1 ('hardware5') 13.76 ('hardware6') 9.31
 ('hardware7') 16.99 ('hardware8') 24.85 ('hardware9') 18.52 ('hardware10') 12.79
 ('theater1') 36.1 ('theater2') 19.4 ('theater3') 23.5 ('theater4') 34.61 ('theater5') 16.91
 ('theater6') 27.04 ('theater7') 25.82 ('theater8') 24.99 ('theater9') 36.89
 ('theater10') 31.71 ('telecom1') 10.89 ('telecom2') 17.98 ('telecom3') 12.31
 ('telecom4') 6.53 ('telecom5') 6.11 ('telecom6') 15.89 ('telecom7') 12.46
 ('telecom8') 11.11 ('telecom9') 16.6 ('telecom10') 13.93 ('brewery1') 8.79
 ('brewery2') 9.35 ('brewery3') 8.88 ('brewery4') 11.63 ('brewery5') 6.21 ('brewery6') 9.26
 ('brewery7') 4.77 ('brewery8') 5.98 ('brewery9') 10.92 ('brewery10') 5.26
 ('highways1') 5.39 ('highways2') 4.85 ('highways3') 8.34 ('highways4') 8.48
 ('highways5') 6.42 ('highways6') 11.04 ('highways7') 13.15 ('highways8') 10.01
 ('highways9') 7.71 ('highways10') 11.07 ('cars1') 5.74 ('cars2') 7.13 ('cars3') 8.75
 ('cars4') 5.08 ('cars5') 6.23 ('cars6') 8.19 ('cars7') 8.03 ('cars8') 5.96
 ('cars9') 4.17 ('cars10') 8.11 ('bank1') 6.79 ('bank2') 3.01 ('bank3') 4.92
 ('bank4') 4.14 ('bank5') 8.98 ('bank6') 8.81 ('bank7') 4.7 ('bank8') 8.06
 ('bank9') 6.22 ('bank10') 4.47 ('software1') 34.59 ('software2') 44.94 ('software3') 43.05
 ('software4') 15.58 ('software5') 42.05 ('software6') 20.66 ('software7') 20.76
 ('software8') 19.85 ('software9') 20.05 ('software10') 45.38 ('electronics1') 23.07
 ('electronics2') 19.1 ('electronics3') 23.83 ('electronics4') 16.54 ('electronics5') 28.33
 ('electronics6') 25.88 ('electronics7') 22.14 ('electronics8') 22.65 ('electronics9') 12.59
 ('electronics10') 28.1]
'LOC': [('EU') ['treasury1' 'treasury10' 'hardware7' 'hardware9' 'theater8' 'theater10' 'telecom3'
 'telecom9' 'telecom10' 'brewery1' 'brewery4' 'brewery6' 'brewery7' 'brewery8'
 'highways2' 'highways5' 'highways7' 'highways10' 'cars4' 'cars7' 'cars8' 'cars9'
 'cars10' 'bank1' 'bank3' 'bank5' 'bank6' 'bank7' 'bank10' 'software3' 'software4'
 'software5' 'software6' 'electronics2'] ('NA') ['treasury2' 'treasury6' 'treasury7' 'treasury8' 'hardware4' 'hardware6' 'theater1'
 'theater3' 'theater7' 'theater9' 'telecom2' 'telecom4' 'telecom8' 'highways3'
 'highways4' 'cars5' 'cars6' 'bank2' 'bank4' 'bank8' 'bank9' 'software1' 'software2'
 'software9' 'electronics3' 'electronics5' 'electronics6' 'electronics8' 'electronics9'
 'electronics10']
 ('APAC') ['treasury4' 'treasury5' 'treasury9' 'hardware1' 'hardware2' 'hardware5' 'hardware8'
 'hardware10' 'theater2' 'theater4' 'telecom1' 'telecom5' 'telecom6' 'telecom7'
 'brewery9' 'brewery10' 'highways8' 'cars1' 'cars2' 'software7' 'software8'
 'software10' 'electronics1' 'electronics4' 'electronics7']]
'DEV': [('treasury1') 0.12 ('treasury2') 0.13 ('treasury3') 0.08 ('treasury4') 0.13
 ('treasury5') 0.08 ('treasury6') 0.12 ('treasury7') 0.11 ('treasury8') 0.07
 ('treasury9') 0.12 ('treasury10') 0.1 ('hardware1') 24.79 ('hardware2') 22.69
 ('hardware3') 20.02 ('hardware4') 23.35 ('hardware5') 22.78 ('hardware6') 20.95
 ('hardware7') 19.03 ('hardware8') 18.79 ('hardware9') 16.6 ('hardware10') 15.47
 ('theater1') 26.75 ('theater2') 30.09 ('theater3') 19.66 ('theater4') 22.56
 ('theater5') 19.89 ('theater6') 21.51 ('theater7') 33.1 ('theater8') 23.98
 ('theater9') 21.48 ('theater10') 25.69 ('telecom1') 22.51 ('telecom2') 19.06
 ('telecom3') 16.57 ('telecom4') 21.93 ('telecom5') 22.72 ('telecom6') 18.26
 ('telecom7') 17.99 ('telecom8') 21.28 ('telecom9') 27.3 ('telecom10') 24.53
 ('brewery1') 5.22 ('brewery2') 4.65 ('brewery3') 3.11 ('brewery4') 3.8 ('brewery5') 3.85
 ('brewery6') 4.55 ('brewery7') 4.57 ('brewery8') 5.03 ('brewery9') 3.72 ('brewery10') 3.28
 ('highways1') 2.45 ('highways2') 3.39 ('highways3') 3.47 ('highways4') 4.33
 ('highways5') 3.88 ('highways6') 2.99 ('highways7') 4.1 ('highways8') 4.3
 ('highways9') 4.43 ('highways10') 3.6 ('cars1') 3.68 ('cars2') 5.87 ('cars3') 3.34
 ('cars4') 4.71 ('cars5') 5.25 ('cars6') 6.23 ('cars7') 3.49 ('cars8') 4.67
 ('cars9') 3.99 ('cars10') 4.46 ('bank1') 1.64 ('bank2') 1.75 ('bank3') 1.96
 ('bank4') 1.46 ('bank5') 1.16 ('bank6') 1.51 ('bank7') 1.5 ('bank8') 1.61
 ('bank9') 1.89 ('bank10') 1.54 ('software1') 17.94 ('software2') 27.34 ('software3') 22.53
 ('software4') 20.89 ('software5') 32.45 ('software6') 19.91 ('software7') 31.74
 ('software8') 30.87 ('software9') 31.67 ('software10') 21.75 ('electronics1') 16.81
 ('electronics2') 15.84 ('electronics3') 21.22 ('electronics4') 15.36 ('electronics5') 12.47
 ('electronics6') 11.17 ('electronics7') 16.87 ('electronics8') 11.85 ('electronics9') 15.23
 ('electronics10') 19.28]
'SEC': [('bonds') ['treasury1' 'treasury2' 'treasury3' 'treasury4' 'treasury5' 'treasury6' 'treasury7'
 'treasury8' 'treasury9' 'treasury10'] ('technology') ['hardware1' 'hardware2' 'hardware3' 'hardware4' 'hardware5' 'hardware6' 'hardware7'
 'hardware8' 'hardware9' 'hardware10' 'software1' 'software2' 'software3' 'software4'
 'software5' 'software6' 'software7' 'software8' 'software9' 'software10' 'electronics1'
 'electronics2' 'electronics3' 'electronics4' 'electronics5' 'electronics6'
 'electronics7' 'electronics8' 'electronics9' 'electronics10']
 ('entertainment') ['theater1' 'theater2' 'theater3' 'theater4' 'theater5' 'theater6' 'theater7'
 'theater8' 'theater9' 'theater10'] ('telecom') ['telecom1' 'telecom2' 'telecom3' 'telecom4' 'telecom5' 'telecom6' 'telecom7'
 'telecom8' 'telecom9' 'telecom10']
 ('food') ['brewery1' 'brewery2' 'brewery3' 'brewery4' 'brewery5' 'brewery6' 'brewery7'
 'brewery8' 'brewery9' 'brewery10'] ('construction') ['highways1' 'highways2' 'highways3' 'highways4' 'highways5' 'highways6' 'highways7'
 'highways8' 'highways9' 'highways10']
 ('manufacturing') ['cars1' 'cars2' 'cars3' 'cars4' 'cars5' 'cars6' 'cars7' 'cars8' 'cars9' 'cars10']
 ('finance') ['bank1' 'bank2' 'bank3' 'bank4' 'bank5' 'bank6' 'bank7' 'bank8' 'bank9' 'bank10']]
'LOCTAB': [('EU' 'treasury1') 1 ('EU' 'treasury10') 1 ('EU' 'hardware7') 1 ('EU' 'hardware9') 1
 ('EU' 'theater8') 1 ('EU' 'theater10') 1 ('EU' 'telecom3') 1 ('EU' 'telecom9') 1
 ('EU' 'telecom10') 1 ('EU' 'brewery1') 1 ('EU' 'brewery4') 1 ('EU' 'brewery6') 1
 ('EU' 'brewery7') 1 ('EU' 'brewery8') 1 ('EU' 'highways2') 1 ('EU' 'highways5') 1
 ('EU' 'highways7') 1 ('EU' 'highways10') 1 ('EU' 'cars4') 1 ('EU' 'cars7') 1
 ('EU' 'cars8') 1 ('EU' 'cars9') 1 ('EU' 'cars10') 1 ('EU' 'bank1') 1 ('EU'
 'bank3') 1 ('EU' 'bank5') 1 ('EU' 'bank6') 1 ('EU' 'bank7') 1 ('EU' 'bank10') 1
 ('EU' 'software3') 1 ('EU' 'software4') 1 ('EU' 'software5') 1 ('EU' 'software6') 1
 ('EU' 'electronics2') 1 ('NA' 'treasury2') 1 ('NA' 'treasury6') 1 ('NA' 'treasury7') 1
 ('NA' 'treasury8') 1 ('NA' 'hardware4') 1 ('NA' 'hardware6') 1 ('NA' 'theater1') 1
 ('NA' 'theater3') 1 ('NA' 'theater7') 1 ('NA' 'theater9') 1 ('NA' 'telecom2') 1
 ('NA' 'telecom4') 1 ('NA' 'telecom8') 1 ('NA' 'highways3') 1 ('NA' 'highways4') 1
 ('NA' 'cars5') 1 ('NA' 'cars6') 1 ('NA' 'bank2') 1 ('NA' 'bank4') 1 ('NA'
 'bank8') 1 ('NA' 'bank9') 1 ('NA' 'software1') 1 ('NA' 'software2') 1 ('NA'
 'software9') 1 ('NA' 'electronics3') 1 ('NA' 'electronics5') 1 ('NA' 'electronics6') 1
 ('NA' 'electronics8') 1 ('NA' 'electronics9') 1 ('NA' 'electronics10') 1 ('APAC'
 'treasury4') 1 ('APAC' 'treasury5') 1 ('APAC' 'treasury9') 1 ('APAC' 'hardware1') 1
 ('APAC' 'hardware2') 1 ('APAC' 'hardware5') 1 ('APAC' 'hardware8') 1 ('APAC'
 'hardware10') 1 ('APAC' 'theater2') 1 ('APAC' 'theater4') 1 ('APAC' 'telecom1') 1
 ('APAC' 'telecom5') 1 ('APAC' 'telecom6') 1 ('APAC' 'telecom7') 1 ('APAC'
 'brewery9') 1 ('APAC' 'brewery10') 1 ('APAC' 'highways8') 1 ('APAC' 'cars1') 1
 ('APAC' 'cars2') 1 ('APAC' 'software7') 1 ('APAC' 'software8') 1 ('APAC' 'software10') 1
 ('APAC' 'electronics1') 1 ('APAC' 'electronics4') 1 ('APAC' 'electronics7') 1]
'SECTAB': [('bonds' 'treasury1') 1 ('bonds' 'treasury10') 1 ('bonds' 'treasury2') 1 ('bonds'
 'treasury6') 1 ('bonds' 'treasury7') 1 ('bonds' 'treasury8') 1 ('bonds' 'treasury4') 1
 ('bonds' 'treasury5') 1 ('bonds' 'treasury9') 1 ('bonds' 'treasury3') 1 ('technology'
 'hardware7') 1 ('technology' 'hardware9') 1 ('technology' 'software3') 1 ('technology'
 'software4') 1 ('technology' 'software5') 1 ('technology' 'software6') 1 ('technology'
 'electronics2') 1 ('technology' 'hardware4') 1 ('technology' 'hardware6') 1
 ('technology' 'software1') 1 ('technology' 'software2') 1 ('technology' 'software9') 1
 ('technology' 'electronics3') 1 ('technology' 'electronics5') 1 ('technology'
 'electronics6') 1 ('technology' 'electronics8') 1 ('technology' 'electronics9') 1
 ('technology' 'electronics10') 1 ('technology' 'hardware1') 1 ('technology'
 'hardware2') 1 ('technology' 'hardware5') 1 ('technology' 'hardware8') 1 ('technology'
 'hardware10') 1 ('technology' 'software7') 1 ('technology' 'software8') 1
 ('technology' 'software10') 1 ('technology' 'electronics1') 1 ('technology'
 'electronics4') 1 ('technology' 'electronics7') 1 ('technology' 'hardware3') 1
 ('entertainment' 'theater8') 1 ('entertainment' 'theater10') 1 ('entertainment'
 'theater1') 1 ('entertainment' 'theater3') 1 ('entertainment' 'theater7') 1
 ('entertainment' 'theater9') 1 ('entertainment' 'theater2') 1 ('entertainment'
 'theater4') 1 ('entertainment' 'theater5') 1 ('entertainment' 'theater6') 1
 ('telecom' 'telecom3') 1 ('telecom' 'telecom9') 1 ('telecom' 'telecom10') 1
 ('telecom' 'telecom2') 1 ('telecom' 'telecom4') 1 ('telecom' 'telecom8') 1
 ('telecom' 'telecom1') 1 ('telecom' 'telecom5') 1 ('telecom' 'telecom6') 1
 ('telecom' 'telecom7') 1 ('food' 'brewery1') 1 ('food' 'brewery4') 1 ('food'
 'brewery6') 1 ('food' 'brewery7') 1 ('food' 'brewery8') 1 ('food' 'brewery9') 1
 ('food' 'brewery10') 1 ('food' 'brewery2') 1 ('food' 'brewery3') 1 ('food'
 'brewery5') 1 ('construction' 'highways2') 1 ('construction' 'highways5') 1
 ('construction' 'highways7') 1 ('construction' 'highways10') 1 ('construction'
 'highways3') 1 ('construction' 'highways4') 1 ('construction' 'highways8') 1
 ('construction' 'highways1') 1 ('construction' 'highways6') 1 ('construction'
 'highways9') 1 ('manufacturing' 'cars4') 1 ('manufacturing' 'cars7') 1 ('manufacturing'
 'cars8') 1 ('manufacturing' 'cars9') 1 ('manufacturing' 'cars10') 1 ('manufacturing'
 'cars5') 1 ('manufacturing' 'cars6') 1 ('manufacturing' 'cars1') 1 ('manufacturing'
 'cars2') 1 ('manufacturing' 'cars3') 1 ('finance' 'bank1') 1 ('finance' 'bank3') 1
 ('finance' 'bank5') 1 ('finance' 'bank6') 1 ('finance' 'bank7') 1 ('finance'
 'bank10') 1 ('finance' 'bank2') 1 ('finance' 'bank4') 1 ('finance' 'bank8') 1
 ('finance' 'bank9') 1]

Back to examples browserPrevious exampleNext example