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, callback specification by name: foliocbm.mos; using an 'mpsol' object: foliocb_sol.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, MIP, NLP infeasible (folioiis.mos, foliomiis.mos, folionliis.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)
    • main 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)
    • main 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





folioqp.dat

! Data file for `folioqp.mos'

        ! trs haw thr tel brw hgw car bnk sof elc
RET: [(1)   5  17  26  12   8   9   7   6  31  21]

           ! trs  haw  thr  tel  brw  hgw  car  bnk  sof  elc
VAR: [ (1 1) 0.1    0    0    0    0    0    0    0    0    0 ! treasury
       (2 1)   0   19   -2    4    1    1    1  0.5   10    5 ! hardware
       (3 1)   0   -2   28    1    2    1    1    0   -2   -1 ! theater
       (4 1)   0    4    1   22    0    1    2    0    3    4 ! telecom
       (5 1)   0    1    2    0    4 -1.5   -2   -1    1    1 ! brewery
       (6 1)   0    1    1    1 -1.5  3.5    2  0.5    1  1.5 ! highways
       (7 1)   0    1    1    2   -2    2    5  0.5    1  2.5 ! cars
       (8 1)   0  0.5    0    0   -1  0.5  0.5    1  0.5  0.5 ! bank
       (9 1)   0   10   -2    3    1    1    1  0.5   25    8 ! software
      (10 1)   0    5   -1    4    1  1.5  2.5  0.5    8   16 ! electronics
      ]

RISK: [2 3 4 9 10]

NA: [1 2 3 4]

Back to examples browserPrevious exampleNext example