Xpress-Mosel User Guide Release 1.2 c ⃝Copyright Dash Associates 1998-2002 All

Xpress-Mosel User Guide Release 1.2 c ⃝Copyright Dash Associates 1998-2002 All trademarks referenced in this manual that are not the property of Dash Associates are acknow- ledged. All companies, products, names and data contained within this user guide are completely fictitious and are used solely to illustrate the use of Xpress-MP. Any similarity between these names or data and reality is purely coincidental. How to Contact Dash If you have any questions or comments on the use of Xpress-MP, please contact Dash technical support at: USA, Canada and The Americas Elsewhere Dash Optimization Inc. Dash Optimization Ltd. 560 Sylvan Avenue Quinton Lodge, Binswood Avenue Englewood Cliffs Leamington Spa NJ 07632 Warwickshire CV32 5RX USA UK Telephone: (201) 567 9445 Telephone: +44 1926 315862 Fax: (201) 567 9443 Fax: +44 1926 315854 email: support-usa@dashoptimization.com email: support@dashoptimization.com If you have any sales questions or wish to order Xpress-MP software, please contact your local sales office, or Dash sales at: USA, Canada and The Americas Elsewhere Dash Optimization Inc. Dash Optimization Ltd. 560 Sylvan Avenue Blisworth House, Church Lane Englewood Cliffs Blisworth NJ 07632 Northants NN7 3BX USA UK Telephone: (201) 567 9445 Telephone: +44 1604 858993 Fax: (201) 567 9443 Fax: +44 1604 858147 email: sales@dashoptimization.com email: sales@dashoptimization.com For the latest news and Xpress-MP software and documentation updates, please visit the Xpress- MP website at http://www.dashoptimization.com Contents I Using the Mosel language 1 Introduction 2 What you need to know before using Mosel . . . . . . . . . . . . . . . . . . . . . . . . . 2 Symbols and conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 The structure of this guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1 Getting started with Mosel 5 1.1 The chess set problem: description . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.1.1 A first formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2 Solving the chess set problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2.1 Building the model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2.2 Obtaining a solution using Mosel . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.2.3 Running Mosel from a command line . . . . . . . . . . . . . . . . . . . . . . 8 1.2.4 Using Xpress-IVE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2 Some illustrative examples 10 2.1 The burglar problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.1.1 Model formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.1.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.1.3 The burglar problem revisited . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2 A blending example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.2.1 Model formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.2.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.2.3 Re-running the model with new data . . . . . . . . . . . . . . . . . . . . . . 16 2.2.4 Reading data from spreadsheets and databases . . . . . . . . . . . . . . . . 17 2.2.4.1 Spreadsheet example . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.2.4.2 Database example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3 More advanced modeling features 19 3.1 A transport example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.1.1 Model formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.1.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.2 Conditional generation — the | operator . . . . . . . . . . . . . . . . . . . . . . . . 22 3.2.1 Conditional variable creation and create . . . . . . . . . . . . . . . . . . . 22 3.3 Reading sparse data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4 Integer Programming 25 4.1 Integer Programming entities in Mosel . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.2 A project planning model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 4.2.1 Model formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 4.2.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 4.3 The project planning model using Special Ordered Sets . . . . . . . . . . . . . . . . 29 5 Overview of subroutines and reserved words 30 5.1 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 5.2 Reserved words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ii Xpress-Mosel User Guide 6 Correcting syntax errors in Mosel 33 II uploads/Ingenierie_Lourd/ mosel-user-guide.pdf

  • 27
  • 0
  • 0
Afficher les détails des licences
Licence et utilisation
Gratuit pour un usage personnel Attribution requise
Partager