Presentation is loading. Please wait.

Presentation is loading. Please wait.

Example 15: A manufacturer has 4 warehouses and 5 vendors all in different cities. In the first warehouse there are 50 products, in the second warehouse.

Similar presentations


Presentation on theme: "Example 15: A manufacturer has 4 warehouses and 5 vendors all in different cities. In the first warehouse there are 50 products, in the second warehouse."— Presentation transcript:

1 solving the transportation problem and Assignment problem by using lingo software

2 Example 15: A manufacturer has 4 warehouses and 5 vendors all in different cities. In the first warehouse there are 50 products, in the second warehouse there are 70 products, in the third warehouse there are 90 products and in the fourth warehouse there are 90 products. Demand of the first vendor is 80 products, demand of the second vendor is 50 products, demand of the third vendor is 60 products, demand of the fourth vendor is 70 products and demand of the fifth vendor is 40 products. Unit transportation costs from the warehouse to the vendor are given in the following table. V V V V V5 WH 1 WH 2 WH 3 WH 4

3 The objective function : by using mathematical notation, you can express the objective function equation as following: In a similar manner, LINGO’s modeling language allows you to express the objective function in a form that is short, easy to type, and easy to understand. The equivalent LINGO statement is: MIN COST(I,J) * X(I,J)); The following table compares the mathematical notation to the LINGO syntax for our objective function: Xij Xij X

4 The corresponding LINGO modeling statement as @FOR(VENDORS(J):
The Constraints: Starting with the demand constraint for Vendor 1, we need to sum up the shipments from all the warehouses to Vendor 1 and set them equal to Vendor 1’s demand of 80 UNITS Using mathematical notation, all fıve demand constraints can be expressed in the single statement: The corresponding LINGO modeling statement as @FOR(VENDORS(J): @SUM(WAREHOUSES(I): X(I, J)) = DEMAND(J)); Xij Xij x

5 The equivalent LINGO statement for all capacity constraints would be:
Now, we will move on to constructing the capacity constraints. In standard mathematical notation, the four capacity constraints would be expressed as: The equivalent LINGO statement for all capacity constraints would be: @FOR(WAREHOUSES(I): @SUM(VENDORS(J): x(I, J))<= CAPACITY(I)); Putting together everything we’ve done so far yields the following complete LINGO model: MODEL: MIN J): COST(I, J) * x(I, J)); @FOR(VENDORS(J): @SUM(WAREHOUSES(I): x(I, J)) = DEMAND(J)); @SUM(VENDORS(J): x(I, J)) <= CAPACITY(I)); END Xij <

6 Solving the Transportation Model
Now, let’s solve the model to determine the optimal shipping volume for each warehouse to vendor link. In LINGO for Windows, choose Solve from the LINGO menu or press the Solve button . Note: To obtain a report containing only the nonzero values for x, we select the Solution command from the LINGO menu. We are then presented with the following dialog box: x Press down on the arrow button in the Attribute or Row Name field and select x from the list of names in the drop-down box.

7

8

9 Example: Suppose that we have 5 jobs (1, 2, 3, 4, 5) waiting for being performed and 5 machines (A, B, C, D, E) that can be used to perform these jobs. The assignment costs of the jobs to the machines are given in the following table. Find the minimum total cost one-to-one assignment between the jobs and the machines by the Hungarian Method.

10 SETS JOBS / J1 J2 J3 J4 J5 /; MACHINE / A B C D E / ; LINKS(JOBS , MACHINE): COST, X; ENDSETS The objective MIN LINKS( I, J): COST( I, J) * X( I, J)); The demand JOBS( MACHINE (J): X( I, J)) =1);

11 The capacity constraints
@FOR( MACHINE (J): @SUM( JOBS ( I): X( I, J)) =1 The data DATA: COST = ; ENDDATA END


Download ppt "Example 15: A manufacturer has 4 warehouses and 5 vendors all in different cities. In the first warehouse there are 50 products, in the second warehouse."

Similar presentations


Ads by Google