Mathematical Modeling and Optimization Applied Optimization Volume 31 Series Editors: Panos M. Pardalos University of Florida. U.S.A. Donald Hearn University of Florida. U.S.A. Mathelllatical Modeling and Optilllization An Essay for the Design of Computer-Based Modeling Tools by Tony Hiirlimann Institute for Informatics, University of Fribourg, Switzerland SPRINGER-SCIENCE+BUSINESS MEDIA, B.V. A C.I.P. Catalogue record for this book is available from the Library of Congress. ISBN 978-1-4419-4814-4 ISBN 978-1-4757-5793-4 (eBook) DOI 10.1007/978-1-4757-5793-4 Printed on acid-free paper AII Rights Reserved © 1999 Springer Science+Business Media Dordrecht Originally published by Kluwer Academic Publishers in 1999 Softcover reprint of the hardcover 1s t edition 1999 No part of the material protected by this copyright notice may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying, recording or by any information storage and retrieval system, without written permission from the copyright owner Denna bok ar tillagnad mina d6ttrar Malika Nora och Selma Aina Table of Contents 1. Introduction I 1.1. MODELS AND THEIR FUNCTIONS 2 1.2. THE ADVENT OF THE COMPUTER 4 1.3. NEW SCIENTIFIC BRANCHES EMERGE 5 104. MATHEMATICAL MODELING - THE CONSEQUENCES 8 1.5. COMPUTER-BASED MODELING MANAGEMENT 10 1.6. ABOUT THIS BOOK 1 2 2. What is Modeling? 1 7 2.1. MODEL: A DEFINITION 1 7 2.1. MATHEMATICAL MODELS 23 2.2. MODEL THEORY 26 2.3. MODELS AND INTERPRETATIONS 29 204. RELATED CONCEPTS 30 2.5. DECLARATIVE VERSUS PROCEDURAL KNOWLEDGE 33 3. The Modeling Life Cycle 37 3.1. STAGE 1: SPECIFICATION OF THE REAL PROBLEM 39 3.2. STAGE 2: FORMULATION OF THE MATHEMATICAL MODEL 39 3.3. STAGE 3: SOLUTION OF THE MODEL 43 304. STAGE 4: VALIDATION OF THE MODEL AND ITS SOLUTION 44 304.1. Logical Consistency 50 3.4.2. Data Type Consistency 51 304.3. Unit Type Consistency 51 30404. User Defined Data Checking 52 304.5. Simplicity Considerations 53 304.6. Solvability Checking 53 3 04.7. Numerical Stability and Sensitivity Analysis 53 304.8. Checking the Correspondence 55 3.5. STAGE 5: WRITING A REPORT 57 3.6. TWO CASE STUDIES 58 4. Model Paradigms 67 4.1. MODEL TYPES 67 4.1.1. Optimization Models 68 4.1.2. Symbolical - Numerical Models 68 4.1.3. Linear - Nonlinear Models 68 4.] A. Continuous - Discrete Models 69 4.1.5. Deterministic - Stochastic Models 69 4.1.6. Analytic - Simulation Models 70 4.2. MODELS AND THEIR PURPOSES 71 4.3. MODELS IN THEIR RESEARCH COMMUNITIES 72 viii 4.3.1. Differential Equation Models 72 4.3.2. Operations Research 73 4.3.3. Artificial Intelligence 75 4.4. MODELING UNCERTAINTY 80 4.4.1. Mathematical Models and Uncertainty 80 4.4.2. General Approaches in Modeling Uncertainty 82 4.4.3. Classical Approaches in OR 84 4.4.4. Approaches in Logical Models 86 4.4.5. Fuzzy Set Modeling 92 4.4.6. Outlook 96 5. Problems and Concepts 101 5.1. PRESENT SITUATION IN MMS 102 5.2. WHAT MMS IS NOT 102 5.3. MMS, WHAT FOR? 106 5.4. MODELS VERSUS PROGRAMS 108 6. An Overview of Approaches 115 6.1. SPREADSHEET 1 15 6.2. RELATIONAL DATABASE SYSTEMS 119 6.3. GRAPHICAL MODELING 126 6.4. CONSTRAINT LOGIC PROGRAMMING LANGUAGES (CLP) 1 31 6.5. ALGEBRAIC LANGUAGES 139 6.5.1. AIMMS 140 6.5.2. AMPL 146 6.5.3. Summary 148 6.6. GENERAL REMARKS ] 50 6.6.1. Structured Modeling 151 6.6.2. Embedded Language Technique 152 6.6.3. Multi-view Architecture 153 6.6.4. A Model Construction and Browsing Tool 154 6.6.5. Conclusion 154 7. A Modeling Framework 1 55 7.1. THE REQUIREMENTS CATALOGUE 155 7.1.1. Declarative and Procedural Knowledge 156 7.1.2. The Modeling Environment 157 7.1.3. Informal Knowledge 159 7.1.4. Summary 159 7.2. THE MODELING LANGUAGE 161 7.2.1. The Adopted Approach 162 7.2.2. The Overall Structure of the Modeling Language 167 7.2.3. Entities and Attributes 172 7.2.4. Index-sets 176 7.2.5. Expression 182 7.2.6. The Instruction Entities 184 ix 7.2.7. The Complete Syntax Specification 185 7.2.8. Semantic Interpretation 187 7.2.8. Summary 188 7.3. FOUR EXAMPLES 189 7.4. MODELING TOOLS 201 7.4.1. A Textual-Based Tool 202 7.4.2. A Tool Based on Graphs 203 7.5. OUTLOOK 204 8. The Definition of the Language 209 8.1. INTRODUCTION 209 8.2. AN OVERVIEW OF THE LPL-LANGUAGE 210 8.2.1. The Entities and the Attributes 210 8.2.2. Index-Sets 212 8.2.3. Data 213 8.2.4. Expressions 219 8.2.5. Logical Modeling 220 8.3. THE BACKUS-NAUR SPECIFICATION OF LPL 232 9. The Implementation 235 9.1. THE KERNEL 235 9.2. THE ENVIRONMENT (USER INTERFACE) 236 9.3. THE TEXT BROWSER 238 9.4. THE GRAPHICAL BROWSER 243 10. Selected Applications 249 10.] . GENERAL LP-, MIP-, AND QP-MODELS 249 10.2. GOAL PROGRAMMING 260 10.3. LP'S WITH LOGICAL CONSTRAINTS 263 10.5. PROBLEMS WITH DISCONTINUOUS FUNCTIONS 281 ]0.6. MODELING UNCERTAINTY 284 11. Conclusion 289 References 295 Glossary 307 Index 311 Model Examples Example 2-1: The Intersection Problem 19 Example 3-1: The Frustum Problem 40 Example 3-2: Theory of Learning 42 Example 3-3: The 3-jug Problem 48 Example 3-4: Cooling a Thermometer 58 Example 3-5: A Production Problem (Product.lpl) 60 Example 4-1: A Letter Game Problem 77 Example 4-2: A PSAT Problem 88 Example 4-3: Probabilistic Entailment 89 Example 4-4: PSAT versus ATMS 90 Example 4-5: Modeling Dynamic Systems 94 Example 4-6: Fuzzy LPs 95 Example 5-1: An Energy Import Problem (Import.lpl) III Example 6-1: A Portfolio Problem (Invest.lpl) 115 Example 6-2: A Transhipment-Assignment Problem (Location.lpl) 120 Example 6-3: The Transportation Problem 127 Example 6-4: The Car Sequencing Problem (Car.lpl) 136 Example 6-5: The Cutting Stock Problem 141 Example 6-6: The Diet Problem 146 Example 7-1: The n-Queen Problem (8-queen.lpl) 189 Example 7-2: The Cutting Stock Problem (again) 192 Example 7-3: The n-Bit-Adder 194 Example 7-4: A Budget Allocation Problem (Budget.lpl) 199 Example 10-1: Detennine Workforce Level (prod.1pl) 249 Example 10-2: "Rhythmed" Flow-Shop (Rflowsh.lpl) 253 Example 10-3: Assignment of Players to Teams (soccerJpl) 255 Example 10-4: Portfolio Investment (Quadl.lpl) 259 Example 10-5: Book Acquirements for a Library (library.lpl) 260 Example 10-6: The Intersection Problem (Intersec.lp\) 264 Example 10-7: A Satisfiability Problem (SAT) (Satl.lpl) 268 Example 10-8: How to Assemble a Radio (Radio.lpl) 270 Example 10-9: An Energy Import Problem (Import.lpl) 271 Example 10-10: Finding Magic Squares (Magicsq.lpl) 277 Example 10-11: The Capacitated Facility Location Problem (Capafac.lpl) 278 Example 10-12: A Two-Persons Zero-Sum Game (Game.lpl) 281 Example 10.13. The weighted Tardiness Problem (wtl.lpl) 283 Example 10.14. A Stochastic Model 284 Example 10.15. A Model Using Fuzzy-sets 286 Figures Figure 0-1: The Birth ofLPL (Kohlas J.) xxi Figure 2-1: El torro 18 Figure 2-2: The Intersection Problem 19 Figure 2-3: Topological Deformation 20 Figure 2-4: Solution to the Intersection Problem 20 Figure 2-5: The Intersection Problem, an Interpretation 24 Figure 2-6: Similarities between Theories 30 Figure 2-7: Model Structure versus Model Instance 32 Figure 3-1 : The Model Life Cycle 38 Figure 3-2: The Frustum Problem 41 Figure 3-3: The Frustrum Problem, an Intermediate Step 41 Figure 3-4: The Frustrum Problem, the Solution 42 Figure 3-5: A Learning Model based on Markov Chain 43 Figure 3-6: Validation of a Model 46 Figure 3-7: The 3-jug Problem 49 Figure 3-8: The 3-jug Problem, the Search Path 49 Figure 3-9: Sensitivity Analysis 55 Figure 3-10: The Correspondence Problem 56 Figure 3-11: The Temperature Plot 59 Figure 4-1: Different Optimizing Criteria 73 Figure 4-2: The Search Path of the Letter Game Problem 78 Figure 4-3: Fuzzy Sets for small, medium, and tall 94 Figure 4-4: The Inverted Pendulum 95 Figure 5-1: Different Model Representations 107 Figure 5-2: Different Representations with many Links 107 Figure 6-1: A Plot of the Reinvestment Flow 117 Figure 6-2: A Spreadsheet for the Portfolio Model 118 Figure 6-3: Product Flow in the Transhipment-Assignment Problem 122 Figure 6-4: Netform of a Transportation Model 129 Figure 6-5: Aggregated Netform for the Transportation Model 130 Figure 6-6: Multi-view Architecture 153 Figure 7-1: An Architecture for Modeling Tools 160 Figure 7-2: Modeling Language Embedding 162 Figure 7-3: An Index-tree 178 Figure 7-4: An Index-tree with Collapsing Paths 179 Figure 7-5: An Index-tree Viewed as a Compound Index-set 179 Figure 7-6: A tagged Index-tree 180 Figure 7-7: A Marked Index-tree 182 Figure 7-8: A Solution for the 4- and the 8-Queen Problem 190 Figure 7-9: The n-Bit-Adder 194 Figure 7-10: AND-, OR-, NOT-Gates 194 Figure 7-11: The XOR-Gate 195 Figure 7-12: A Half-Adder 195 Figure 7-13: A Full-Adder 196 Figure 7-14: A 3-bit Adder 197