ILOG CPLEX 8.1 Getting Started

Total Page:16

File Type:pdf, Size:1020Kb

ILOG CPLEX 8.1 Getting Started ILOG CPLEX 8.1 Getting Started December 2002 © Copyright 2001, 2002 by ILOG This document and the software described in this document are the property of ILOG and are protected as ILOG trade secrets. They are furnished under a license or non-disclosure agreement, and may be used or copied only within the terms of such license or non-disclosure agreement. No part of this work may be reproduced or disseminated in any form or by any means, without the prior written permission of ILOG S.A. Printed in France CO N T E N T S Table of Contents Preface Introducing ILOG CPLEX . 11 What Is ILOG CPLEX? . .12 ILOG CPLEX Technologies . .13 Optimizer Options . .13 Data Entry Options . .14 Solving an LP with CPLEX Technology . .15 Using the Interactive Optimizer . .15 Concert Technology for C++ Users . .16 Concert Technology for Java Users. .18 Using the Callable Library . .18 What You Need to Know . .21 Manual Organization . .21 Notation in this Manual . .21 Related Documentation. .22 For More Information. .23 Customer Support . .23 Web Site . .23 Chapter 1 Setting Up CPLEX. 25 Installing CPLEX . .26 Setting Up Licensing . .28 ILOG CPLEX 8.1 — GETTING STARTED 5 T ABLE OF CONTENTS Using the Component Libraries . .28 Chapter 2 Interactive Optimizer Tutorial . 31 Starting ILOG CPLEX . .32 Using Help . .32 Entering a Problem . .34 Entering the Example Problem . .34 Using the LP Format . .35 Entering Data . .37 Displaying a Problem. .38 Displaying Problem Statistics. .39 Specifying Item Ranges . .40 Displaying Variable or Constraint Names . .40 Ordering Variables . .41 Displaying Constraints . .41 Displaying the Objective Function . .41 Displaying Bounds . .42 Solving a Problem . .42 Solving the Example Problem . .42 Solution Options. .44 Displaying Post-Solution Information . .45 Performing Sensitivity Analysis . .46 Writing Problem and Solution Files . .47 Selecting a Write File Format. .48 Writing LP Files . .49 Writing Basis Files . .50 Using Path Names . .50 Reading Problem Files . .51 Selecting a Read File Format. .51 Reading LP Files . .51 Using File Extensions. .52 Reading MPS Files . .52 6 ILOG CPLEX 8.1 — GETTING STARTED T ABLE OF C ONTENTS Reading Basis Files . .53 Setting ILOG CPLEX Parameters . .54 Adding Constraints and Bounds . .55 Changing a Problem . .56 Changing Constraint or Variable Names . .57 Changing Sense. .57 Changing Bounds. .58 Removing Bounds . .58 Changing Coefficients . .58 Deleting . .59 Executing Operating System Commands . ..
Recommended publications
  • Julia, My New Friend for Computing and Optimization? Pierre Haessig, Lilian Besson
    Julia, my new friend for computing and optimization? Pierre Haessig, Lilian Besson To cite this version: Pierre Haessig, Lilian Besson. Julia, my new friend for computing and optimization?. Master. France. 2018. cel-01830248 HAL Id: cel-01830248 https://hal.archives-ouvertes.fr/cel-01830248 Submitted on 4 Jul 2018 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. « Julia, my new computing friend? » | 14 June 2018, IETR@Vannes | By: L. Besson & P. Haessig 1 « Julia, my New frieNd for computiNg aNd optimizatioN? » Intro to the Julia programming language, for MATLAB users Date: 14th of June 2018 Who: Lilian Besson & Pierre Haessig (SCEE & AUT team @ IETR / CentraleSupélec campus Rennes) « Julia, my new computing friend? » | 14 June 2018, IETR@Vannes | By: L. Besson & P. Haessig 2 AgeNda for today [30 miN] 1. What is Julia? [5 miN] 2. ComparisoN with MATLAB [5 miN] 3. Two examples of problems solved Julia [5 miN] 4. LoNger ex. oN optimizatioN with JuMP [13miN] 5. LiNks for more iNformatioN ? [2 miN] « Julia, my new computing friend? » | 14 June 2018, IETR@Vannes | By: L. Besson & P. Haessig 3 1. What is Julia ? Open-source and free programming language (MIT license) Developed since 2012 (creators: MIT researchers) Growing popularity worldwide, in research, data science, finance etc… Multi-platform: Windows, Mac OS X, GNU/Linux..
    [Show full text]
  • Numericaloptimization
    Numerical Optimization Alberto Bemporad http://cse.lab.imtlucca.it/~bemporad/teaching/numopt Academic year 2020-2021 Course objectives Solve complex decision problems by using numerical optimization Application domains: • Finance, management science, economics (portfolio optimization, business analytics, investment plans, resource allocation, logistics, ...) • Engineering (engineering design, process optimization, embedded control, ...) • Artificial intelligence (machine learning, data science, autonomous driving, ...) • Myriads of other applications (transportation, smart grids, water networks, sports scheduling, health-care, oil & gas, space, ...) ©2021 A. Bemporad - Numerical Optimization 2/102 Course objectives What this course is about: • How to formulate a decision problem as a numerical optimization problem? (modeling) • Which numerical algorithm is most appropriate to solve the problem? (algorithms) • What’s the theory behind the algorithm? (theory) ©2021 A. Bemporad - Numerical Optimization 3/102 Course contents • Optimization modeling – Linear models – Convex models • Optimization theory – Optimality conditions, sensitivity analysis – Duality • Optimization algorithms – Basics of numerical linear algebra – Convex programming – Nonlinear programming ©2021 A. Bemporad - Numerical Optimization 4/102 References i ©2021 A. Bemporad - Numerical Optimization 5/102 Other references • Stephen Boyd’s “Convex Optimization” courses at Stanford: http://ee364a.stanford.edu http://ee364b.stanford.edu • Lieven Vandenberghe’s courses at UCLA: http://www.seas.ucla.edu/~vandenbe/ • For more tutorials/books see http://plato.asu.edu/sub/tutorials.html ©2021 A. Bemporad - Numerical Optimization 6/102 Optimization modeling What is optimization? • Optimization = assign values to a set of decision variables so to optimize a certain objective function • Example: Which is the best velocity to minimize fuel consumption ? fuel [ℓ/km] velocity [km/h] 0 30 60 90 120 160 ©2021 A.
    [Show full text]
  • TOMLAB –Unique Features for Optimization in MATLAB
    TOMLAB –Unique Features for Optimization in MATLAB Bad Honnef, Germany October 15, 2004 Kenneth Holmström Tomlab Optimization AB Västerås, Sweden [email protected] ´ Professor in Optimization Department of Mathematics and Physics Mälardalen University, Sweden http://tomlab.biz Outline of the talk • The TOMLAB Optimization Environment – Background and history – Technology available • Optimization in TOMLAB • Tests on customer supplied large-scale optimization examples • Customer cases, embedded solutions, consultant work • Business perspective • Box-bounded global non-convex optimization • Summary http://tomlab.biz Background • MATLAB – a high-level language for mathematical calculations, distributed by MathWorks Inc. • Matlab can be extended by Toolboxes that adds to the features in the software, e.g.: finance, statistics, control, and optimization • Why develop the TOMLAB Optimization Environment? – A uniform approach to optimization didn’t exist in MATLAB – Good optimization solvers were missing – Large-scale optimization was non-existent in MATLAB – Other toolboxes needed robust and fast optimization – Technical advantages from the MATLAB languages • Fast algorithm development and modeling of applied optimization problems • Many built in functions (ODE, linear algebra, …) • GUIdevelopmentfast • Interfaceable with C, Fortran, Java code http://tomlab.biz History of Tomlab • President and founder: Professor Kenneth Holmström • The company founded 1986, Development started 1989 • Two toolboxes NLPLIB och OPERA by 1995 • Integrated format for optimization 1996 • TOMLAB introduced, ISMP97 in Lausanne 1997 • TOMLAB v1.0 distributed for free until summer 1999 • TOMLAB v2.0 first commercial version fall 1999 • TOMLAB starting sales from web site March 2000 • TOMLAB v3.0 expanded with external solvers /SOL spring 2001 • Dash Optimization Ltd’s XpressMP added in TOMLAB fall 2001 • Tomlab Optimization Inc.
    [Show full text]
  • Robert Fourer, David M. Gay INFORMS Annual Meeting
    AMPL New Solver Support in the AMPL Modeling Language Robert Fourer, David M. Gay AMPL Optimization LLC, www.ampl.com Department of Industrial Engineering & Management Sciences, Northwestern University Sandia National Laboratories INFORMS Annual Meeting Pittsburgh, Pennsylvania, November 5-8, 2006 Robert Fourer, New Solver Support in the AMPL Modeling Language INFORMS Annual Meeting, November 5-8, 2006 1 AMPL What it is . A modeling language for optimization A system to support optimization modeling What I’ll cover . Brief examples, briefer history Recent developments . ¾ 64-bit versions ¾ floating license manager ¾ AMPL Studio graphical interface & Windows COM objects Solver support ¾ new KNITRO 5.1 features ¾ new CPLEX 10.1 features Robert Fourer, New Solver Support in the AMPL Modeling Language INFORMS Annual Meeting, November 5-8, 2006 2 Ex 1: Airline Fleet Assignment set FLEETS; set CITIES; set TIMES circular; set FLEET_LEGS within {f in FLEETS, c1 in CITIES, t1 in TIMES, c2 in CITIES, t2 in TIMES: c1 <> c2 and t1 <> t2}; # (f,c1,t1,c2,t2) represents the availability of fleet f # to cover the leg that leaves c1 at t1 and # whose arrival time plus turnaround time at c2 is t2 param leg_cost {FLEET_LEGS} >= 0; param fleet_size {FLEETS} >= 0; Robert Fourer, New Solver Support in the AMPL Modeling Language INFORMS Annual Meeting, November 5-8, 2006 3 Ex 1: Derived Sets set LEGS := setof {(f,c1,t1,c2,t2) in FLEET_LEGS} (c1,t1,c2,t2); # the set of all legs that can be covered by some fleet set SERV_CITIES {f in FLEETS} := union {(f,c1,c2,t1,t2)
    [Show full text]
  • Julia: a Modern Language for Modern ML
    Julia: A modern language for modern ML Dr. Viral Shah and Dr. Simon Byrne www.juliacomputing.com What we do: Modernize Technical Computing Today’s technical computing landscape: • Develop new learning algorithms • Run them in parallel on large datasets • Leverage accelerators like GPUs, Xeon Phis • Embed into intelligent products “Business as usual” will simply not do! General Micro-benchmarks: Julia performs almost as fast as C • 10X faster than Python • 100X faster than R & MATLAB Performance benchmark relative to C. A value of 1 means as fast as C. Lower values are better. A real application: Gillespie simulations in systems biology 745x faster than R • Gillespie simulations are used in the field of drug discovery. • Also used for simulations of epidemiological models to study disease propagation • Julia package (Gillespie.jl) is the state of the art in Gillespie simulations • https://github.com/openjournals/joss- papers/blob/master/joss.00042/10.21105.joss.00042.pdf Implementation Time per simulation (ms) R (GillespieSSA) 894.25 R (handcoded) 1087.94 Rcpp (handcoded) 1.31 Julia (Gillespie.jl) 3.99 Julia (Gillespie.jl, passing object) 1.78 Julia (handcoded) 1.2 Those who convert ideas to products fastest will win Computer Quants develop Scientists prepare algorithms The last 25 years for production (Python, R, SAS, DEPLOY (C++, C#, Java) Matlab) Quants and Computer Compress the Scientists DEPLOY innovation cycle collaborate on one platform - JULIA with Julia Julia offers competitive advantages to its users Julia is poised to become one of the Thank you for Julia. Yo u ' v e k i n d l ed leading tools deployed by developers serious excitement.
    [Show full text]
  • Open Source Tools for Optimization in Python
    Open Source Tools for Optimization in Python Ted Ralphs Sage Days Workshop IMA, Minneapolis, MN, 21 August 2017 T.K. Ralphs (Lehigh University) Open Source Optimization August 21, 2017 Outline 1 Introduction 2 COIN-OR 3 Modeling Software 4 Python-based Modeling Tools PuLP/DipPy CyLP yaposib Pyomo T.K. Ralphs (Lehigh University) Open Source Optimization August 21, 2017 Outline 1 Introduction 2 COIN-OR 3 Modeling Software 4 Python-based Modeling Tools PuLP/DipPy CyLP yaposib Pyomo T.K. Ralphs (Lehigh University) Open Source Optimization August 21, 2017 Caveats and Motivation Caveats I have no idea about the background of the audience. The talk may be either too basic or too advanced. Why am I here? I’m not a Sage developer or user (yet!). I’m hoping this will be a chance to get more involved in Sage development. Please ask lots of questions so as to guide me in what to dive into! T.K. Ralphs (Lehigh University) Open Source Optimization August 21, 2017 Mathematical Optimization Mathematical optimization provides a formal language for describing and analyzing optimization problems. Elements of the model: Decision variables Constraints Objective Function Parameters and Data The general form of a mathematical optimization problem is: min or max f (x) (1) 8 9 < ≤ = s.t. gi(x) = bi (2) : ≥ ; x 2 X (3) where X ⊆ Rn might be a discrete set. T.K. Ralphs (Lehigh University) Open Source Optimization August 21, 2017 Types of Mathematical Optimization Problems The type of a mathematical optimization problem is determined primarily by The form of the objective and the constraints.
    [Show full text]
  • Benchmarks for Current Linear and Mixed Integer Optimization Solvers
    ACTA UNIVERSITATIS AGRICULTURAE ET SILVICULTURAE MENDELIANAE BRUNENSIS Volume 63 207 Number 6, 2015 http://dx.doi.org/10.11118/actaun201563061923 BENCHMARKS FOR CURRENT LINEAR AND MIXED INTEGER OPTIMIZATION SOLVERS Josef Jablonský1 1 Department of Econometrics, Faculty of Informatics and Statistics, University of Economics, Prague, nám. W. Churchilla 4, 130 67 Praha 3, Czech Republic Abstract JABLONSKÝ JOSEF. 2015. Benchmarks for Current Linear and Mixed Integer Optimization Solvers. Acta Universitatis Agriculturae et Silviculturae Mendelianae Brunensis, 63(6): 1923–1928. Linear programming (LP) and mixed integer linear programming (MILP) problems belong among very important class of problems that fi nd their applications in various managerial consequences. The aim of the paper is to discuss computational performance of current optimization packages for solving large scale LP and MILP optimization problems. Current market with LP and MILP solvers is quite extensive. Probably among the most powerful solvers GUROBI 6.0, IBM ILOG CPLEX 12.6.1, and XPRESS Optimizer 27.01 belong. Their attractiveness for academic research is given, except their computational performance, by their free availability for academic purposes. The solvers are tested on the set of selected problems from MIPLIB 2010 library that contains 361 test instances of diff erent hardness (easy, hard, and not solved). Keywords: benchmark, linear programming, mixed integer linear programming, optimization, solver INTRODUCTION with integer variables need not be solved even Solving linear and mixed integer linear in case of a very small size of the given problem. optimization problems (LP and MILP) that Real-world optimization problems have usually belong to one of the most o en modelling tools, many thousands of variables and/or constraints.
    [Show full text]
  • Optimization of the Algal Biomass to Biodiesel Supply Chain: Case Studies of the State of Oklahoma and the United States
    processes Article Optimization of the Algal Biomass to Biodiesel Supply Chain: Case Studies of the State of Oklahoma and the United States Soumya Yadala 1, Justin D. Smith 1, David Young 2, Daniel W. Crunkleton 1 and Selen Cremaschi 2,* 1 Russell School of Chemical Engineering, The University of Tulsa, Tulsa, OK 74104, USA; [email protected] (S.Y.); [email protected] (J.D.S.); [email protected] (D.W.C.) 2 Department of Chemical Engineering, Auburn University, Auburn, AL 36830, USA; [email protected] * Correspondence: [email protected] Received: 29 February 2020; Accepted: 15 April 2020; Published: 18 April 2020 Abstract: The goal of this work is to design a supply chain network that distributes algae biomass from supply locations to meet biodiesel demand at specified demand locations, given a specified algae species, cultivation (i.e., supply) locations, demand locations, and demand requirements. The final supply chain topology includes the optimum sites to grow biomass, to extract algal oil from the biomass, and to convert the algae oil into biodiesel. The objective is to minimize the overall cost of the supply chain, which includes production, operation, and transportation costs over a planning horizon of ten years. Algae production was modeled both within the U.S. State of Oklahoma, as well as the entire contiguous United States. The biodiesel production cost was estimated at $7.07 per U.S. gallon ($1.87 per liter) for the State of Oklahoma case. For the contiguous United States case, a lower bound on costs of $13.68 per U.S.
    [Show full text]
  • FICO Xpress Optimization Suite Webinar
    FICO Xpress Optimization Suite Webinar Oliver Bastert Senior Manager Xpress Product Management September 22 2011 Confidential. This presentation is provided for the recipient only and cannot be reproduced or shared without Fair Isaac Corporation's express consent. 1 © 2011 Fair Isaac Corporation. Agenda » Introduction to FICO » Introduction to FICO Xpress Optimization Suite » Performance » Distributed Modelling and Solving » Case Q&A 2 © 2011 Fair Isaac Corporation. Confidential.© 2011 Fair Isaac Corporation. Confidential. Introduction to FICO 3 © 2011 Fair Isaac Corporation. Confidential. FICO Snapshot The leader in predictive analytics for decision management Founded: 1956 Profile NYSE: FICO Revenues: $605 million (fiscal 2010) Scores and related analytic models Products Analytic applications for risk management, fraud, marketing and Services Tools for decision management Clients and 5,000+ clients in 80 countries Markets Industry focus: Banking, insurance, retail, health care #1 in services operations analytics (IDC) Recent #7 in worldwide business analytics software (IDC) Rankings #26 in the FinTech 100 (American Banker) 20+ offices worldwide, HQ in Minneapolis, USA Offices 2,200 employees Regional Hubs: San Rafael (CA), New York, London, Birmingham (UK), Munich, Madrid, Sao Paulo, Bangalore, Beijing, Singapore 4 © 2011 Fair Isaac Corporation. Confidential. FICO delivers superior predictive analytic solutions that drive smarter decisions. Thousands of businesses worldwide, including 9 of the top Fortune 10, rely on FICO to make every
    [Show full text]
  • Pyomo and Jump – Modeling Environments for the 21St Century
    Qi Chen and Braulio Brunaud Pyomo and JuMP – Modeling environments for the 21st century EWO Seminar Carnegie Mellon University March 10, 2017 1.All the information provided is coming from the standpoint of two somewhat expert users in Pyomo and Disclaimer JuMP, former GAMS users 2. All the content is presented to the best of our knowledge 2 The Optimization Workflow . These tasks usually involve many tools: Data Input – Databases – Excel – GAMS/AMPL/AIMMS/CPLEX Data – Tableau Manipulation . Can a single tool be used to complete the entire workflow? Optimization Analysis Visualization 3 Optimization Environments Overview Visualization End User ● Different input sources ● Easy to model ● AMPL: Specific modeling constructs ○ Piecewise ○ Complementarity Modeling conditions ○ Logical Implications ● Solver independent models ● Developing complex algorithms can be challenging ● Large number of solvers available Advanced Optimization algorithms Expert ● Commercial 4 Optimization Environments Overview Visualization End User ● Different input sources ● Build input forms ● Easy to model ● Multiplatform: ○ Standalone Modeling ○ Web ○ Mobile ● Solver independent models ● Build visualizations ● Commercial Advanced Optimization algorithms Expert 5 Optimization Environments Overview Visualization End User ● Different input sources ● Hard to model ● Access to the full power of a solver ● Access to a broad range of tools Modeling ● Solver-specific models ● Building visualizations is hard ● Open source and free Advanced Optimization Expert algorithms solver
    [Show full text]
  • Real-Time Online Model Predictive Control!
    Real-time online Model Predictive Control! Colin Jones, Melanie Zeilinger, Stefan Richter! Automatic Control Laboratory, EPFL! Real-time synthesis : Complexity as a specification! MPC problem! Computational" Embedded" Real" method! Processor! time!! N 1 − J (x0) = min VN (xN )+ l(xi,ui) ui i=0 s.t. xi+1 = f(xi,ui) (x ,u ) i i ∈ X × U x N ∈ XN • Hardware platform bounds computation time and storage! • Current real-time explicit methods are limited to small problem dimensions! ! Online MPC can be applied to all problem dimensions ! ! This talk: Real-time online MPC for high-speed large-scale systems! ! Fast online optimization! ! Satisfaction of real-time constraint! ! !"#$%!#&'('$)#*$+( +!,$*!#$*- Fast online optimization! Many methods available:! ! CVX! CVXMOD! CVXGEN! ! Matlab Software for Convex optimization Code Generation for Disciplined Convex software in Python! Convex Optimization ! Programming! http://cvxmod.net/! http://cvxgen.net/! qpOases! http://cvxr.com/cvx/! Online Active Set Strategy! ! ! ! http://www.kuleuven.be/ ! optec/software/qpOASES! ! OOQP! Object-oriented software ! for quadratic programming! QPSchur! http://pages.cs.wisc.edu/ A dual, active-set, Schur-complement ! ~swright/ooqp/! method for large-scale and structured convex quadratic programming! …many more! ! [Bartlett et al., ‘06]! ! ! Online optimization can be applied to control high-speed systems! No guarantees on system theoretic properties when applied to MPC in a real-time setting. ! !"#$%!#&'('$)#*$+( +!,$*!#$*- Example: " Effect of limited computation
    [Show full text]
  • CME 338 Large-Scale Numerical Optimization Notes 2
    Stanford University, ICME CME 338 Large-Scale Numerical Optimization Instructor: Michael Saunders Spring 2019 Notes 2: Overview of Optimization Software 1 Optimization problems We study optimization problems involving linear and nonlinear constraints: NP minimize φ(x) n x2R 0 x 1 subject to ` ≤ @ Ax A ≤ u; c(x) where φ(x) is a linear or nonlinear objective function, A is a sparse matrix, c(x) is a vector of nonlinear constraint functions ci(x), and ` and u are vectors of lower and upper bounds. We assume the functions φ(x) and ci(x) are smooth: they are continuous and have continuous first derivatives (gradients). Sometimes gradients are not available (or too expensive) and we use finite difference approximations. Sometimes we need second derivatives. We study algorithms that find a local optimum for problem NP. Some examples follow. If there are many local optima, the starting point is important. x LP Linear Programming min cTx subject to ` ≤ ≤ u Ax MINOS, SNOPT, SQOPT LSSOL, QPOPT, NPSOL (dense) CPLEX, Gurobi, LOQO, HOPDM, MOSEK, XPRESS CLP, lp solve, SoPlex (open source solvers [7, 34, 57]) x QP Quadratic Programming min cTx + 1 xTHx subject to ` ≤ ≤ u 2 Ax MINOS, SQOPT, SNOPT, QPBLUR LSSOL (H = BTB, least squares), QPOPT (H indefinite) CLP, CPLEX, Gurobi, LANCELOT, LOQO, MOSEK BC Bound Constraints min φ(x) subject to ` ≤ x ≤ u MINOS, SNOPT LANCELOT, L-BFGS-B x LC Linear Constraints min φ(x) subject to ` ≤ ≤ u Ax MINOS, SNOPT, NPSOL 0 x 1 NC Nonlinear Constraints min φ(x) subject to ` ≤ @ Ax A ≤ u MINOS, SNOPT, NPSOL c(x) CONOPT, LANCELOT Filter, KNITRO, LOQO (second derivatives) IPOPT (open source solver [30]) Algorithms for finding local optima are used to construct algorithms for more complex optimization problems: stochastic, nonsmooth, global, mixed integer.
    [Show full text]