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





folio.xml

<portfolio>
 <share name="treasury" ret="5" dev="0.1" country="Canada" region="NA" risk="low" /> 
 <share name="hardware" ret="17" dev="19" country="USA" region="NA" risk="high" /> 
 <share name="theater" ret="26" dev="28" country="USA" region="NA" risk="high" /> 
 <share name="telecom"  ret="12" dev="22" country="USA" region="NA" risk="high" />
 <share name="brewery"  ret="8" dev="4" country="UK" region="Europe" risk="low" />
 <share name="highways" ret="9" dev="3.5" country="UK" region="Europe" risk="low" /> 
 <share name="cars"  ret="7" dev="5" country="Germany" region="Europe" risk="low" />
 <share name="bank" ret="6" dev="0.5" country="Luxemburg" region="Europe" risk="low" /> 
 <share name="software" ret="31" dev="25" country="India" region="Asia" risk="high" /> 
 <share name="electronics" ret="21" dev="16" country="Japan" region="Asia" risk="high" />
</portfolio>

Back to examples browserPrevious exampleNext example