Linear Program Solver



Similar documents
Chapter 6. Linear Programming: The Simplex Method. Introduction to the Big M Method. Section 4 Maximization and Minimization with Problem Constraints

Solving Linear Programs in Excel

Using CPLEX. =5 has objective value 150.

Simplex method summary

4.6 Linear Programming duality

Using EXCEL Solver October, 2000

Linear Programming. March 14, 2014

56:171 Operations Research Midterm Exam Solutions Fall 2001

Introduction to Linear Programming (LP) Mathematical Programming (MP) Concept

Chapter 2 Solving Linear Programs

CPLEX Tutorial Handout

Sensitivity Analysis 3.1 AN EXAMPLE FOR ANALYSIS

IEOR 4404 Homework #2 Intro OR: Deterministic Models February 14, 2011 Prof. Jay Sethuraman Page 1 of 5. Homework #2

Solving Linear Programs using Microsoft EXCEL Solver

Lesson 9: Introduction to the Landscape Management System (LMS)

Special Situations in the Simplex Algorithm

24. The Branch and Bound Method

1 Solving LPs: The Simplex Algorithm of George Dantzig

E x c e l : Data Analysis Tools Student Manual

CHAPTER 11: BASIC LINEAR PROGRAMMING CONCEPTS

Chapter 6: Sensitivity Analysis

Discrete Optimization

PowerWorld Simulator

STATGRAPHICS Online. Statistical Analysis and Data Visualization System. Revised 6/21/2012. Copyright 2012 by StatPoint Technologies, Inc.

Solving Linear Programs

EXCEL SOLVER TUTORIAL

Linear Programming Notes VII Sensitivity Analysis

Integrating Benders decomposition within Constraint Programming

Airport Planning and Design. Excel Solver

Using the Drag-and-Drop Report Builder

LECTURE 5: DUALITY AND SENSITIVITY ANALYSIS. 1. Dual linear program 2. Duality theory 3. Sensitivity analysis 4. Dual simplex method

Database Applications Microsoft Access

Linear Programming. Solving LP Models Using MS Excel, 18

The Welcome screen displays each time you log on to PaymentNet; it serves as your starting point or home screen.

This web-based report provides information for single funds centers. The report can be run for one funds center or multiple single funds centers.

Appendix K Introduction to Microsoft Visual C++ 6.0

Unit 10: Microsoft Access Queries

Lecture 3. Linear Programming. 3B1B Optimization Michaelmas 2015 A. Zisserman. Extreme solutions. Simplex method. Interior point method

NØGSG DMR Contact Manager

Solving Math Programs with LINGO

Duality in Linear Programming

Practical Guide to the Simplex Method of Linear Programming

Accounting Manager. User Guide A31003-P1030-U

USING EXCEL 2010 TO SOLVE LINEAR PROGRAMMING PROBLEMS MTH 125 Chapter 4

Access Queries (Office 2003)

MyOra 3.0. User Guide. SQL Tool for Oracle. Jayam Systems, LLC

To discuss this topic fully, let us define some terms used in this and the following sets of supplemental notes.

Creating a Participants Mailing and/or Contact List:

Enhanced Attendance Reporting for SmartLock Pro Plus OPERATOR GUIDE

Monthly Payroll to Finance Reconciliation Report: Access and Instructions

Basics. a. Click the arrow to the right of the Options button, and then click Bcc.

MICROSOFT ACCESS STEP BY STEP GUIDE

Introduction to ProphetX 3.0

REP200 Using Query Manager to Create Ad Hoc Queries

Polynomial Neural Network Discovery Client User Guide

Prevue Online How-To Guide Managing a Branch Account

Mail Chimp Basics. Glossary

What is Linear Programming?

Tutorial: Using Excel for Linear Optimization Problems

Circulation Workflows in ALEPH v. 18 Note: to be used with the List of Circulation Data for Training (USMXX) ALEPH version 18

Microsoft Excel Basics

5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1

1 Introduction. Linear Programming. Questions. A general optimization problem is of the form: choose x to. max f(x) subject to x S. where.

Optimization Modeling for Mining Engineers

Maple Quick Start. Introduction. Talking to Maple. Using [ENTER] 3 (2.1)

IBM ILOG CPLEX for Microsoft Excel User's Manual

Images of Microsoft Excel dialog boxes Microsoft. All rights reserved. This content is excluded from our Creative Commons license.

Basics FLEETMATE. Getting Started The Main Window Filtering Data Using Your Mouse Windows and Buttons

MEDIAplus administration interface

Nonlinear Optimization: Algorithms 3: Interior-point methods

8.1. Cramer s Rule for Solving Simultaneous Linear Equations. Introduction. Prerequisites. Learning Outcomes. Learning Style

Network Models 8.1 THE GENERAL NETWORK-FLOW PROBLEM

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

International Doctoral School Algorithmic Decision Theory: MCDA and MOO

Lesson 07: MS ACCESS - Handout. Introduction to database (30 mins)

Standard Form of a Linear Programming Problem

3.1 Solving Systems Using Tables and Graphs

MS Access: Advanced Tables and Queries. Lesson Notes Author: Pamela Schmidt

Using the Simplex Method to Solve Linear Programming Maximization Problems J. Reeb and S. Leavengood

Using Excel. 4. The Scenario Manager function is used to create and evaluate a collection of what-if scenarios containing multiple input values.

Decision Support AITS University Administration. Web Intelligence Rich Client 4.1 User Guide

Sample- for evaluation purposes only. Advanced Crystal Reports. TeachUcomp, Inc.

Linear Programming Supplement E

How to Configure and Use MRP

Linking FLIPS to a GIS Shapefile

Operation Research. Module 1. Module 2. Unit 1. Unit 2. Unit 3. Unit 1

Issues in Information Systems Volume 14, Issue 2, pp , 2013

Microsoft Access 3: Understanding and Creating Queries

Gamma Distribution Fitting

AxxonSoft Inc. Axxon Smart. Quick Start Guide. AxxonSoft. The. Axxon Smart. Software Package. Quick Start Guide. Version 1.0

Optimal Scheduling for Dependent Details Processing Using MS Excel Solver

Fleet Manager II. Operator Manual

Creating QBE Queries in Microsoft SQL Server

15.053/8 February 26, 2013

Question 2: How do you solve a matrix equation using the matrix inverse?

User s Guide for the Texas Assessment Management System

Transcription:

Linear Program Solver Help Manual prepared for Forest Management course by Bogdan Strimbu

1 Introduction The Linear Program Solver (LiPS) Help manual was developed to help students enrolled in the senior forestry class of Forest management. The information was taken primarily from the software help created by the software developer, Dr. Michael Melnick from MIT and State University of Management (Moscow, Russia). In addition to the information from software documentation I have added examples from the Davis et al (2005) Forest Management: To Sustain Ecological, Economic, and Social Values book. LiPS package is intended for solving linear, integer and goal programming problems. The main features of the LiPS are: LiPS solver is based on the efficient implementation of the modified simplex method that solves the large scale problems; LiPS provides not only an answer, but a detailed solution process as a sequence of simplex tables, so you can use it in studying (teaching) linear programming. LiPS provides the procedures of sensitivity analysis, which enable us to study the behavior of the model when you change its parameters, including: analysis of changes in the right sides of constraints, analysis of changes in the coefficients of the objective function, the analysis of changes in the column / row of the technology matrix. Such information may be extremely useful in the practical application of LP models. LiPS provides the methods of the goal programming, including the lexicographic and weighted GP methods. Goal programming methods are intended for solving multi-objective optimization problems. Forest Management Page 2

2 The User Interface The main components of the program's interface: 1) The client area of the main window - contains child windows; 2) Toolbar - contains buttons for quick access to key functions of the program 3) Main menu bar - provides access to all functions of the program; 4) Status Bar - contains simple hints on the purpose of the main menu items and toolbar items; 5) The child window - contains the definition of models or the results of the program (reports). 6) Log Pane - contains information about the solution process. LiPS is an integrated development environment that provides the user with the following interfaces: Model Editor, Model Solver and sensitivity analysis. 3 Model Editor Model Editor provides functions to create, edit, save, load models. The system supports a standard format MPS, but also has its own input format LPX. When using the LPX format, LiPS provides the user two options for input models: algebraic and tabular. Forest Management Page 3

3.1 Tabular Input Mode In the tabular input mode the user is prompted to fill in a form that conforms to the standard simplex table. To create the model in the tabular form two steps are required: 1) Create a model of the problem (menu File >> New >> Table Model). In the window that appears, you should fill in the parameters of the problem: the number of variables, constraints and objective functions, as well as indicate the direction of optimization. 2) Fill in the table model view, which includes: the direction of optimization (MAX / MIN); the objective function row coefficients Objective; the technological matrix A; column right sides RHS; the type of restrictions (<=,=,>=); If you want to add / remove variables and constraints, use the menu Table>> Insert / Delete. 3.2 Algebraic input mode Algebraic input mode allows the user to work not with the simplex table, but directly with a mathematical formulation of the problem. To create the model in the algebraic form two steps are required: 1) Create a model of the problem (menu File>> New>> Text Model); 2) Enter the model in algebraic form. The model should be written according to format LPX, which is a set of algebraic expressions and statements in the following order: <objective function> <constraints> <declarations> Forest Management Page 4

The <objective function> is a linear combination of variables, ending with a semicolon (;), optionally preceded by "max: " or "min: " to indicate whether you want it to be minimized or maximized. Maximization is the default. Example: max: x1 + x2; The <constraints> consists of four parts: 1) the constraint name (optional), followed by a colon; 2) linear combination of variables; 3) type of constraint (> =, =, <=) 4) the values of the right side. Remember: The constraint should end with a semicolon (;): 4*x1 - x2 <= 8; The <declarations> - variables can be declared as integer using the int specifier, followed by comma separated variable names. Example: int x1, x2; A variable must start with a letter (either upper or lower case), and may contain any number of additional letters, numerals, or characters. Example of the model in LPX format: max: x1 + x2; row1: 4*x1 - x2 < 8; row2: 2*x1 + x2 < 10; row3: -5*x1 + 2*x2 < 2; 3.3 Loading Models To save the created models use the menu File>> Save. To load the created models use the menu File>> Open. According to supported file formats LiPS provides 3 types of loading: MPS Model; LPX Model in plain text; LPX Model in tabular form. To select the loading type you should use the dropdown menu "File Type": Forest Management Page 5

4 Model Solver To run the solution process use the menu LiPS >> Solve Model. Model Solver has two modes: basic and advanced. In the basic mode (which is suitable for learning the simplex method) LiPS provides not only an answer, but a detailed solution process as a sequence of simplex tables. At each iteration the output includes: corresponding simplex table, variable to be made basic, variable out of the basic set, etc. The form of the computer solution simulates the process of manual solution of the problem (an artificial basis, an intelligent choice of initial basis, fractions, etc.). In advanced mode LiPS provides a set of methods for solution of the large-scale problems: a modified primal and dual simplex method based on LU-decomposition, branch-and-bound method for MILP. 4.1 Format of the simplex table When working in the table mode of the simplex method, the result of solution is a report that includes a detailed solution process as a sequence of simplex tables like below: To the each iteration of the simplex method corresponds the following information: 1) Number of "Solution Phase" and the current iteration. 2) The simplex table itself. Simplex table consists of the following components. 2.1) Basis column - contains the current set of basic variables; 2.2) RHS column (right hand side) - contains the current values of the basic variables; 2.3) The columns of the technology matrix - contains the elements of the constraint matrix at the current iteration; 2.4) Obj. - contains the coefficients of the objective function at the current iteration. 3) A variable to be made basic - determined by the maximum coefficient of row Obj. 4) The ratios of right-hand sides of constraints (RHS) to elements of the column corresponding to the variable to be made basic. 5) A variable that must leave the base - is determined by the minimum ratio of paragraph 4. Forest Management Page 6

4.2 Results Format In the absence of cycling, the simplex method ends up after a finite number of iterations. As a result of its work, one of 3 outcomes may result: 1) The problem has no feasible solution - this means that the constraints of the original problem are inconsistent, indicating error(s) in the model formulation. 2) The problem is unbounded - which means that the objective function reaches its optimum at infinity. This also indicates error(s) in the problem formulation. 3) The problem has an optimal solution. In the last case, LiPS outputs the results table of the form: The result table consists of two parts: I) The first part corresponds to the variables and consists of four columns: 1) "Variable" - contains the names of the structural variables; 2) "Value" - contains the values of structural variables; 3) "Obj. Cost" - contains the values of the objective function coefficients; 4) "Reduced Cost" - contains the values of the reduced costs. II) The second part of the table corresponds to the model constraints: 1) "Constraint" - the name of constraint; 2) "RHS" - contains the value of a column of free terms (right-hand sides of constraints); 3) "Slack" - contains the values of logical variables; 4) "Dual Price" - contains the values of the dual variables. Note: To export solutions to Excel use the menu: Solution >> Export>> Excel. 4.3 Simplex Method Settings To select variants of the simplex method use the menu LiPS>> Settings and select the desired option from the list. The system offers a choice of four variants: Table: shows the detailed solution process in the form of a sequence of simplex tables. This method is ideal for learning purposes, but it should not be used for the problems with more than 100 constraints. Forest Management Page 7

Modified with EFI: in the matrix calculations, uses an effective procedure of LU-decomposition with Elimination Form of Inverse. (high numerical stability, average speed). Modified with PFI: in the matrix calculations, uses an effective procedure of LU-decomposition with the Multiplication Form of Inverse (average numerical stability, high speed). Standard (Gaussian Elimination): this method is very fast, but numerically unstable. 5 Examples Any forest management problem is divided in four distinct serial parts: 1. Framing the problem in forestry terms 2. Represent the forest management numerically 3. Solve the numerical problem 4. Interpret the results Depending on the company and the problem emphasis could be placed on one or more of the four parts. The objective of this example is to provide the students with the mathematical tools needed to solve most of the forest management problems encountered in daily forest management activities. 5.1 Recreation opportunities (Davis et al, 2001 - pg.265-270) Problem: Allocate resources to different recreation opportunities in a forest Goal: Maximize new recreation opportunities Measure the goal using the total #visitors-day/year: this is the objective function Criterion: Additional annual visitor-days of recreation opportunity provided Activity Decision Variable Build Campsites # campsites to build X1 Build Boat-Ramps # boat-ramps to build X2 Build trails # miles of trail to build X3 Number of added visitor-day/year for each unit of activity: Campsite 100 Boat-ramp 500 Miles of trail 100 Objective function: Max 100X1+500X2+100X3 Forest Management Page 8

Constraints o Budget: maximum amount to be spent is $560,000 Building costs per unit of type of facility are Campsite 5000 Boat-ramp 8000 Miles of trail 1500 5000X1+8000X2+1500X3 560000 o Backcountry opportunities: at least 3000 visitor-days / day Campsites do not provide backcountry opportunities Boat-ramp provides 50 visitor-day /year 1 mile of trail provides 100 visitors-day/year 50X2+100X3 3000 o Policies: Higher policy level decided to encourage private campgrounds, limits development of public ones to 40 additional units: X1 40 o Contracts: An existing contract forces building of at least 1 boat ramp: X2 1 o Decisions: A past decision demands building of at least 10 campsites: X1 10 Formal planning problem Objective: max 100X1+ 500X2+ 100X3 Budget: 5000X1+ 8000X2+ 1500X3 560000 Backcountry: 50X2+ 100X3 3000 Max. Campsites: X1 40 Min. Campsites: X1 10 Boat-ramps: X2 1 LiPS Program //Objective; max: 100 X1+ 500 X2+ 100 X3; //Constraints; Budget: 5000 X1 + 8000 X2 + 1500 X3 <= 560000; Backcount: 50 X2 + 100 X3 >= 3000 ; Max_Camps: X1 <= 40; Min_Camps: X1 >= 10; Boat_Ramps: X2 >= 1; Forest Management Page 9

LiPS Output Forest Management Page 10

5.2 Timber Harvest and Wildlife The example is based on the article published in Forestry Chronicle by Thompson et al. in 1973, which evaluate the interrelationships between timber outputs and wildlife management Maryland s DNR goal in managing the forest is to obtain a maximum, even-flow of saw timber consistent with sound wildlife management Even-flow is defined as equal amount of timber harvested annually (or over a preset time interval), for an indefinite period of time, from a forest. Maryland's DNR desire to have area cut annual approximately equal Management details Length of the planning period 20 years Planning horizon 60 years Forest inventory Total land area: 360 ac Species o Loblolly pine o Whitetail deer main wildlife Three types of stands o Plantation 100 ac o Old field sawtimber 200 ac o Over-mature sawtimber 60 ac Length of the planning period 20 years Planning horizon 60 years Goals: a) maximum even-flow harvest of saw timber b) Sound management for wildlife c) Cut an equal area / period Criteria: a) amount of timber harvested/period b) Acres cut per period c) Distribution of harvest among stand types Activities and decision variables Harvest of a stand of type i in period j Decision variables: acres harvested in period j from stand i: Xij 3 stands x 3 periods = 9 decision variables (X11, X12, X13, X21,..) Forest Management Page 11

Formalization of the forest management problem: Objective function: maximizing of the total harvested volume over the planning horizon Total harvested volume is the sum of the acres cut in each stand type in each period multiplied by the volume / ac at the time of harvest Maximize 3X11+12X21+25X31 + 10X12+17X22+20X32+ 30X13+20X23+18X33 Even-flow harvest volume: at least 1500 MBF/period 3X11+12X21+25X31 1500 10X12+17X22+20X32 1500 30X13+20X23+18X33 1500 Limiting cut areas for wildlife Wildlife biologists restricted the acreage cut for each stand type in each period to provide good vegetative structure for habitat, and recommend the following maximum cut area /stand type/period: o Plantation: less than 40 ac o Old-field : less than 90 ac o Overmature: less than 25 ac X11 40 X12 40 X13 40 X21 90 X22 90 X23 90 X31 25 X32 25 X33 25 Equal acreage cut desired for wildlife and operational purpose o Each period will be cut 120 ac = 360 ac / 3 periods o The entire forest will be harvested in 60 years o The constraint for the first period is: X11+X21+X31=120 o For the other two period the constraints are: X12+X22+X32=120 X13+X23+X33=120 Total acreage cut the area cut from a stand type during the planning horizon cannot be larger than the area of the stand type X11+X12+X13 100 X21+X22+X23 200 X31+X32+X33 60 All decision variables should be nonnegative:xij 0 Forest Management Page 12

Obj. Max 3X11+12X21+25X31+10X12+17X22+20X32+30X13+20X23+18X33 Even1 3X11+12X21+25X31 1500 Even2 10X12+17X22+20X32 1500 Even3 30X13+20X23+18X33 1500 Wild1 X11 40 Wild2 X21 90 Wild3 X31 25 Wild4 X12 40 Wild5 X22 90 Wild6 X32 25 Wild7 X13 40 Wild8 X23 90 Wild9 X33 25 Equal1 X11+X21+X31 =120 Equal2 X12+X22+X32 =120 Equal3 X13+X23+X33 =120 Area1 X11+ X12+ X13 100 Area2 X21+ X22+ X23 200 Area3 X31+ X32+ X33 60 LiPS program //Objective; Max: 3 X11+12 X21+25 X31+10 X12+17 X22+20 X32+30 X13+20 X23+18 X33 ; //Constraints; Even1: 3 X11+12 X21+25 X31 >=1500; Even2: 10 X12+17 X22+20 X32 >= 1500; Even3: 30 X13+20 X23+18 X33 >=1500; Wild1: X11 <=40; Wild2: X21 <=90 ; Wild3: X31 <=25; Wild4: X12 <=40 ; Wild5: X22 <=90; Wild6: X32 <=25; Wild7: X13 <=40; Wild8: X23 <=90; Wild9: X33 <=25 ; Equal1: X11+X21+X31 =120; Equal2: X12+X22+X32 =120; Equal3: X13+X23+X33 =120; Area1: X11+ X12+ X13 <= 100; Area2: X21+ X22+ X23 <= 200; Area3: X31+ X32+ X33 <= 60; Forest Management Page 13

LiPS Output Forest Management Page 14