1 / 23

IENG 431_LAB2

IENG 431_LAB2. 27/03/09 Friday. Example 1- Brute Production Process (@GIN):.

tiger-wiley
Download Presentation

IENG 431_LAB2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. IENG 431_LAB2 27/03/09 Friday

  2. Example 1- Brute Production Process (@GIN): • Rylon Corporation manufactures Brute and Chanelle perfumes. The raw material needed to manufacture each type of perfume can be purchased for 3$ per pound. Processing 1 lb of raw material requires 1 hour of laboratory time. Each pound of processed raw material yiels 3 oz of Regular Brute Perfume and 4 oz of Regular Chanelle Perfume. Regular Brute can be sold for 7$/oz and Regular Chanelle for $6/oz. Rylon also has the option of further processing Regular Brute and Regular Chanelle to produce Luxury Brute, sold at 18$/oz, and Luxury Chanelle,sold at $14/oz. Each ounce of Regular Brute processed further requires an additional 3 hours of laboratory time and 4$ processing cost and yields 1 oz of Luxury Brute. Each ounce of Regular Chanelle processed further requires an additional 2 hours of laboratory time and $4 processing cost and yields 1 oz of Luxury Chanelle. Each year, Rylon has 6,000 hours of laboratory time available and can purchase upto 4,000 lb of raw material. Formulate an LP that can be used to determine how Rylon can maximize profits. Assume that the cost of laboratory hours is a fixed cost.

  3. Solution to Example 1: Determine how much raw material to purchase and mow much of each type of perfume to produce • X1=number of ounces of Regular Brute sold annually • X2=number of ounces of Luxury Brute sold annuallly • X3=number of ounces of Regular Chanelle sold annually • X4=number of ounces of Luxury Chanelle sold annually • X5=number of pounds of raw material purchased annually Profit=revenues from perfume sales-processing costs-costs of purchasing raw material =7X1+18X2+6X3+14X4-(4X2+4X4)-3X5

  4. Solution to Example 1: Max z =7X1+14X2+6X3+10X4-3X5 Subject to X5<=4,000 3X2+2X4+X5<=6,000 X1+X2-3X5=0 X3+X4-4X5=0 Xi>=0 (i=1,2,3,4,5)

  5. Example 2-Production Process (@BIN): In a factory, 5 different types of products are produced by two machines.The following table includes the related information for the product types:

  6. Formulate a binary LP where there is no need to produce all product types in a month.

  7. Solution to Example 2: • We have 5 types of products: X1,X2,X3,X4 and X5.(i=1,2,3,4,5) • Our decision variables are: Ni and Bi (i=1…5). • Ni=1 ;if machine 1produces the ithproduct • Ni=0 ;otherwise • Bi=1 ;if machine 2produces the ithproduct • Bi=0 ;Otherwise

  8. Using Sets in LINGOWhen and Why? • Whenever you are modeling situations in real life there will be one or more groups of related objects. Such as customers, products, trucks, machines or workers. LINGO allows you to group these related objects together in to sets. So, sets are groups of related objects. • Using sets, you can write a series of similar constraints in a single statement. • Each member in the set may have one or more characteristics associated with it, which are called attributes (They can be known in advance or unknown that LINGO solves for).

  9. Types of Sets in LINGO • Some simple examples: • Product: Price • Truck: Hauling capacity • Warehouse: Storage Capacity • Types of Sets: 1) Primitive Set 2) Derived Set • Primitive Set: Compose only of objects, which can not be further reduced (e.g.: A set composed of 8 trucks). • Derived set: It made from one or more other sets, or it is a subset of other sets or it is a combination of elements from the other sets.

  10. How to use Sets? • Sets are defied in sets section. A sets section may appear anywhere in a model. • It’s necessary to define sets before using them in a model. • The sets section begins with “SETS:” and ends with “ENDSETS”. • Defining Primitive Sets: Set name / member list / :attribute list ; Example: machines / m1, m2, m3, m4 / :working hours; • Note:member list may be either explicitly or implicitly.

  11. Defining Primitive Sets • Explicitly: When the list of members is explicit (cleared and separated) by entering a unique name for each member. Example: Trucks / Truck1 Truck2/ Hauling capacity ; • Implicitly: When there is no list of each member’s name. In fact it is not necessary to list a name for each set member. Set Name / Member1 .. Member N / :attribute list ; • Where member1 is the name of the fist member in the set and member N is the name if the last member. LINGO automatically generates all the intermediate member names between member1 and member N.

  12. Defining Primitive Sets • Implicit member list format: 1- 1..n e.g. 1..5 members: 1, 2, 3, 4, 5 2- day M .. day N e.g. MON..FRI members: MON, TUE, WED, THU, FRI 3- String M.. String N e.g. Mach1 .. Mach4 members: Mach1, Mach2, Mach3, Mach4 4- Month M .. Month N e.g. OCT .. JAN members: OCT, NOV, DEC, JAN 5- MonthYearM ... MonthYearN e.g. OCT2001 ..JAN2002 members:Oct2001, Nov2001, Dec2001, Jan2002

  13. Defining Primitive Sets • Set members may have one or more attributes. Each attribute displays one property of each member. Example: students / 1..30 / name, surname, ID ; Example: Suppose that The XYZ company has 5 warehouses supplying 8 vendors with their products. There is limitation for capacity and demand for warehouses and vendors, respectively. Define the appropriate sets for warehouses and vendors. SETS: Warehouse /1..5/ :capacity; Vendor / 1..8 / demand; ENDSETS

  14. Defining Derived Sets • A derived set definition had the following syntax: Set name (parent-set-list) / member list / :attribute list; • The parent-set-list is a list of previously defined sets, separated by commas. • Without specifying a member list element, LINGO constructs (builds) all combinations of members from each parent set to create the members of the new derived set. • Note: For variable having more than one indices (e.g.: Xij) they should be represented in a derived set.

  15. Defining Derived Sets Example1: SETS: Product / A B / ; Machine / M N / ; Week / 1..2 / ; Allowed (Product, Machine, Week) ; ENDSETS Member Member (A, M, 1) (A, M, 2) (A, N, 1) (A, N, 2) (B, M, 1) (B, M, 2) (B, N, 1) (B, N, 2) Allowed set members:

  16. Defining Derived Sets Example2 (Explicit member): SETS: Product / A B / ; Machine / M N / ; Week / 1..2 / ; Allowed (Product, Machine, Week) / A M 1, B N 2 / ; ENDSETS Member Member (A, M, 1) (B, N, 2) Allowed set members:

  17. End of today’s lab.

More Related