FICO
FICO Xpress Optimization Examples Repository
FICO Optimization Community FICO Xpress Optimization Home
Back to examples browserNext example

Folio - Embedding examples from 'Getting started'

Description
Simple embedding tasks for a portfolio optimization problem:
  • loading and running a BIM file (foliorun.cs)
  • executing a Mosel model (folioexec.cs)
  • parameterized model execution (folioparam.cs)
  • exporting a matrix (foliomat.cs)
  • accessing model results (folioobj.cs)
  • data exchange in memory (runfolio.cs,runfoliob.cs)
  • retrieving solution output from Optimizer callbacks in foliocbio.mos during optimization (runfoliocbio.cs)

folioembedcs.zip[download all files]

Source Files

Data Files





foliorun.cs

/********************************************************
  Mosel Library Example Problems
  ==============================

  file foliorun.cs
  ````````````````
  Loading and running a BIM file.

  (c) 2009 Fair Isaac Corporation
      author: J.Farmer, Jun. 2009
********************************************************/

using System;
using Mosel;

namespace mosel_getting_started {
 public class foliorun
 {
  public static void Main(string[] args)
  {
   XPRM mosel;
   XPRMModel mod;
 
   mosel = XPRM.Init();                        // Initialize Mosel
 
   mod = mosel.LoadModel("foliodata.bim");     // Load compiled model
   mod.Run();
   
   Console.WriteLine("`foliodata' returned: " + mod.Result);
  }
 }
}

Back to examples browserNext example