Pyomo — Optimization Modeling in Python Second Edition Springer Optimization and Its Applications

Total Page:16

File Type:pdf, Size:1020Kb

Pyomo — Optimization Modeling in Python Second Edition Springer Optimization and Its Applications Springer Optimization and Its Applications 67 William E. Hart Carl D. Laird Jean-Paul Watson David L. Woodruff Gabriel A. Hackebeil Bethany L. Nicholson John D. Siirola Pyomo — Optimization Modeling in Python Second Edition Springer Optimization and Its Applications VOLUME 67 Managing Editor Panos M. Pardalos (University of Florida) Editor–Combinatorial Optimization Ding-Zhu Du (University of Texas at Dallas) AdvisoryBoard J.Birge(UniversityofChicago) S. Butenko (Texas A&M University) F.Giannessi(UniversityofPisa) H.D.Sherali(VirginiaPolytechnicandStateUniversity) T.Terlaky(LehighUniversity) Y. Ye(StanfordUniversity) Aims and Scope Optimization has been expanding in all directions at an astonishing rate during the last few decades. New algorithmic and theoretical techniques have been developed, the diffusion into other disciplines has proceeded at a rapid pace, and our knowledge of all aspects of the field has grown even more profound. At the same time, one of the most striking trends in optimization is the constantly increasing emphasis on the interdisciplinary nature of the field. Optimization has been a basic tool in all areas of applied mathematics, engineering, medicine, economics, and other sciences. The series Springer Optimization and Its Applications publishes under- graduate and graduate textbooks, monographs and state-of-the-art exposi- tory work that focus on algorithms for solving optimization problems and also study applications involving such problems. Some of the topics covered include nonlinear optimization (convex and nonconvex), network flow problems, stochastic optimization, optimal control, discrete optimization, multi-objective programming, description of software packages, approxima- tion techniques and heuristic approaches. More information about this series at http://www.springer.com/series/7393 William E. Hart • Carl D. Laird Jean-Paul Watson • David L. Woodruff Gabriel A. Hackebeil • Bethany L. Nicholson John D. Siirola Pyomo — Optimization Modeling in Python Second Edition William E. Hart Carl D. Laird Sandia National Laboratories Sandia National Laboratories Albuquerque, New Mexico, USA Albuquerque, New Mexico, USA Jean-Paul Watson David L. Woodruff Sandia National Laboratories Graduate School of Management Albuquerque, New Mexico, USA University of California, Davis Davis, California, USA Gabriel A. Hackebeil Department of Industrial Bethany L. Nicholson and Operations Engineering Sandia National Laboratories University of Michigan Albuq uerq ue, New Mexic o, USA Ann Arbor, Michigan, USA John D. Siirola Sandia National Laboratories Albuquerque, New Mexico, USA ISSN 1931-6828 ISSN 1931-6836 (electronic) Springer Optimization and its Applications ISBN 978-3-319-58819-3 ISBN 978-3-319-58821-6 (eBook) DOI 10.1007/978-3-319-58821-6 Library of Congress Control Number: 2017940404 © Springer International Publishing AG 2012, 2017 This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, express or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Printed on acid-free paper This Springer imprint is published by Springer Nature The registered company is Springer International Publishing AG The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland This book is dedicated to future contributors to the Pyomo project. Preface This book describes a tool for mathematical modeling: the Python Optimization Modeling Objects (Pyomo) software. Pyomo supports the formulation and analysis of mathematical models for complex optimization applications. This capability is commonly associated with algebraic modeling languages (AMLs), which support the description and analysis of mathematical models with a high-level language. Although most AMLs are implemented in custom modeling languages, Pyomo’s modeling objects are embedded within Python, a full-featured high-level program- ming language that contains a rich set of supporting libraries. Modeling is a fundamental process in many aspects of scientific research, engi- neering and business, and the widespread availability of computing has made the numerical analysis of mathematical models a commonplace activity. Furthermore, AMLs have emerged as a key capability for robustly formulating large models for complex, real-world applications [53]. AMLs streamline the process of formulating models by simplifying the management of sparse data and supporting the natural ex- pression of model components. Additionally, AMLs like Pyomo support scripting with model objects, which facilitates the custom analysis of complex problems. The core of Pyomo is an object-oriented capability for representing optimization models. Pyomo also contains packages that define modeling extensions and model reformulations. For example, the pyomo.pysp package defines modeling exten- sions for stochastic programs as well as solvers that can analyze these problems. Pyomo also includes packages that define interfaces to solvers like CPLEX and Gurobi, as well as solver services like NEOS. Goals of the Book This second edition provides an updated description of Pyomo’s modeling capabil- ities. A key goal of this book is to provide a broad description of Pyomo that will enable the user to develop and optimize models with Pyomo. The book uses many examples to illustrate different techniques that can be used to formulate models. vii viii Preface Another goal of this book is to illustrate the breadth of Pyomo’s capabilities. Py- omo supports the formulation and analysis of common optimization models, includ- ing linear programs, mixed-integer linear programs, nonlinear programs, mixed- integer nonlinear programs, mathematical programs with equilibrium constraints, generalized disjunctive programs, bilevel programs, and stochastic programs. Addi- tionally, Pyomo includes solver interfaces for a variety of widely used optimization software packages, including CBC, CPLEX, GLPK, and Gurobi. Additionally, Py- omo models can be optimized with optimizers like IPOPT that employ the AMPL Solver Library interface. Finally, a goal of this book is to help users get started with Pyomo even if they have little knowledge of Python. Appendix A provides a quick introduction to Python, but we have been impressed with how well Python reference texts sup- port new Pyomo users. Although Pyomo introduces Python objects and a process for applying them, the expression of models with Pyomo strongly reflects Python’s clean, concise syntax. However, our discussion of Pyomo’s advanced modeling capabilities assumes some background in object-oriented design and features of the Python program- ming language. For example, our discussion of modeling components distinguishes between class definitions and class instances. We have not attempted to describe these advanced features of Python in the book. Thus, a user should expect to develop some familiarity with Python in order to effectively understand and use advanced modeling features. Who Should Read This Book This book provides a reference for students, academic researchers and practitioners. The design of Pyomo is simple enough that it has been effectively used in the class- room with undergraduate and graduate students. However, we assume that the reader is generally familiar with optimization and mathematical modeling. Although this book does not contain a glossary, we recommend the Mathematical Programming Glossary [45] as a reference for the reader. Pyomo is also a valuable tool for academic researchers and practitioners. A key focus of Pyomo development has been on the ability to support the formulation and analysis of real-world applications. Consequently, issues like run-time performance and robust solver interfaces are a priority. Additionally, we believe that researchers will find that Pyomo provides an ef- fective framework for developing high-level optimization and analysis tools. For example, Pyomo provides generic solvers for stochastic programming, and it lever- ages the fact that Pyomo’s modeling objects are embedded within a full-featured high-level programming language. This allows for transparent parallelization of sub-problems using Python parallel communication libraries. This ability to sup- port generic solvers for complex models is very powerful, and we believe that it can be used with many other optimization analysis techniques. Preface ix Revisions for the Second Edition We have made several major changes while preparing the second edition of this book. The book was divided
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]
  • Solving Mixed Integer Linear and Nonlinear Problems Using the SCIP Optimization Suite
    Takustraße 7 Konrad-Zuse-Zentrum D-14195 Berlin-Dahlem fur¨ Informationstechnik Berlin Germany TIMO BERTHOLD GERALD GAMRATH AMBROS M. GLEIXNER STEFAN HEINZ THORSTEN KOCH YUJI SHINANO Solving mixed integer linear and nonlinear problems using the SCIP Optimization Suite Supported by the DFG Research Center MATHEON Mathematics for key technologies in Berlin. ZIB-Report 12-27 (July 2012) Herausgegeben vom Konrad-Zuse-Zentrum f¨urInformationstechnik Berlin Takustraße 7 D-14195 Berlin-Dahlem Telefon: 030-84185-0 Telefax: 030-84185-125 e-mail: [email protected] URL: http://www.zib.de ZIB-Report (Print) ISSN 1438-0064 ZIB-Report (Internet) ISSN 2192-7782 Solving mixed integer linear and nonlinear problems using the SCIP Optimization Suite∗ Timo Berthold Gerald Gamrath Ambros M. Gleixner Stefan Heinz Thorsten Koch Yuji Shinano Zuse Institute Berlin, Takustr. 7, 14195 Berlin, Germany, fberthold,gamrath,gleixner,heinz,koch,[email protected] July 31, 2012 Abstract This paper introduces the SCIP Optimization Suite and discusses the ca- pabilities of its three components: the modeling language Zimpl, the linear programming solver SoPlex, and the constraint integer programming frame- work SCIP. We explain how these can be used in concert to model and solve challenging mixed integer linear and nonlinear optimization problems. SCIP is currently one of the fastest non-commercial MIP and MINLP solvers. We demonstrate the usage of Zimpl, SCIP, and SoPlex by selected examples, give an overview of available interfaces, and outline plans for future development. ∗A Japanese translation of this paper will be published in the Proceedings of the 24th RAMP Symposium held at Tohoku University, Miyagi, Japan, 27{28 September 2012, see http://orsj.or.
    [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]
  • Pysp: Modeling and Solving Stochastic Programs in Python
    Noname manuscript No. (will be inserted by the editor) PySP: Modeling and Solving Stochastic Programs in Python Jean-Paul Watson · David L. Woodruff · William E. Hart Received: September 6, 2010. Abstract Although stochastic programming is a powerful tool for modeling decision- making under uncertainty, various impediments have historically prevented its wide- spread use. One key factor involves the ability of non-specialists to easily express stochastic programming problems as extensions of deterministic models, which are often formulated first. A second key factor relates to the difficulty of solving stochastic programming models, particularly the general mixed-integer, multi-stage case. Intri- cate, configurable, and parallel decomposition strategies are frequently required to achieve tractable run-times. We simultaneously address both of these factors in our PySP software package, which is part of the COIN-OR Coopr open-source Python project for optimization. To formulate a stochastic program in PySP, the user speci- fies both the deterministic base model and the scenario tree with associated uncertain parameters in the Pyomo open-source algebraic modeling language. Given these two models, PySP provides two paths for solution of the corresponding stochastic program. The first alternative involves writing the extensive form and invoking a standard deter- ministic (mixed-integer) solver. For more complex stochastic programs, we provide an implementation of Rockafellar and Wets’ Progressive Hedging algorithm. Our particu- lar focus is on the use of Progressive Hedging as an effective heuristic for approximating Jean-Paul Watson Sandia National Laboratories Discrete Math and Complex Systems Department PO Box 5800, MS 1318 Albuquerque, NM 87185-1318 E-mail: [email protected] David L.
    [Show full text]
  • Load Management and Demand Response in Small and Medium Data Centers
    Thiago Lara Vasques Load Management and Demand Response in Small and Medium Data Centers PhD Thesis in Sustainable Energy Systems, supervised by Professor Pedro Manuel Soares Moura, submitted to the Department of Mechanical Engineering, Faculty of Sciences and Technology of the University of Coimbra May 2018 Load Management and Demand Response in Small and Medium Data Centers by Thiago Lara Vasques PhD Thesis in Sustainable Energy Systems in the framework of the Energy for Sustainability Initiative of the University of Coimbra and MIT Portugal Program, submitted to the Department of Mechanical Engineering, Faculty of Sciences and Technology of the University of Coimbra Thesis Supervisor Professor Pedro Manuel Soares Moura Department of Electrical and Computers Engineering, University of Coimbra May 2018 This thesis has been developed under the Energy for Sustainability Initiative of the University of Coimbra and been supported by CAPES (Coordenação de Aperfeiçoamento de Pessoal de Nível Superior – Brazil). ACKNOWLEDGEMENTS First and foremost, I would like to thank God for coming to the conclusion of this work with health, courage, perseverance and above all, with a miraculous amount of love that surrounds and graces me. The work of this thesis has also the direct and indirect contribution of many people, who I feel honored to thank. I would like to express my gratitude to my supervisor, Professor Pedro Manuel Soares Moura, for his generosity in opening the doors of the University of Coimbra by giving me the possibility of his orientation when I was a stranger. Subsequently, by his teachings, guidance and support in difficult times. You, Professor, inspire me with your humbleness given the knowledge you possess.
    [Show full text]
  • Using COIN-OR to Solve the Uncapacitated Facility Location Problem
    The Uncapacitated Facility Location Problem Developing a Solver Additional Resources Using COIN-OR to Solve the Uncapacitated Facility Location Problem Ted Ralphs1 Matthew Saltzman 2 Matthew Galati 3 1COR@L Lab Department of Industrial and Systems Engineering Lehigh University 2Department of Mathematical Sciences Clemson University 3Analytical Solutions SAS Institute EURO XXI, July 4, 2006 Ted Ralphs, Matthew Saltzman , Matthew Galati Using COIN-OR to Solve the Uncapacitated Facility Location Problem The Uncapacitated Facility Location Problem Developing a Solver Additional Resources Outline 1 The Uncapacitated Facility Location Problem UFL Formulation Cutting Planes 2 Developing a Solver The ufl Class COIN Tools Putting It All Together 3 Additional Resources Ted Ralphs, Matthew Saltzman , Matthew Galati Using COIN-OR to Solve the Uncapacitated Facility Location Problem The Uncapacitated Facility Location Problem UFL Formulation Developing a Solver Cutting Planes Additional Resources Input Data The following are the input data needed to describe an instance of the uncapacitated facility location problem (UFL): Data a set of depots N = {1, ..., n}, a set of clients M = {1, ..., m}, the unit transportation cost cij to service client i from depot j, the fixed cost fj for using depot j Variables xij is the amount of the demand for client i satisfied from depot j yj is 1 if the depot is used, 0 otherwise Ted Ralphs, Matthew Saltzman , Matthew Galati Using COIN-OR to Solve the Uncapacitated Facility Location Problem The Uncapacitated Facility
    [Show full text]
  • Pyomo Documentation Release 5.6.2.Dev0
    Pyomo Documentation Release 5.6.2.dev0 Pyomo Feb 06, 2019 Contents 1 Installation 3 1.1 Using CONDA..............................................3 1.2 Using PIP.................................................3 2 Citing Pyomo 5 2.1 Pyomo..................................................5 2.2 PySP...................................................5 3 Pyomo Overview 7 3.1 Mathematical Modeling.........................................7 3.2 Overview of Modeling Components and Processes...........................9 3.3 Abstract Versus Concrete Models....................................9 3.4 Simple Models.............................................. 10 4 Pyomo Modeling Components 17 4.1 Sets.................................................... 17 4.2 Parameters................................................ 23 4.3 Variables................................................. 24 4.4 Objectives................................................ 25 4.5 Constraints................................................ 26 4.6 Expressions................................................ 26 4.7 Suffixes.................................................. 31 5 Solving Pyomo Models 41 5.1 Solving ConcreteModels......................................... 41 5.2 Solving AbstractModels......................................... 41 5.3 pyomo solve Command....................................... 41 5.4 Supported Solvers............................................ 42 6 Working with Pyomo Models 43 6.1 Repeated Solves............................................. 43 6.2 Changing
    [Show full text]
  • Research and Development of an Open Source System for Algebraic Modeling Languages
    Vilnius University Institute of Data Science and Digital Technologies LITHUANIA INFORMATICS (N009) RESEARCH AND DEVELOPMENT OF AN OPEN SOURCE SYSTEM FOR ALGEBRAIC MODELING LANGUAGES Vaidas Juseviˇcius October 2020 Technical Report DMSTI-DS-N009-20-05 VU Institute of Data Science and Digital Technologies, Akademijos str. 4, Vilnius LT-08412, Lithuania www.mii.lt Abstract In this work, we perform an extensive theoretical and experimental analysis of the char- acteristics of five of the most prominent algebraic modeling languages (AMPL, AIMMS, GAMS, JuMP, Pyomo), and modeling systems supporting them. In our theoretical comparison, we evaluate how the features of the reviewed languages match with the requirements for modern AMLs, while in the experimental analysis we use a purpose-built test model li- brary to perform extensive benchmarks of the various AMLs. We then determine the best performing AMLs by comparing the time needed to create model instances for spe- cific type of optimization problems and analyze the impact that the presolve procedures performed by various AMLs have on the actual problem-solving times. Lastly, we pro- vide insights on which AMLs performed best and features that we deem important in the current landscape of mathematical optimization. Keywords: Algebraic modeling languages, Optimization, AMPL, GAMS, JuMP, Py- omo DMSTI-DS-N009-20-05 2 Contents 1 Introduction ................................................................................................. 4 2 Algebraic Modeling Languages .........................................................................
    [Show full text]
  • Simulation and Application of GPOPS for Trajectory Optimization and Mission Planning Tool Danielle E
    Air Force Institute of Technology AFIT Scholar Theses and Dissertations Student Graduate Works 3-10-2010 Simulation and Application of GPOPS for Trajectory Optimization and Mission Planning Tool Danielle E. Yaple Follow this and additional works at: https://scholar.afit.edu/etd Part of the Systems Engineering and Multidisciplinary Design Optimization Commons Recommended Citation Yaple, Danielle E., "Simulation and Application of GPOPS for Trajectory Optimization and Mission Planning Tool" (2010). Theses and Dissertations. 2060. https://scholar.afit.edu/etd/2060 This Thesis is brought to you for free and open access by the Student Graduate Works at AFIT Scholar. It has been accepted for inclusion in Theses and Dissertations by an authorized administrator of AFIT Scholar. For more information, please contact [email protected]. SIMULATION AND APPLICATION OF GPOPS FOR A TRAJECTORY OPTIMIZATION AND MISSION PLANNING TOOL THESIS Danielle E. Yaple, 2nd Lieutenant, USAF AFIT/GAE/ENY/10-M29 DEPARTMENT OF THE AIR FORCE AIR UNIVERSITY AIR FORCE INSTITUTE OF TECHNOLOGY Wright-Patterson Air Force Base, Ohio APPROVED FOR PUBLIC RELEASE; DISTRIBUTION UNLIMITED The views expressed in this thesis are those of the author and do not reflect the official policy or position of the United States Air Force, Department of Defense, or the United States Government. This material is declared a work of the U.S. Government and is not subject to copyright protection in the United States. AFIT/GAE/ENY/10-M29 SIMULATION AND APPLICATION OF GPOPS FOR A TRAJECTORY OPTIMIZATION AND MISSION PLANNING TOOL THESIS Presented to the Faculty Department of Aeronautics and Astronautics Graduate School of Engineering and Management Air Force Institute of Technology Air University Air Education and Training Command In Partial Fulfillment of the Requirements for the Degree of Master of Science in Aeronautical Engineering Danielle E.
    [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]
  • Computing in Operations Research Using Julia
    Computing in Operations Research using Julia Miles Lubin and Iain Dunning MIT Operations Research Center INFORMS 2013 { October 7, 2013 1 / 25 High-level, high-performance, open-source dynamic language for technical computing. Keep productivity of dynamic languages without giving up speed. Familiar syntax Python+PyPy+SciPy+NumPy integrated completely. Latest concepts in programming languages. 2 / 25 Claim: \close-to-C" speeds Within a factor of 2 Performs well on microbenchmarks, but how about real computational problems in OR? Can we stop writing solvers in C++? 3 / 25 Technical advancements in Julia: Fast code generation (JIT via LLVM). Excellent connections to C libraries - BLAS/LAPACK/... Metaprogramming. Optional typing, multiple dispatch. 4 / 25 Write generic code, compile efficient type-specific code C: (fast) int f() { int x = 1, y = 2; return x+y; } Julia: (No type annotations) Python: (slow) function f() def f(): x = 1; y = 2 x = 1; y = 2 return x + y return x+y end 5 / 25 Requires type inference by compiler Difficult to add onto exiting languages Available in MATLAB { limited scope PyPy for Python { incompatible with many libraries Julia designed from the ground up to support type inference efficiently 6 / 25 Simplex algorithm \Bread and butter" of operations research Computationally very challenging to implement efficiently1 Matlab implementations too slow to be used in practice High-quality open-source codes exist in C/C++ Can Julia compete? 1Bixby, Robert E. "Solving Real-World Linear Programs: A Decade and More of Progress", Operations Research, Vol. 50, pp. 3{15, 2002. 7 / 25 Implemented benchmark operations in Julia, C++, MATLAB, Python.
    [Show full text]
  • The TOMLAB NLPLIB Toolbox for Nonlinear Programming 1
    AMO - Advanced Modeling and Optimization Volume 1, Number 1, 1999 The TOMLAB NLPLIB Toolbox 1 for Nonlinear Programming 2 3 Kenneth Holmstrom and Mattias Bjorkman Center for Mathematical Mo deling, Department of Mathematics and Physics Malardalen University, P.O. Box 883, SE-721 23 Vasteras, Sweden Abstract The pap er presents the to olb ox NLPLIB TB 1.0 (NonLinear Programming LIBrary); a set of Matlab solvers, test problems, graphical and computational utilities for unconstrained and constrained optimization, quadratic programming, unconstrained and constrained nonlinear least squares, b ox-b ounded global optimization, global mixed-integer nonlinear programming, and exp onential sum mo del tting. NLPLIB TB, like the to olb ox OPERA TB for linear and discrete optimization, is a part of TOMLAB ; an environment in Matlab for research and teaching in optimization. TOMLAB currently solves small and medium size dense problems. Presently, NLPLIB TB implements more than 25 solver algorithms, and it is p ossible to call solvers in the Matlab Optimization Toolbox. MEX- le interfaces are prepared for seven Fortran and C solvers, and others are easily added using the same typ e of interface routines. Currently, MEX- le interfaces havebeendevelop ed for MINOS, NPSOL, NPOPT, NLSSOL, LPOPT, QPOPT and LSSOL. There are four ways to solve a problem: by a direct call to the solver routine or a call to amulti-solver driver routine, or interactively, using the Graphical User Interface (GUI) or a menu system. The GUI may also be used as a prepro cessor to generate Matlab co de for stand-alone runs. If analytical derivatives are not available, automatic di erentiation is easy using an interface to ADMAT/ADMIT TB.
    [Show full text]