FICO® Xpress Optimization Suite Advances to modelling and deploying optimization applications with Xpress Zsolt Csizmadia Andy Harrison Susanne Heipcke Principal Engineer Principal Consultant Principal Engineer Xpress Optimization Optimization Solutions Xpress Optimization FICO FICO FICO

© 2014 Fair Isaac Corporation. Confidential. This presentation is provided for the recipient only and cannot be reproduced or shared without Fair Isaac Corporation’s express consent. Agenda ► Introduction

► Solver performance improvements and new functionality

► New features of Xpress-Mosel

► Optimization Modeler demo

► Q&A

2 © 2014 Fair Isaac Corporation. Confidential. FICO Snapshot

The leader in analytic solutions for customer engagement Founded: 1956 Profile NYSE: FICO Revenues: $743 million (fiscal 2013) Scores and related analytic models Products Analytic applications for customer acquisition, service and security and Services Tools for decision management Clients and 5,000+ clients in 90+ countries Markets Industry focus: Banking, insurance, retail, health care #1 in services operations analytics (IDC)* Recent #6 in worldwide analytics analytics software (IDC)* Rankings #7 in Business Intelligence, CPM and Analytic Applications (Gartner)** #26 in the FinTech 100 (American Banker) 20+ offices worldwide, HQ in San Jose, California Offices 2,200 employees Regional Hubs: San Rafael and San Diego (CA), New York, London, Birmingham (UK), Johannesburg, Milan, Moscow, Munich, Madrid, Istanbul, Sao Paulo, Bangalore, Beijing, Singapore

*IDC, Worldwide Business Analytics Software 2013-2017 Forecast and Vendor Shares, June 2013. **Gartner, Market Share Analysis: Business intelligence, Analytics and Performance Management, 2012,Dan Sommer & Bhavish Sood, May 7, 2013. 3 © 2014 Fair Isaac Corporation. Confidential. FICO Has Pioneered Game-Changing Analytics for 50+ Years ► First credit line optimization ► FICO holds 130+ patents in analytic solutions ► First predictive and decision management technology, ► First cloud- with an additional 90+ patents pending systems for based decision insurance fraud management ► First cross- ► First analytic platform ► We are pioneers at transforming bureau credit systems for ► Worlds fastest Big Data into insights that drive scores retailers to optimization optimize offers ► First small solver profitable growth ► First insurance business ► First adaptive underwriting ► First self- scoring scoring systems analytics for calibrating fraud systems ► First neural analytics for network-based ► First credit fraud ► First ► First adaptive fraud solutions capacity scores ► First automated control ► First commercially origination systems for ► First cardholder ► First score for economically available credit systems with managing card profiling for prescription calibrated credit scoring systems analytics accounts fraud adherence scores

1960s 1970s 1980s 1990s 2000s 2010s

4 © 2014 Fair Isaac Corporation. Confidential. FICO Portfolio

FICO® Analytic Cloud FRAUD MANAGEMENT CUSTOMER ORIGINATIONS MARKETING & CUSTOMER ENGAGEMENT DEBT MANAGEMENT

FICO® Falcon® Fraud Manager FICO® Origination Manager FICO® TRIAD® Customer Manager FICO® Debt Manager™ solution

FICO® Fraud Resolution Manager FICO® Application Fraud Manager FICO® Customer Dialogue Manager FICO® Risk Intervention Manager

FICO® Application Fraud Manager FICO® LiquidCredit® Service FICO® Analytic Offer Manager FICO® PlacementsPlus® service FICO® Identity Resolution Engine FICO® Customer Communication FICO® Network

FICO FICO® Insurance Fraud Manager Services – Originations

FICO® Retail Fraud Manager Applications

FICO® Merchant Monitoring Fair Isaac AdvisorsConsulting Isaac Fair Services FICO® Claims Fraud Solution

Consortium Fraud Models Consumer and Small Business Behavior Scorecards Collections Scores FICO FICO ServicesProfessional Custom Fraud Models Risk Models Transaction Analytics Collections Optimization Application Fraud Models Application Fraud Models Targeting Models FICO FICO Economic Impact Models

Analytics Claims Fraud Models Time-to-Event Analytics OMNI-CHANNEL COMMUNICATIONS FICO® Customer Communication Services FICO® Engagement Analyzer

APPLICATION DEVELOPMENT, TEMPLATES & FRAMEWORKS

FICO® Application Studio

TOOLS MODEL MONITORING & MANAGEMENT

FICO® Analytic Modeler FICO® Decision Modeler FICO® Optimization Modeler FICO® Identity FICO® Model Central™ Solution

FICO FICO® Model Builder FICO® Blaze Advisor® FICO® Xpress Optimization Suite Resolution Engine

Solution Stack Solution DECISION MANAGEMENT ENGINE FICO® Decision Management Platform

DATA MANAGEMENT & INTEGRATION VISUALIZATION & REPORTING

FICO® Data Orchestrator FICO® Visual Insights Studio

BUSINESS CONSUMER FICO® Score FICO® Expansion Score FICO® Credit Capacity Index myFICO® Service

FICO FICO® Score Open Access FICO® Economic Impact Index FICO® Insurance Risk Scores 5 Scores © 2014 Fair Isaac Corporation. Confidential. Three Main Optimization User Groups

Optimization Modeler Business User/ » User-friendly interface » Rapid “what if” scenario analysis Manager » Rich visualisation and reporting with user-definable dashboards » Data management » Multiuser collaboration » User Access Authentication Business Analyst » Distributed computing » Web Services » Customisable screens

Operations Xpress Optimization » Modelling – Mosel Research » Solvers – Optimizer Professional » Utilities – Tuner, APIs,…

6 © 2014 Fair Isaac Corporation. Confidential. FICO® Xpress Optimization Suite

Flexible, modular, easy-to-learn and use ►Development IDE Modeling ►Distributed modeling and cloud enablement Mosel ►Data connections (file, excel, databases, web services) ►Precompiled for efficiency and IP protection BCL FEATURES ►Robust and Nonlinear modeling

Optimization ►High-performance, scalable and robust LP (Simplex|Barrier), MIP, QP, MIQP, QCQP, Optimizer MIQCQP, SOCP, MISOCP, NLP, MINLP, and CP engines NonLinear ►Great out-of-the-box performance ― advanced users have full control over solution process ►Utilizes multi-core/CPU machines, automatic tuning

Kalis FEATURES ►N-best solutions capabilities and advanced infeasibility handling

►Adapt data and parameters to create and compare scenarios

Applications ►Understand trade-offs and sensitivities Services ►Visualize data and results for analysis ►Collaborate in a multi-user environment Optimization ► BENEFITS Works in a rich client and a web browser — on premise and in the cloud Modeler ►Fully featured APIs including web

7 © 2014 Fair Isaac Corporation. Confidential. FICO Solutions on FICO Decision Management Suite

FICO Analytic Marketplace Buy

FICO Application Studio

Analytic Decision Optimization

Modeler Modeler Modeler Suite

FICO Decision Management Platform Build

Management Management FICO Decision Decision FICO

FICO Visual Insights Studio Manage 8 © 2014 Fair Isaac Corporation. Confidential. Optimization in the Cloud - Concepts

► Optimization as a Service ► Service accepts an optimization model and data, executes, and returns results ► Service accepts data, executes, and returns results ► NOT a “desktop” instance on a remote machine/cloud node ► Optimization Solutions as a Service ► Turns optimization models into collaborative and scalable web applications ► Optimization as part of a Decisioning Platform ► Combine optimization with other analytics technologies seamlessly ► Orchestrate complex solutions ► Flexible deployment options

9 © 2014 Fair Isaac Corporation. Confidential. FICO® Optimization Modeler powered by Xpress

Optimization Modeler helps you develop and deploy optimization applications and services on DMP/FAC and standalone Optimization Modeler Optimization Executor

► Optimization Application Framework which ► Bundles Xpress execution allows you to capabilities (DMP/FAC only) ► analyze trade-offs and sensitivities ► provides web services APIs ► adapt data and parameters to create and ► integrates with FICO Application compare scenarios Studio ► visualize data and results for analysis

► collaborate in a multi-user environment ► web client (and rich analyst client for stand alone) Optimization Modeler is based on the leading optimization and modeling technology Xpress Optimization Suite.

10 © 2014 Fair Isaac Corporation. Confidential. FICO® Optimization Modeler powered by Xpress

► FICO® Optimization Modeler trial and demos: www.ficoanalyticcloud.com (select ‘Sign up’ to create a new account)

► FICO® Xpress: www.fico.com/xpress

11 © 2014 Fair Isaac Corporation. Confidential. Academic Partner Program

► FICO Xpress Optimization Suite

► Special program for degree awarding academic institutions

► Academics and their students may use Xpress for educational purposes

► Two levels of membership: ► Standard: Free 1-year membership ► Premium: Additional benefits for a small charge of £400/$800/€600 per 2-year membership period. http://subscribe.fico.com/Academic-Partner-Program

12 © 2014 Fair Isaac Corporation. Confidential. FICO presentations

► MB-34 Monday, 10:30-12:00 - John Anderson JA5.07, Level 5 A new measure of optimality based on the Karush-Kuhn-Tucker conditions for sequential methods

► MB-18 Monday, 10:30-12:00 - TIC Conference Room B, Level 9 Xpress-Mosel: Modelling for Distributed and Cloud Computing

► TC-02 Tuesday, 12:30-14:00 - Barony Bicentenary Hall From Structures to Heuristics to Global Solvers

► TA-51 Tuesday, 8:30-10:00 - Graham Hills GH542, Level 5 Making an Impact workshop: Modelling Problems

► WD-51 Wednesday, 14:30-16:00 - Graham Hills GH542, Level 5 Making an Impact Workshop: Optimising the real world, robustly

► Booth in the exhibition area 13 © 2014 Fair Isaac Corporation. Confidential. Advances to modelling and deploying optimization applications with Xpress Solver improvements

TD-08 Tuesday, 14:30-16:00 - TIC Conference Room 2, Level 3 © 2014 Fair Isaac Corporation. Confidential. This presentation is provided for the recipient only and cannot be reproduced or shared without Fair Isaac Corporation’s express consent. Detailed solver enhancements Xpress 7.9

Performance ChallengeNewPerformance functionality SolutionNL performance PerformanceNLResults new improvements improvements improvements improvementsfunctionality • Text level 1 • Text level 1 • Text level 1 ►Text level 2 ►Text level 2 • Option to control the • Significantly improved • MIP solution refiner • Significantly improved • Text level 2 nonlinear presolver’s linear algebra routines nonlinear bound and • Working with solutions affinity domain propagation • Improved linear • Extended sensitivity • Support for catching dependency checker • Variable elimination analysis formula evaluation • Improved quadratic • New MINLP heuristics • Primal \ dual integral errors presolve in the nonlinear B&B search • Extended handling of conflict cuts • Reduced memory footprint • Improved barrier on second order cone • Improved perturbation problems logic for degenerate partial derivatives • Scaling improvements

2 © 2014 Fair Isaac Corporation. Confidential. Performance improvements

Test set, speed up in percentages Arithmetic Geometric Main performance driver mean mean

MIPLIB 2010 Benchmark, 1 thread 30% 15%

MIPLIB 2010 Benchmark, 4 thread 33% 12%

Mittelmann LP (dual) Improved presolver & 258% 33% Linear algebra improvements Mittelmann LP (barrier) Improved presolver & 28% 14% Linear algebra improvements Mittelmann LP (concurrent) Improved presolver & 24% 13% Linear algebra improvements

Mittelmann MILP infeasibility 27% 8% Improved conflict-analysis

Mittelmann MILP pathological 129% 76% Improved conflict-analysis

Mittelmann MIQCQP 327% 55% Linear algebra improvements

Mittelmann MIQP 436% 52% Linear algebra improvements

Mittelmann MISOCP 11% 3 © 2014 Fair Isaac Corporation. Confidential. Main performance drivers

Test set, speed up in percentages AVG GEO Main performance driver Significantly improved linear algebra routines MIPLIB 2010 Benchmark, 1 thread 30% 15% Quadratic simplex \ MIQP (Mittelmann MIQP): 55% faster (geo mean) MIPLIB 2010 Benchmark, 4 thread 33% 12% An LU Factorization instance when solving isqp0: Mittelmann LP (dual) Improved presolver & 258% 33% Linear algebra improvements

Mittelmann LP (barrier) Improved presolver & 28% 14% Linear algebra improvements

Mittelmann LP (concurrent) Improved presolver & 24% 13% Linear algebra improvements

Mittelmann MILP infeasibility 27% 8% Improved conflict-analysis

Mittelmann MILP pathological 129% 76% Improved conflict-analysis Basis matrix Lower factor Upper factor Mittelmann MIQCQP Linear algebra improvements 1250 rows, 39300 elements 244806 elements 244877 elements 327% 55% Mittelmann MIQP 436% 52% Linear algebra improvements

Mittelmann MISOCP Improved linear dependency checks 11% Dual simplex (Mittelmann LP) 20% faster (geometric mean) (due to hard problems)

Improved conflict-analysis Mittelmann MILP pathological 76% faster (geometric mean)

4 © 2014 Fair Isaac Corporation. Confidential. MIP solution refiner

Automatic LP refiner in Xpress 7.8 (LP and in tree MIP)

Minimizing problem using Xpress-Optimizer Minimizing LP \xprs_38d0080 Original problem has: 10003 rows 15004 cols 50003 elements Absolute infeasibility Presolved problem has: 9999 rows 15000 cols 39994 elements in postsolved,

Its Obj Value S Ninf Nneg Sum Dual Inf Time unscaled problem 0 -.025332 D 1 2490 .317885 0 10143 -.018288 D 2777 0 .000000 1 (as per problem 13409 -.007692 D 0 0 .000000 1 Uncrunching matrix statement) Optimal solution found Refining primal/dual infeasibility of 3.557e-03 / 2.185e-10 13409 -.007692 P 116 0 .183362 1 13555 -.007691 P 0 0 .000000 1 LP solution refiner Dual solved problem 13555 simplex iterations in 1s

Final objective : -7.691337455060178e-03 Max primal violation (abs / rel) : 9.192e-07 / 1.838e-10 Max dual violation (abs / rel) : 2.311e-07 / 2.311e-07 Max complementarity viol. (abs / rel) : 0.0 / 0.0 All values within tolerances Final absolute Special use case: repeated / iterative solves infeasibility as per problem statement 5 © 2014 Fair Isaac Corporation. Confidential. Final MIP solution refiner

Node BestSoln BestBound Sols Active Depth Gap GInf Time 8110000 .000000 .000000 14 1771266 34 0.0e+000 6 887 8120000 .000000 .000000 14 1771266 40 0.0e+000 5 887 8130000 .000000 .000000 14 1771266 39 0.0e+000 4 887 8140000 .000000 .000000 14 1771266 35 0.0e+000 4 887 8150000 .000000 .000000 14 1771266 29 0.0e+000 3 887 8160000 .000000 .000000 14 1771266 45 0.0e+000 6 888 *** MIP gap is less than MIPABSSTOP/MIPRELSTOP *** *** Search completed *** Time: 902 Nodes: 8168851 Number of integer feasible solutions found is 14 Best integer solution found is .000000 Best bound is .000000 Refining MIP solution (4.847e-06 fractionality 4.619e-14 abs infeasibility) P8168851 .000000 .000000 15 0 39 0.0e+000 0 902 MIP solution refiner Refined MIP solution (0.0 fractionality 8.527e-14 abs infeasibility)

XPRS_REFINEOPS: to enable (off by default) XPRS_LPREFINEITERLIMIT: root and in tree refine limit XPRS_MIPREFINEITERLIMIT: final MIP solution refine limit XPRSrefinemipsol/refinemipsol: API/Mosel version Special case: problems with bigM constructs

6 © 2014 Fair Isaac Corporation. Confidential. Working with solutions

XPRScalcslacks: slacks for a given solution XPRScalcreducedcosts: reduced costs from dual multipliers XPRScalcobjective: objective function XPRScalcsolinfo: abs\rel primal\dual infeasibility, fractionality

Use with the solution refiner or Use with heuristics or to create heuristics (e.g. from inside callbacks).

Mosel counterparts: ‘calcsolinfo’

7 © 2014 Fair Isaac Corporation. Confidential.

Primal \ dual integral: XPRS_PRIMALDUALINTEGRAL

Captures the essence of how good MIP solves behave especially for hard problems that time out anyway

Image by Timo Berthold (FICO) 8 © 2014 Fair Isaac Corporation. Confidential. Improved logging for heuristics

Description Control

* Integral LP relaxation (B&B node solution)

a…z Diving heuristics HEURDIVESTRATEGY HEURSELECT R,L,M,,U Local search heuristics HEURSEARCHROOTSELECT • Relaxation Induced Neighbourhood Search HEURSEARCHTREESELECT (RINS) HEURSEARCHEFFORT • LP centered HEURSELECT • MIP centered (proximity search) • Combination • User F Feasibility pump FEASIBILITYPUMP HEURSELECT S Set packing\partitioning\covering heuristics HEURSELECT

G GUBs and knapsack heuristics HEURSELECT

B Heuristics branching on constraints HEURSELECT

9 © 2014 FairT,E Isaac Corporation. Confidential.Trivial heuristics Always enabled (unless all off) Invoking global search

Starting root cutting & heuristics

Its Type BestSoln BestBound Sols Add Del Gap GInf Time a 4080.000000 3157.377442 1 22.61% 0 0 1 K 4080.000000 3360.140990 1 47 0 17.64% 17 0 … 22 G 4080.000000 3473.697204 1 29 37 14.86% 65 0 Heuristic search started R 4071.000000 3473.697204 2 14.67% 0 0 R 3995.000000 3473.697204 3 13.05% 0 0 Heuristic search stopped ... Starting tree search

Node BestSoln BestBound Sols Active Depth Gap GInf Time 1 3995.000000 3473.697204 3 2 1 13.05% 62 0 ... 300 3995.000000 3517.214173 3 213 6 11.96% 51 1 E 320 3924.000000 3517.214173 4 213 27 10.37% 0 1 E 327 3840.000000 3517.214173 5 213 31 8.41% 0 1 400 3840.000000 3521.504963 5 179 21 8.29% 27 1 500 3840.000000 3527.617835 5 227 24 8.13% 14 1 a 513 3829.000000 3527.617835 6 227 34 7.87% 0 1 600 3829.000000 3530.377035 6 257 29 7.80% 3 1 ... a 7553 3683.000000 3600.825691 10 1385 24 2.23% 0 11 7600 3683.000000 3600.825691 10 1341 15 2.23% 30 11 ... 20000 3683.000000 3652.410392 10 1329 27 0.83% 24 24 * 20733 3677.000000 3655.498701 11 1187 33 0.58% 0 24 * 20941 3675.000000 3655.982863 12 1024 26 0.52% 0 24 21000 3675.000000 3655.982863 12 967 21 0.52% 38 24 * 21063 3664.000000 3656.618185 13 931 24 0.20% 0 24 *** MIP gap is less than MIPABSSTOP/MIPRELSTOP *** *** Search completed *** Time: 25 Nodes: 21997 Number of integer feasible solutions found is 13 Best integer solution found is 3664.000000 Best bound is 3663.635273 10 © 2014 Fair Isaac Corporation. Confidential. Marginal / dual value analysis XPRSestimaterowdualranges (Mosel: ‘estimatemarginals’) “Sensitivity analysis: Just be careful!” B. Jansen, J.J. de Jong, C. Roos, T. Terlaky Which constraints are restrictive by minimize x+y subject to themselves? x + y >= 1 How restrictive a constraint is? 2 x + 2 y >= 2 x >= 0.4 y >= 0.6 end Constraint min estimated solution max estimated C0000001 - 0 - 0 1 C0000002 - 0 - 0 0.5 C0000003 - 0 1 1 C0000004 0 1 1

Enhanced sensitivity analysis: ‘real duals’

11 © 2014 Fair Isaac Corporation. Confidential. Improved nonlinear bound and domain propagation

Tightening bounds with the NLP in mind is pointless (the feasible set does not change).

It is the linear approximation created by XSLP that benefit On by default on - at least one globally optimal solution is retained XSLP_PRESOLVEOPS - may lead to different local optima - part of presolve Applied in MINLP after a feasible solution is found (new cutoff -> tighter bounds)

Benefits: - Tighter approximations - Improved problem recognition (by fixing) - faster MINLP - Helps problem with function domain issues

12 © 2014 Fair Isaac Corporation. Confidential. Nonlinear variable elimination Multi-period nonlinear forecasting models: Limited number of decision variables Large regressions expressions forecasting model parameters for subsequent periods: repeatedly embedded recursive formulas

Expanded formulas get extensively large A recent case: ~100 variables yielding > 232 expression tokens Solution approaches: Transfer variables (harder problems due to artificially constraining the model) (virtual) Eliminations, XSLP_PRESOLVEOPS Cascading (even if the linear expressions have feasible ranges)

Targets models with a large number of intermediate variables

13 © 2014 Fair Isaac Corporation. Confidential. New MINLP heuristics

Problem Statistics 972 ( 0 spare) rows 1019 ( 0 spare) structural columns 4603 ( 0 spare) non-zero elements MINLP heuristics integrated Global Statistics 14 entities 0 sets 0 set members … into the MIP search just as for

Itr. LPS NetObj ErrorSum ErrorCost Unconv. Extended Action normal MILP 1 O 80.269823 23.015655 300.090173 118 0 2 O -103.349132 .000000 .000000 83 0 3 O -102.862524 .000000 .000000 72 0 XSLP_HEURSTRATEGY 4 O -102.869118 .000000 .000000 0 0

Xpress-SLP stopped after 4 iterations. 0 unconverged items No unconverged values in active constraints …

Starting heuristics * 0 1 -93.318014 -102.869118 1 1 10.23% 6 0s MINLP Heuristics stopped Setting tree search absolute cutoff to -93.318 heuristics Invoking SLP global search MIP strategy: SLP within MIP

Node Sols BestSoln BoundEstim Active Depth Gap SLPIts Time 0 1 -93.318014 -102.869118 0 1 10.23% 6 0s 1 1 -93.318014 -102.869118 1 2 10.23% 7 0s …

47 1 -93.318014 -94.308525 1 7 1.06% 140 3s 48 1 -93.318014 -94.222045 0 3 .96% 141 3s Minimizing problem using Xpress-SLP

Itr. LPS NetObj ErrorSum ErrorCost Unconv. Extended Action 1 O -93.318014 .000000 .000000 0 0

Xpress-SLP stopped after 1 iterations. 0 unconverged items No unconverged values in active constraints

14 © 2014 Fair Isaac Corporation. Confidential.

Presolve affinity and reduced memory footprint

XSLP_PRESOLVE: low memory alternative when memory is scarce for one time problems XSLP_PRESOLVELEVEL: maintain recognisability and high level structures

15 © 2014 Fair Isaac Corporation. Confidential. Improved partial derivative perturbation logic

XSLP_DELTAZLIMIT: Placeholder management against local optimality \ stalling

Added focus on piecewise linear and ABS expressions

Use higher level information for guessing a good ? perturbation

16 © 2014 Fair Isaac Corporation. Confidential. Catching formula evaluation errors Helps to identify not well-defined parts of the problem XSLPsetcbcoefevalerror / XSLPprintevalinfo.

Itr. LPS NetObj ErrorSum ErrorCost Unconv. Extended Action 1 O -6.000000 .000000 .000000 1 0 Xpress-SLP error: argument -1.000000e+000 out of range in function SQRT ------> SQRT ( X + 1 ): ‘X = -2.000000' Xpress-SLP error: argument -1.000000e+000 out of range in function LN ------> LN ( Y + 1 ): ‘Y = -2.000000' 2 O 2.000000 .000000 .000000 0 0

Xpress-SLP stopped after 2 iterations. 0 unconverged items No unconverged values in active constraints Formulas with evaluation errors: Observed error in the log [1] (R4), term: = SQRT ( X + 1 ) [1] (R5), term: = LN ( Y + 1 )

Runtime analysis Final summary

17 © 2014 Fair Isaac Corporation. Confidential. Summary of other changes

Improved presolver for quadratic instances Improved handling of Special Ordered Sets Improved barrier on second order cone problems XPRSdumpcontrols XSLP_STOPSTATUS XSLP_ECHOXPRSMESSAGES XSLP_MIPSOLS

18 © 2014 Fair Isaac Corporation. Confidential. Thank You

Xpress Optimization http://www.fico.com/xpress

© 2014 Fair Isaac Corporation. Confidential. This presentation is provided for the recipient only and cannot be reproduced or shared without Fair Isaac Corporation’s express consent. Xpress-Mosel

New features in version 3.10

Y. Colombani and S. Heipcke Xpress Optimization, FICO http://www.fico.com/xpress

c 2015 Fair Isaac Corporation. This presentation is provided for the recipient only and cannot be reproduced or shared without Fair Isaac Corporation’s express consent. Overview N

I Annotations I Regular expressions and improved text handling I R interface I Miscellaneous I redirection of the error stream within a model I new environment variables for restrictions I directory and path separators (mmsystem) I setname for constraints I user and group ID properties for events (mmjobs)

c 2015 Fair Isaac Corporation. Annotations

c 2015 Fair Isaac Corporation. Annotations N

I Annotations: meta data in Mosel source file I stored in the resulting bim file after compilation (compatible with preceding bim format) I no impact on the model itself, treated like comments I Format: I single-line annotation starts with ’!@’ and a name I blocks surrounded by ’(!@’ and ’!)’ I ’!@’ is followed by the annotation name (identifier) I no space between ’!’ and ’@’ characters I Annotations are either global or associated with public globally declared objects (including subroutines)

c 2015 Fair Isaac Corporation. Annotations N

I Annotation markers and categories: I [email protected] denotes the annotation marker descr within category doc I syntax: (!@doc. Enter category ’doc’ (this text is ignored) @ descr This is the value of ’doc.descr’ @. Jump back to root (this text is ignored) @mynote Contents of ’mynote’ (full name: ’.mynote’) @.anote Complete form of an annotation in default category !)

I Predefined category names: mc and doc I also reserved: om I users can define/employ new markers and categories

c 2015 Fair Isaac Corporation. Annotations N I Querying models for annotations I command line: option -a for exam: mosel exam -a mymodel.bim

I mmjobs: annotations of a model or its submodels: procedure getannidents([m:Model,] s:set of string) retrieve the list of annotated symbols for model ’m’ procedure getannotations([m:Model,] id:string, filter:string, anns:set of string, anna:array(string) of string) retrieve annotations starting with ’filter’ associated with identifier ’id’ (global annotations if ’id’ is empty), ’anns’: set of annotation names, ’anna’: array of values procedure getannotations([m:Model,] id:string, filter:string, annl:list of string) retrieve annotations starting with ’filter’ associated with identifier ’id’, ’annl’: list of pairs ’annotation name’,’value’

I also supported by Mosel APIs

c 2015 Fair Isaac Corporation. Annotations N I Declaring annotations: I optional; enables the compiler to check the validity of the definitions and reject non-compliant ones I invalid annotations will not make the compilation fail I achieved via the mc.def compiler annotation I a declaration may be stated several times but its properties cannot be changed I declarations included in models are not exported to the bim file, but declarations in packages are "published" I models using the package inherit the annotation declarations I Example: ! Defining an alias that redirects onto 2 different annotations: [email protected] descr alias doc.descr om.descr

c 2015 Fair Isaac Corporation. Annotations N

I moseldoc tool I generates XML file that is processed into HTML pages I XML tags are a subset of the standard Xpress documentation styles I Usage: 1. Compile source model file with option -D

mosel comp -D mymodel.mos

2. Run program moseldoc

moseldoc mymodel ! Generates HTML and XML moseldoc -html mymodel ! HTML output only moseldoc -o mydir -html mymodel ! Specify HTML output directory moseldoc -xml mymodel ! XML output only moseldoc -ixml mymodel ! XML file for inclusion moseldoc -f mymodel ! Force output overwrite

c 2015 Fair Isaac Corporation. Regular expressions and text handling

c 2015 Fair Isaac Corporation. Regular expressions N

I Regular expression (regex) = sequence of characters forming a search pattern I used to describe or match a set of strings according to certain syntax rules I Mosel supports Basic and Extended Regular Expressions (BRE and ERE) syntax of the POSIX standard I implementation relies on the TRE library I see http://laurikari.net/tre I New functions regmatch and regreplace I new type textarea to store positions (start/end) of matching expressions

c 2015 Fair Isaac Corporation. Regular expressions N

I Example of regex matching: I find all strings starting with ’My’ (using the option ’case-insensitive’)

declarations m: array(range) of textarea t: text end-declarations

t:="MyValue=10,Sometext mytext MoretextMytext2, MYVAL=1.5 mYtext3"

m(0).succ:=1 while(regmatch(t,’ \

! Output: MyValue mytext MYVAL mYtext3

c 2015 Fair Isaac Corporation. Regular expressions N m(0).succ:=1 while(regmatch(t,’ \w+((My)(\w*))’, m(0).succ, REG_ICASE+REG_EXTENDED,m)) writeln("String containing ’My’ (not at beginning): ", copytext(t,m(0)),"(", copytext(t,m(1)), "=", copytext(t,m(2)), "+", copytext(t,m(3)), ")")

! Output: MoretextMytext2 (Mytext2=My+text2)

! \< beginning of word ! \w alphanumeric or underscore characters ! * 0 or more times ! () select the result to be returned, mask with backslash in BRE ! + 1 or more times (only in ERE)

c 2015 Fair Isaac Corporation. Regular expressions N I Example of regex replacement: I change dates of the format yyyy-mm-dd to the format dd/mm/yyyy

t:="date1=20/11/2010,date2=1-Oct-2013,date3=2014-6-30" numr:= regreplace(t, ’([[:digit:]]{4})-([01]?[[:digit:]])-([0-3]?[[:digit:]])’, ’\3/\2/\1’, 1, REG_EXTENDED) if numr>0 then writeln(numr, " replacements: ", t); end-if

! Output: date1=20/11/2010,date2=1-Oct-2013,date3=30/6/2014

! This does the same: numr:= regreplace(t,’( \d{4})-([01]{0,1}\d)-([0-3]{0,1}\d)’, ’\3/\2/\1’, 1, REG_EXTENDED)

! \d or [:digit:] numerical character ! ? 0 times or once (ERE only) ! {M,N} minimum M, maximum N match count (BRE: mask with backslash) ! [] set of possible character matches

c 2015 Fair Isaac Corporation. New text handling functionality N I New type parsectx I use in replacement of module parameter settings I groups ’endparse’, ’sepchar’, ’trim’ and ’qtype’ I access via set*/get* routines

declarations pctx,pctxi: parsectx ivalues: list of integer end-declarations setsepchar(pctx, getchar(",",1)) ! Set ’,’ as separator txt:= text(", , 123.4 , 345.6 ,") while (nextfield(txt,pctx)) do ! Get next field tt:=parsetext(txt, pctx) ! Retrieve text of the field pctxi.endparse:=1 ! Re-initialize ’inner’ context i:=parseint(tt,pctxi) ! Read an integer from the field if getsysstat=0 then ivalues+= [i]; end-if ! Add value to list writeln("Read up to position ", pctx.endparse) ! ’Outer’ context pos. end-do writeln(ivalues) ! Output: [123,345]

c 2015 Fair Isaac Corporation. New text handling functionality N

I New subroutines: tolower, toupper, startswith, endswith

t1:= "AbC123 ?DeFGH§$&\t\\" writeln(tolower(t1)) ! Output: abc123 ?defgh§$& \

t2:= ’AbC123 ?DeFGH§$&\t\\’ writeln(toupper(t2)) ! Output: ABC123 ?DEFGH§$&\T\\

I New versions of parseint, parsereal, parseextn, parsetext, copytext, cuttext and deltext using a textarea

c 2015 Fair Isaac Corporation. R interface

c 2015 Fair Isaac Corporation. R interface N I New module r I evaluate arbitrary R statements: Reval I assigning Mosel scalars (basic types), arrays and sets to R entities: Rset I retrieving information from R: Rgetreal|int|bool|str|arr I system functionality: Rprint, Rerrcode, Rclearerr, Rsource, Rinit, Rfree

uses "r" setparam("Rverbose", true) Print R errors/warning Reval(’now<-date()’) ! Evaluate an R statement Rprint("paste(’Date in R:’, now)") ! R output display writeln(’R version:’, getparam(’Rversion’)) ! Mosel output display Rset("a_number", 1.2) ! Assign Mosel scalar to R entity writeln("a_number is ", Rgetreal("a_number")) ! Retrieve value from R Rsource("/workspace/source.R") ! Sourcing files

c 2015 Fair Isaac Corporation. Miscellaneous

c 2015 Fair Isaac Corporation. Redirecting the error stream N

I Error stream can now be redirected within a model, just like input and output streams I Example: I redirect error and output streams to the same location

fdelete("errlog.txt") ! Optionally, delete existing log file ! Use mode APPEND to avoid partial overwrite ! Use ’tee:’ to duplicate the output (file+screen) fopen("tee:errlog.txt&", F_ERROR+F_APPEND) ! LINBUF is default fopen("tee:errlog.txt&", F_OUTPUT+F_APPEND+F_LINBUF) ... fclose(F_OUTPUT) ! Terminate stream redirection fclose(F_ERROR)

c 2015 Fair Isaac Corporation. Redirecting the error stream N

I Example: I disable error stream for date parsing tests

declarations d: date end-declarations

Formats:=["%.y-%0m-%0d", "%0d/%0m/%0Y", "%d-%N-%y", "%d.%m.%y"] dt:="1-Oct-2015"

fopen("null:", F_ERROR) ! Disable error stream to ignore warnings forall(f in Formats) do setparam("datefmt", f) ! Select a date format parseextn(dt,1,d) ! Parse with the selected format if isvalid(d) then ! Whether date has been recognized writeln("Format used: ", f, " date: ", d); break end-if end-do fclose(F_ERROR) ! IMPORTANT: Re-enable default error stream

c 2015 Fair Isaac Corporation. Mosel server whitelist settings N

I Whitelist settings for xprmsrv restrictions: I MOSEL ROPATH defines a list of paths that can still be accessed for reading when restriction ’WDOnly’ is active I MOSEL RWPATH defines a list of paths that can still be accessed for reading and writing when restriction ’WDOnly’ is active I mmsystem now refers to MOSEL EXECPATH to get a list of authorized paths when restriction ’noExec’ is active (both executables and directories can be specified)

c 2015 Fair Isaac Corporation. Mosel server whitelist settings N I Mosel model: writeln("RWPATH: ", getenv("MOSEL_RWPATH")) writeln("EXECPATH: ", getenv("MOSEL_EXECPATH")) writeln("Restr: ", getenv("MOSEL_RESTR")) writeln("Data file exists and is accessible: ", bittest(getfstat("C:/Test/testdata.dat"),SYS_REG)=SYS_REG)

system("myexectest")

initializations from "C:/Test/testdata.dat" ... end-initializations

I Configuration in file xprmsrv.cfg: [insight] MOSEL_RESTR=NoExecWDOnly MOSEL_RWPATH=C:/Test MOSEL_EXEC=C:/Test/myexectest.exe

c 2015 Fair Isaac Corporation. Directory and path separators N I Directory separator: I all Mosel file handling routines work with "/" as directory separator sign on all supported platforms I under Windows, the backslash can also be used I new: getdirsep to construct platform-specific path as may be required for input into external programs

mypath:= "asubdirectoryname"+ getdirsep+ "data.txt"

I Path separator: I system-specific definition of environment variables and system commands with getpathsep

setenv("PATH", getenv("PATH")+getpathsep+".") system(’javac -cp .’+ getpathsep+ ’"’+ getenv("CLASSPATH") + ’" myprog.java’)

c 2015 Fair Isaac Corporation. setname for constraints N I The new setname routine can be applied to constraints of type linctr and nlctr I debugging facility: define a name including for local constraints I remember to enable XPRS_LOADNAMES to copy model object names into the Optimizer

procedure defineconstraints declarations MyCtr: array(R) of linctr end-declarations

forall(i inR) do MyCtr(i):= ... if DEBUG then setname(MyCtr(i),"MyName_"+i); end-if end-do end-procedure

c 2015 Fair Isaac Corporation. mmjobs N I User and group ID properties I new routines set/getuid and set/getgid to associate user and group IDs to submodels I events now include user and group ID of the sender I new version of waitfor to wait for events of a given ID, user ID or group ID

forall(m in RM) modPar(m).uid:= m ! Store the model ID ... ! Start submodel runs wait ! Wait for an event Msg:= getnextevent m:= Msg.fromuid ! Retrieve the model ID

I Processes created by rcmd now run from same directory as caller, with the same environment (plus variables defined via setenv)

c 2015 Fair Isaac Corporation. Summary

c 2015 Fair Isaac Corporation. Documentation N I Mosel Language Reference Manual I see chapter mmsystem for regular expressions, text handling functionality, and new system functionality I see section ’2.18 Documenting models using annotations’ about the use of moseldoc I see new chapter R about R module functionality I Mosel User Guide I chapter ’Annotations’; section ’17.6 Text handling’ I Examples: I see Moseldoc guide (file mddoc.pdf) and the Mosel model source mddoc.mos from which it is generated I mmjobs: updated examples of Multiple model and parallel solving with Mosel whitepaper

c 2015 Fair Isaac Corporation. Thank You

Y. Colombani and S. Heipcke http://www.fico.com/xpress

c 2015 Fair Isaac Corporation. This presentation is provided for the recipient only and cannot be reproduced or shared without Fair Isaac Corporation’s express consent. FICO® Optimization Modeler powered by Xpress

14 © 2014 Fair Isaac Corporation. Confidential. FICO® Optimization Modeler Optimization Application Framework

Speed to Solution Agility Flexibility

► Provides most needed ► Allows business users ► Enables analysts to optimization application to interact with modify easily functionality out-of- optimization from the-box anywhere ► Applications can be easily extended and ► Mosel model works in ► Optimization model connected Insight within minutes changes are reflected instantly ► Great solution for small ► Powered by fast, robust and large optimization and scalable algorithms ► Changes to the model projects do not require expensive ► Integrates seamlessly ► Embedded into FICO reimplementation of with 3rd-party Decision Management the application components for the best Platform and FICO experience (Tableau®) Analytic Cloud

15 © 2014 Fair Isaac Corporation. Confidential.

FICO® Optimization Modeler powered by Xpress

FICO® Optimization Modeler helps you develop and deploy optimization applications and services that

► Solve the biggest real-world challenges faster than ever

► Lead to the best possible business decisions

► Serve operations research specialists and business analysts

► Run on premise or on the FICO® Analytic Cloud

► Standalone or integrated within FICO® Decision Management Suite FICO® Optimization Modeler is based on the leading optimization and modeling technology FICO® Xpress.

16 © 2014 Fair Isaac Corporation. Confidential. Questions?

© 2014 Fair Isaac Corporation. Confidential. This presentation is provided for the recipient only and cannot be reproduced or shared without Fair Isaac Corporation’s express consent.