Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using Variable Domain Functions

Similar presentations


Presentation on theme: "Using Variable Domain Functions"— Presentation transcript:

1 Using Variable Domain Functions
The variable domain functions are @GIN : It used for any positive integer value @BIN : It used for any binary value ( 0 or 1)

2 Example 1 Solve the following problem by LINGO MAX Z= 18X1+14X2+8X3+4X4 Subject to 15x1+12x2+7x3+4x4+x5 ≤ 37 x1,x2,x3,x4,x5 =(0,1)

3

4 Example 2 Suppose that we have 3 jobs (1, 2, 3) waiting for being performed and 3 machines (A, B, C) 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 using lingo programming.

5 Min z= 9x11+6x12+3x13+4x21+5x22+6x23+3x31+7x32+11x33
Subject to x11+x12+x13=1 x21+x22+x23=1 x31+x32+x33=1 x11+x21+x31=1 x12+x22+x31=1 x13+x23+x33=1 x11, x12,x13,x21,x22,x23,x31,x32 and x33 are binary variables

6

7

8 Example 3 Find the optimal solution by using LINGO Max z= 3x1+x2+3x3 Subject to -x1+2x2+x3≤4 4x2-3x3 ≤ 2 X1-3x2+2x3 ≤ 3 x1,x2 and x3 ≥ 0 and integer

9

10

11 Solve the following knapsack problem by using lingo software :
Example 4 Solve the following knapsack problem by using lingo software : Maximize z= 5X1+3X2+8X3+9X4+4X5 Subject to 3X1+X2+5X3+4X4+X5=25 0≤X1 ≤2 , 0 ≤X2 ≤1 , 0 ≤X3 ≤4 , 0 ≤X4 ≤2, 0 ≤X5 ≤1 X1,X2,X3,X4,and X5 and integer.

12

13


Download ppt "Using Variable Domain Functions"

Similar presentations


Ads by Google