Mixed Integer Linear Programming in R



Similar documents
Using the analytic center in the feasibility pump

Modeling and solving linear programming with R. Jose M Sallan Oriol Lordan Vicenc Fernandez

Cloud Branching. Timo Berthold. joint work with Domenico Salvagnin (Università degli Studi di Padova)

An Overview Of Software For Convex Optimization. Brian Borchers Department of Mathematics New Mexico Tech Socorro, NM

Optimization applications in finance, securities, banking and insurance

The Gurobi Optimizer

Optimization Methods in Finance

Noncommercial Software for Mixed-Integer Linear Programming

Collaborative Software Development Using R-Forge

Performance of Optimization Software - an Update

Financial Optimization ISE 347/447. Preliminaries. Dr. Ted Ralphs

CPLEX Tutorial Handout

TOMLAB - For fast and robust largescale optimization in MATLAB

Lecture 11: 0-1 Quadratic Program and Lower Bounds

How To Solve A Minimum Set Covering Problem (Mcp)

Using diversification, communication and parallelism to solve mixed-integer linear programs

Conic optimization: examples and software

Advanced Lecture on Mathematical Science and Information Science I. Optimization in Finance

Compact Mathematical Programs For DEC-MDPs With Structured Agent Interactions

PuLP: A Linear Programming Toolkit for Python

Big Data Optimization at SAS

Introduction: Models, Model Building and Mathematical Optimization The Importance of Modeling Langauges for Solving Real World Problems

An open source software approach to combine simulation and optimization of business processes

Discrete Optimization

A Metaheuristic Optimization Algorithm for Binary Quadratic Problems

Why is SAS/OR important? For whom is SAS/OR designed?

Minimizing costs for transport buyers using integer programming and column generation. Eser Esirgen

On a Railway Maintenance Scheduling Problem with Customer Costs and Multi-Depots

i with R/Rmetrics Diethelm Würtz Yohan Chalabi, Andrew Ellis, Dominik Locher ETH Zurich, Rmetrics Association, Theta Fundmanagement

How to speed-up hard problem resolution using GLPK?

Optimization Modeling for Mining Engineers

Branch-and-Price Approach to the Vehicle Routing Problem with Time Windows

LocalSolver: black-box local search for combinatorial optimization

IBM ILOG CPLEX Optimization Studio Getting Started with CPLEX. Version12Release4

Column Generation in GAMS Extending the GAMS Branch-and-Cut-and-Heuristic (BCH) Facility

A Weighted-Sum Mixed Integer Program for Bi-Objective Dynamic Portfolio Optimization

Lecture 3. Linear Programming. 3B1B Optimization Michaelmas 2015 A. Zisserman. Extreme solutions. Simplex method. Interior point method

Adaptive Stable Additive Methods for Linear Algebraic Calculations

Solving convex MINLP problems with AIMMS

Discuss the size of the instance for the minimum spanning tree problem.

Some representability and duality results for convex mixed-integer programs.

SBB: A New Solver for Mixed Integer Nonlinear Programming

Linear Programming. Widget Factory Example. Linear Programming: Standard Form. Widget Factory Example: Continued.

Strategic planning in LTL logistics increasing the capacity utilization of trucks

CASH FLOW MATCHING PROBLEM WITH CVaR CONSTRAINTS: A CASE STUDY WITH PORTFOLIO SAFEGUARD. Danjue Shang and Stan Uryasev

Business Analytics with. Management Science. Models and Methods. Arben Asllani Professor of Business Analytics, University of Tennessee at Chattanooga

Solving Math Programs with LINGO

Support Vector Machines Explained

Chapter 13: Binary and Mixed-Integer Programming

An Energy-Aware Methodology for Live Placement of Virtual Machines with Variable Profiles in Large Data Centers

5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1

Optimal Scheduling for Dependent Details Processing Using MS Excel Solver

CREATING WEEKLY TIMETABLES TO MAXIMIZE EMPLOYEE PREFERENCES

Guidelines and Procedures for Project Management

A Branch-Cut-and-Price Approach to the Bus Evacuation Problem with Integrated Collection Point and Shelter Decisions

A numerically adaptive implementation of the simplex method

A Constraint Programming based Column Generation Approach to Nurse Rostering Problems

Integrating Benders decomposition within Constraint Programming

Instituto Superior Técnico Masters in Civil Engineering. Lecture 2: Transport networks design and evaluation Xpress presentation - Laboratory work

EXCEL SOLVER TUTORIAL

An Implementation of a Constraint Branching Algorithm for Optimally Solving Airline Crew Pairing Problems

Linear Programming Notes V Problem Transformations

Distributionally Robust Optimization with ROME (part 2)

Completely Positive Cone and its Dual

Energy capacity planning and modeling

Spare part inventory control for an aircraft component repair shop

A Mathematical Programming Solution to the Mars Express Memory Dumping Problem

GAMS, Condor and the Grid: Solving Hard Optimization Models in Parallel. Michael C. Ferris University of Wisconsin

Airport Planning and Design. Excel Solver

Pyomo Online Documentation 4.1. Pyomo Online Documentation 4.1

Mathematical finance and linear programming (optimization)

Calc Guide Chapter 9 Data Analysis

2.3 Convex Constrained Optimization Problems

wu.cloud: Insights Gained from Operating a Private Cloud System

A progressive method to solve large-scale AC Optimal Power Flow with discrete variables and control of the feasibility

DATA AND SOFTWARE INTEROPERABILITY WITH GAMS: A USER PERSPECTIVE

INTEGER PROGRAMMING. Integer Programming. Prototype example. BIP model. BIP models

Combined Virtual Mobile Core Network Function Placement and Topology Optimization with Latency bounds

Package hive. January 10, 2011

Scheduling Algorithm with Optimization of Employee Satisfaction

Introduction to Process Optimization

Semi-Supervised Support Vector Machines and Application to Spam Filtering

How the European day-ahead electricity market works

Locating and sizing bank-branches by opening, closing or maintaining facilities

Basic Components of an LP:

An Introduction on SemiDefinite Program

Transcription:

Mixed Integer Linear Programming in R Stefan Theussl Department of Statistics and Mathematics Wirtschaftsuniversität Wien July 1, 2008

Outline Introduction Linear Programming Quadratic Programming Mixed Integer Programming COIN-OR Initiative R Packages Interfaces to Open Source Solvers Commercial Solvers Optimization Infrastructure for R Benchmarks Outlook and Future Work

Introduction

Applications in Finance Portfolio selection and asset allocation (Markowitz) Pricing and hedging of options Asset/liability management Risk management

Mathematical Programming Linear Programming (LP) Quadratic Programming (QP) Nonlinear Programming (NLP) Additionally if variables have to be of type integer (integer programming IP) Mixed Integer Linear Programming (MILP) Mixed Integer Quadratic Programming (MIQP) Nonlinear Mixed INteger Programming (NMINP)

Linear Programming Mathematical formulation objective min c t x subject to constraints Ax = b x 0 objective variables x i, i = 1,..., N Examples: Asset/liability cash flow matching, asset pricing and arbitrage

Quadratic Programming Mathematical formulation objective min x t Qx subject to constraints Ax = b x 0 objective variables x i, i = 1,..., N Examples: Portfolio selection, asset allocation

Mixed Integer Programming Some variables have to be of type integer E.g., we cannot buy 3.4 shares but 3 or 4 Open source MILP solvers available but currently no open source MIQP solver in R

COIN-OR Initiative

Organization of COIN-OR The COmputational INfrastructure for Operations Research (COIN-OR) project promotes the development and use of interoperable, open source software for operations research Furthermore, it is a repository consisting of several projects Each has its own project manager, wiki, website, mailing list (similar to R-Forge or Sourceforge) Stable releases or snapshots as well es direct source code access through svn are provided Pre-compiled binaries (Linux, Windows) the CoinAll distribution includes a large subset of COIN-OR

The COIN-OR Philosophy Reuse instead of reinvent Reduce development time and increase robustness Increase interoperability Peer review of software Free distribution of ideas Reproducability

COIN-OR Projects Open Solver Interface (OSI) Cut Generator Library (CGL) Branch, Cut and Price Library (BCP) Interior Point Optimization (IPOPT) COIN-OR LP (CLP) SYMPHONY and many more

R Packages

Interfaces to Open Source Solvers Interfaces to the GNU Linear Programming Kit (GLPK) via packages Rglpk and glpk Interfaces to lp solve via packages lpsolve and lpsolveapi and Rsymphony, an interface to the COIN-OR SYMPHONY solver

Interfaces to Open Source Solvers How to solve MILPs in R? Rsymphony solve LP(obj, mat, dir, rhs, bounds = NULL, types = NULL, max = FALSE) Rglpk solve LP(obj, mat, dir, rhs, types = NULL, max = FALSE, bounds = NULL, verbose = FALSE) lp(direction = "min", objective.in, const.mat, const.dir, const.rhs, transpose.constraints = TRUE, int.vec, presolve=0, compute.sens=0, binary.vec, all.int=false, all.bin=false, scale = 196, dense.const, num.bin.solns=1, use.rw=false)

Commercial Solvers Currently an R interface to the CPLEX callable library from ILOG is available Package Rcplex already on CRAN Rcplex is capable of solving linear as well as mixed integer quadratic programs Supports sparse matrices ( simple triplet matrix, Matrix package) CPLEX can be called via Rcplex(cvec, Amat, bvec, Qmat = NULL, lb = 0, ub = Inf, control = list(), objsense = c("min", "max"), sense = "L", vtype = NULL)

Optimization Infrastructure for R

Optimization Infrastructure for R We plan to offer a package for optimization which allows to solve MILPs (and other programs) using a unique interface: OI solve(problem, solver = "lp solve", control = NULL) The main function takes 3 arguments: problem represents an object containing the description of the MILP solver specifies the solver to be used (e.g., GLPK, lp solve, SYMPHONY,... ) control is a list containing additional control arguments to the corresponding solver

Benchmarks

MIPLIB2003 MIPLIB2003 is a collection of real-world mixed integer programs standard test set used to compare the performance of MILP solvers available online at http://miplib.zib.de/miplib2003.php maintained by Alexander Martin, Tobias Achterberg and Thorsten Koch instances in MPS file format can be read in R via Rglpk s MPS file reader

Results of Benchmark Experiment GLPK Rglpk lp solve lpsolve SYMPHONY Rsymphony aflow30a 1158.00 1158.00 1158.00 1158.00 1158.00 1159.00 air04 56137.00 56137.00 56137.00 56137.00 56137.00 air05 26374.00 26374.00 26374.00 26374.00 26374.00 26374.00 cap6000 2451377.00 2451380.00 2451377.00 2451377.00 2451377.00 danoint 65.67 65.67 65.67 65.67 65.67 disctom 5000.00 5000.00 5000.00 fiber 405935.18 405935.18 405935.18 405935.18 fixnet6 3983.00 3983.00 gesa2 25779856.37 24534703.78 25779856.37 manna81 13164.00 13164.00 mas76 40005.05 40005.05 40005.05 40005.05 40005.05 misc07 2810.00 2810.00 2810.00 2810.00 2810.00 2810.00 modglob 20740500.00 20740508.09 20740508.09 20740508.09 nw04 16862.00 16862.00 16862.00 16862.00 16862.00 16862.00 p2756 3124.00 3124.00 pk1 11.00 11.00 11.00 11.00 11.00 11.00 pp08acuts 7350.00 7380.00 7350.00 7350.00 qiu 132.87 132.87 32.06 132.87 132.87 rout 1127.54 1077.56 1077.56 Inf vpm2 13.75 13.75 13.75 7.00 13.75 13.75 Table: Objective values command line solvers and R interfaces

Results of Benchmark Experiment GLPK Rglpk lp solve lpsolve SYMPHONY Rsymphony aflow30a 893.32 712.49 640.06 407.84 350.04 35.42 air04 312.34 191.97 1055.63 84.36 161.92 air05 165.08 92.48 393.31 67.46 32.70 70.17 cap6000 153.29 131.71 130.45 112.21 320.81 74.40 danoint 6.37 1.41 744.72 268.80 1632.76 4021.88 disctom 35.49 29.14 98.50 206.68 fiber 15.74 1.56 0.10 0.10 fixnet6 0.16 0.73 gesa2 80.96 0.11 8639.25 13.51 manna81 0.04 0.06 mas76 632.73 673.62 0.00 4.97 34.51 39.57 misc07 0.89 1.06 0.29 0.30 1.67 4.62 modglob 1689.69 827.89 313.45 1554.79 nw04 13.03 11.85 0.76 0.86 14.25 11.76 p2756 282.10 0.53 pk1 380.72 630.54 5.48 4.66 10.38 23.60 pp08acuts 767.40 3595.35 1412.84 4.47 qiu 397.91 460.61 67.32 135.71 27.96 59.69 rout 21.62 78.36 2963.72 3179.14 10146.32 0.00 vpm2 1686.00 2706.43 96.09 4048.86 17.96 1.97 Table: Comparison of runtimes [min] command line solvers vs. R interfaces

Outlook and Future Work Optimization infrastructure package Interfaces to NMINP solvers Bonmin and LaGO (project RINO on R-Forge) Investigation of SYMPHONY s parallel solver Applications: Consensus ranking of journal ratings, portfolio optimization

Thank you for your attention Further reading: Gerard Cornuejols and Reha Tütüncü. Optimization Methods in Finance. Cambridge University Press, 2006.