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.c)
  • executing a Mosel model (folioexec.c)
  • parameterized model execution (folioparam.c)
  • exporting a matrix (foliomat.c)
  • accessing model results (folioobj.c)
  • data exchange in memory (runfolio.c,runfoliod.c)
  • retrieving solution output from Optimizer callbacks in foliocbio.mos during optimization (runfoliocbio.c)

folioembedc.zip[download all files]

Source Files

Data Files





foliorun.c

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

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

  (c) 2008 Fair Isaac Corporation
      author: S.Heipcke, Aug. 2003
********************************************************/

#include <stdio.h>
#include "xprm_rt.h"

int main(int argc, char *argv[])
{
  XPRMmodel model;
  int result;
  
  XPRMinit();                                  /* Initialize Mosel */
  model = XPRMloadmod("foliodata.bim", NULL);  /* Load compiled model */
  XPRMrunmod(model, &result, NULL);
  XPRMunloadmod(model);

  return 0;
}

Back to examples browserNext example