You are on page 1of 8

1

2
3
4
5
6
7

NumberOfVariables
Number Of Constraints
Objective Function Type
Iterate Until Self Terminate
Maximum Number Of Iterations
Maximum Computation Time
Print Report Each Iteration

max (fill with "max" for maximization or "min" for minimization)


TRUE (fill with "true" for stopping based on simplex termination criteria or "false" for stop
10
20
TRUE (fill with "true" or "false")

Objective function

X_1

Constraints
1
2
3

4
3

X_2 X_3 X_4


1
3
4

1
4
2

X_2 X_3 X_4


RHS
3
4
3 =
20
6
5 -4 <= 40
-3
3
8 >= 50

X_1

n" for minimization)


mplex termination criteria or "false" for stopping the iteration based on number of iteration or compuation time)

on time)

Generated model is obtained by:


1.
Change the objective function to maximization
2.
Change the right hand side to positive
3.
Introduce slack/surplus/artificial variables
NumberOfVariables 8
NumberOfConstraints3
ObjectiveFunctionMaxType
max

Objective function: maximize


5 X_1 + 1 X_2 + 3 X_3 + 4 X_4 + -50000 X_5 + 0 X_6 + 0 X_7 + -50000 X_8
Constraints:
1 X_1 + 3 X_2 + 4 X_3 + 3 X_4 + 1 X_5 + 0 X_6 + 0 X_7 + 0 X_8 = 20
4 X_1 + 6 X_2 + 5 X_3 + -4 X_4 + 0 X_5 + 1 X_6 + 0 X_7 + 0 X_8 = 40
2 X_1 + -3 X_2 + 3 X_3 + 8 X_4 + 0 X_5 + 0 X_6 + -1 X_7 + 1 X_8 = 50

Initialization Simplex Tableu is obtained by:


1.
Make the Slack variables as basic variable
2.
make the rest as nonbasic variables
Feasible
FALSE
NumberOfVariables 8
NumberOfConstraints3
ObjectiveFunctionMaxType
max

Objective function: maximize


5 X_1 + 1 X_2 + 3 X_3 + 4 X_4 + -50000 X_5 + 0 X_6 + 0 X_7 + -50000 X_8
Constraints:
(violated) 1 X_1 + 3 X_2 + 4 X_3 + 3 X_4 + 1 X_5 + 0 X_6 + 0 X_7 + 0 X_8 = 20
(feasible) 4 X_1 + 6 X_2 + 5 X_3 + -4 X_4 + 0 X_5 + 1 X_6 + 0 X_7 + 0 X_8 = 40
(violated) 2 X_1 + -3 X_2 + 3 X_3 + 8 X_4 + 0 X_5 + 0 X_6 + -1 X_7 + 1 X_8 = 50
Solution:
Z=
X_1 =
X_2 =
X_3 =
X_4 =
X_5 =
X_6 =
X_7 =
X_8 =

-3500000
0
0
0
0
20
40
0
50

Iteration

Basic Variables
Eq.
0Z
(0)
X_5
(1)
X_6
(2)
X_8
(3)

Basic Variables
Eq.
1Z
(0)
X_5
(1)
X_6
(2)
X_4
(3)

Basic Variables
Eq.
1Z
(0)
X_5
(1)
X_6
(2)
X_4
(3)

Basic Variables
Eq.
2Z
(0)
X_2
(1)
X_6
(2)
X_4
(3)

Entering Variable:
Leaving Variable:

4
8

Iteration

Entering Variable:
Leaving Variable:

4
8

Iteration

Entering Variable:
Leaving Variable:

2
5

Iteration

Entering Variable:
Leaving Variable:

2
5

Iteration

Basic Variables
Eq.
2Z
(0)
X_2
(1)
X_6
(2)
X_4
(3)

Entering Variable:
Leaving Variable:

1
2

Iteration

Basic Variables
Eq.
3Z
(0)
X_1
(1)
X_6
(2)
X_4
(3)

Entering Variable:
Leaving Variable:

1
2

Iteration

Basic Variables
Eq.
3Z
(0)
X_1
(1)
X_6
(2)
X_4
(3)

1
0
0
0

X_1
-150005
1
4
2

1
0
0
0

X_1
-12504
0.25
5
0.25

1
0
0
0

X_1
-12504
0.25
5
0.25

1
0
0
0

X_1
-3.84848
0.060606
4.727273
0.272727

X_1
1 -3.84848
0 0.060606
0 4.727273
0 0.272727

X_1
1
0
0
0

0
1
0
0

X_1
1
0
0
0

0
1
0
0

X_2
-1
3
6
-3

X_3
X_4
X_5
-350003 -550004
4
3
5
-4
3
8

X_2
X_3
X_4
-206253 -143752
4.125
2.875
4.5
6.5
-0.375
0.375

0
0
0
1

X_2
X_3
X_4
-206253 -143752
4.125
2.875
4.5
6.5
-0.375
0.375

0
0
0
1

X_2
0
1
0
0

X_2

X_3
X_4
0.242424
0.69697
3.363636
0.636364

X_3
X_4
0 0.242424
1 0.69697
0 3.363636
0 0.636364

X_2

X_3
63.5
16.5
-78
-4.5

X_2

X_3
63.5
16.5
-78
-4.5

X_5

0
0
0
1

X_5
X_6
50000.61
0.242424
-1.09091
0.090909

X_5

X_5
0
0
0
1

0
0
1
0

X_7
X_8
Right hand side
-18750.5 68750.5
-62475
0.375
-0.375
1.25
-0.5
0.5
65
-0.125
0.125
6.25

0
0
1
0

X_7
-0.27273
0.090909
-0.90909
-0.09091

X_8
50000.27
-0.09091
0.909091
0.090909

Right hand side


25.75758
0.30303
63.63636
6.363636

X_7
X_8
Right hand side
0 -0.27273 50000.27 25.75758
0 0.090909 -0.09091 0.30303
1 -0.90909 0.909091 63.63636
0 -0.09091 0.090909 6.363636

X_7
0
0
1
0

X_6
50016
4
-20
-1

Right hand side


0 -3500000
0
20
0
40
1
50

0
0
1
0

X_6
50016
4
-20
-1

X_8
50000
0
0
-1

X_7
X_8
Right hand side
-18750.5 68750.5
-62475
0.375
-0.375
1.25
-0.5
0.5
65
-0.125
0.125
6.25

X_6
0
1
0
0

X_5
X_6
0 50000.61
0 0.242424
0 -1.09091
1 0.090909

X_4
44.5
11.5
-51
-2.5

0
1
0
0

0
0
0
1

X_7
0
0
1
0

X_6

X_5

X_4
44.5
11.5
-51
-2.5

X_6
0
1
0
0

5.5
1.5
-8
-0.5

X_8
Right hand side
49994.5
45
-1.5
5
8
40
0.5
5

5.5
1.5
-8
-0.5

X_8
Right hand side
49994.5
45
-1.5
5
8
40
0.5
5

X_7
0
0
1
0

Solution Simplex:
Total Iteration
3
Solution State
Optimum
Feasible
TRUE
NumberOfVariables 8
NumberOfConstraints3
ObjectiveFunctionMaxType
max
StartTime ########
EndTime ########
Objective function: maximize
5 X_1 + 1 X_2 + 3 X_3 + 4 X_4
Constraints:
(feasible) 1 X_1 + 3 X_2 + 4 X_3 + 3 X_4 = 20
(feasible) 4 X_1 + 6 X_2 + 5 X_3 + -4 X_4 <= 40
(feasible) 2 X_1 + -3 X_2 + 3 X_3 + 8 X_4 >= 50
Solution:
Z=
X_1 =
X_2 =
X_3 =
X_4 =
X_5 =
X_6 =
X_7 =
X_8 =

45
5
0
0
5
0
40
0
0

You might also like