
MOSEK Fusion API for Java Release 9.3.6 MOSEK ApS 07 September 2021 Contents 1 Introduction 1 1.1 Why the Fusion API for Java?.................................2 2 Contact Information 3 3 License Agreement 4 4 Installation 8 4.1 Building Examples and Testing the Installation........................9 5 Design Overview 11 6 Conic Modeling 13 6.1 The model............................................ 13 6.2 Variables............................................. 14 6.3 Linear algebra.......................................... 14 6.4 Constraints and objective.................................... 15 6.5 Matrices............................................. 16 6.6 Parameters............................................ 17 6.7 Stacking and views....................................... 17 6.8 Vectorization........................................... 18 6.9 Reoptimization.......................................... 19 7 Optimization Tutorials 20 7.1 Linear Optimization....................................... 20 7.2 Conic Quadratic Optimization................................. 22 7.3 Power Cone Optimization.................................... 26 7.4 Conic Exponential Optimization................................ 28 7.5 Semidefinite Optimization.................................... 31 7.6 Integer Optimization...................................... 36 7.7 Geometric Programming.................................... 39 7.8 Library of basic functions.................................... 42 7.9 Model Parametrization and Reoptimization.......................... 47 7.10 Problem Modification and Reoptimization.......................... 50 8 Solver Interaction Tutorials 54 8.1 Accessing the solution...................................... 54 8.2 Errors and exceptions...................................... 58 8.3 Input/Output.......................................... 60 8.4 Setting solver parameters.................................... 61 8.5 Retrieving information items.................................. 62 8.6 Stopping the solver....................................... 63 8.7 Progress and data callback................................... 64 8.8 Optimizer API Task....................................... 67 8.9 MOSEK OptServer....................................... 67 9 Debugging Tutorials 69 9.1 Understanding optimizer log.................................. 69 i 9.2 Addressing numerical issues................................... 74 9.3 Debugging infeasibility..................................... 76 9.4 Python Console......................................... 80 10 Technical guidelines 83 10.1 Limitations............................................ 83 10.2 Memory management and garbage collection......................... 83 10.3 Names.............................................. 84 10.4 Multithreading.......................................... 85 10.5 Efficiency............................................. 85 10.6 The license system........................................ 87 10.7 Deployment........................................... 87 11 Case Studies 88 11.1 Portfolio Optimization..................................... 89 11.2 Primal Support-Vector Machine (SVM)............................ 101 11.3 2D Total Variation........................................ 105 11.4 Multiprocessor Scheduling................................... 110 11.5 Logistic regression........................................ 114 11.6 Inner and outer Löwner-John Ellipsoids............................ 116 11.7 SUDOKU............................................. 120 11.8 Travelling Salesman Problem (TSP).............................. 125 11.9 Nearest Correlation Matrix Problem.............................. 129 11.10 Semidefinite Relaxation of MIQCQO Problems........................ 133 12 Problem Formulation and Solutions 137 12.1 Linear Optimization....................................... 137 12.2 Conic Optimization....................................... 140 12.3 Semidefinite Optimization.................................... 144 13 Optimizers 146 13.1 Presolve.............................................. 146 13.2 Linear Optimization....................................... 148 13.3 Conic Optimization - Interior-point optimizer......................... 155 13.4 The Optimizer for Mixed-integer Problems.......................... 159 14 Fusion API Reference 163 14.1 Fusion API conventions..................................... 163 14.2 Class list............................................. 164 14.3 Parameters grouped by topic.................................. 244 14.4 Parameters (alphabetical list sorted by type)......................... 252 14.5 Enumerations.......................................... 278 14.6 Constants............................................. 279 14.7 Exceptions............................................ 302 14.8 Class LinAlg........................................... 306 15 Supported File Formats 311 15.1 The LP File Format....................................... 312 15.2 The MPS File Format...................................... 317 15.3 The OPF Format........................................ 329 15.4 The CBF Format........................................ 339 15.5 The PTF Format........................................ 353 15.6 The Task Format........................................ 358 15.7 The JSON Format........................................ 358 15.8 The Solution File Format.................................... 366 16 List of examples 369 17 Interface changes 371 ii 17.1 Backwards compatibility.................................... 371 17.2 Parameters............................................ 372 17.3 Constants............................................. 373 Bibliography 374 Symbol Index 375 Index 378 iii Chapter 1 Introduction The MOSEK Optimization Suite 9.3.6 is a powerful software package capable of solving large-scale optimization problems of the following kind: • linear, • conic: – conic quadratic (also known as second-order cone), – involving the exponential cone, – involving the power cone, – semidefinite, • convex quadratic and quadratically constrained, • integer. In order to obtain an overview of features in the MOSEK Optimization Suite consult the product introduction guide. The most widespread class of optimization problems is linear optimization problems, where all rela- tions are linear. The tremendous success of both applications and theory of linear optimization can be ascribed to the following factors: • The required data are simple, i.e. just matrices and vectors. • Convexity is guaranteed since the problem is convex by construction. • Linear functions are trivially differentiable. • There exist very efficient algorithms and software for solving linear problems. • Duality properties for linear optimization are nice and simple. Even if the linear optimization model is only an approximation to the true problem at hand, the advantages of linear optimization may outweigh the disadvantages. In some cases, however, the problem formulation is inherently nonlinear and a linear approximation is either intractable or inadequate. Conic optimization has proved to be a very expressive and powerful way to introduce nonlinearities, while preserving all the nice properties of linear optimization listed above. The fundamental expression in linear optimization is a linear expression of the form Ax − b ≥ 0: In conic optimization this is replaced with a wider class of constraints Ax − b 2 K where K is a convex cone. For example in 3 dimensions K may correspond to an ice cream cone. The conic optimizer in MOSEK supports a number of different types of cones K, which allows a surprisingly large number of nonlinear relations to be modeled, as described in the MOSEK Modeling Cookbook, while preserving the nice algorithmic and theoretical properties of linear optimization. 1 1.1 Why the Fusion API for Java? Fusion is an object oriented API specifically designed to build conic optimization models in a simple and expressive manner, using mainstream programming languages. With focus on usability and compactness, it helps the user focus on modeling instead of coding. Typically a conic optimization model in Fusion can be developed in a fraction of the time compared to using a low-level C API, but of course Fusion introduces a computational overhead compared to customized C code. In most cases, however, the overhead is small compared to the overall solution time. Moreover, parametrization makes it possible to construct a Fusion model once and then solve it repeatedly for different inputs with almost no overhead. We generally recommend that Fusion is used as a first step for building and verifying new models. Often, the final Fusion implementation will be directly suited for production code, and otherwise it readily provides a reference implementation for model verification. Fusion always yields readable and easily portable code. The Fusion API for Java provides access to Conic Optimization, including: • Linear Optimization (LO) • Conic Quadratic (Second-Order Cone) Optimization (CQO, SOCO) • Power Cone Optimization • Conic Exponential Optimization (CEO) • Semidefinite Optimization (SDO) • Mixed-Integer Optimization (MIO) as well as to an auxiliary linear algebra library. Convex Quadratic and Quadratically Constrained (QCQO) problems can be reformulated as Conic Quadratic problems and subsequently solved using Fusion. This is the recommended approach, as described in the MOSEK Modeling Cookbook and this whitepaper. 2 Chapter 2 Contact Information Phone +45 7174 9373 Website mosek.com Email [email protected]
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages385 Page
-
File Size-