Vous êtes sur la page 1sur 4

Solutions for Problem Set 1

October 2, 2014
Templates for modeling problems in this class
Please refer to the following templates if you are asked to formulate a problem into linear/nonlinear programs.
Sets:
h definitions of sets in the problem i

Data:
h definitions of data in the problem i

Decision Variables:
h definitions of decision variables in the problem, including units i

Objective function: h Explanation of objective function in plain English i


h mathematical formulation of objective function i

Constraints: h Explanation of objective function in plain English i


h mathematical formulation of constraints i

Optimal objective value:


h Optimal objective value given by AMPL i

Optimal solution:
h Optimal solution given by AMPL. If required, translate the solution in a
meaningful fashion.i

Solutions for Problem Set 1


1. Textbook problem 2.3 of DJRJ
Decision variables:
x1 , x3 , x5 , x1/2 :=

number of square yards of file to produce of each thickness,


1mm, 3mm, 5mm, and 0.5mm

Objective function: maximize profit (revenue less cost) of film production


max

69.33x1 + 72.5x3 + 43.917x5 + 69.83x1/2

The objective coefficients are calculated vis:


x1 := 110 30 (5.25/60) (8.25/60) (9.35/60)
x3 := 90 10 (4.25/60) (7.25/60) (5.35/60)
x5 := 60 10 (4.25/60) (5.25/60) (4.35/60)
x1/2 := 100 30 (6.25/60) (10.25/60) (6.35/60)
Constraints: Total production hours cannot exceed weekly availability of machines.
s.t.

5x1 + 4x3 + 4x5 + 6x1/2 3600


8x1 + 7x3 + 5x5 + 10x1/2 3600
9x1 + 5x3 + 4x5 + 6x1/2 3600

Productions must be non-negative. Production of each type of film cannot exceed


the corresponding number of square yards available.
x1
x3
x5
x1/2

s.t. 0
0
0
0

400
250
200
450

Optimal objective: z = 34275.


Optimal solution: x1 = 106.25, x3 = 250, x5 = 200, x1/2 = 0.

2. Cargo plan problem.


Sets:
Set of cargos : I := {1, 2, 3, 4}
Set of compartments : J := {f, c, b}
Decision variables:
xij :=

the weight of cargo i (tons) loaded in compartment j

Objective function: maximize total profit for the flight


max

320(x1f + x1c + x1b ) + 320(x1f + x1c + x1b )


+320(x1f + x1c + x1b ) + 320(x1f + x1c + x1b )

Constraints: Cargo on flight does not exceed existing cargo.


s.t. x1f
x2f
x3f
x4f

+ x1c + x1b
+ x2c + x2b
+ x3c + x3b
+ x4c + x4b

20
16
25
13

Weight in each compartment does not exceed weight capacity on flight.


s.t. x1f + x2f + x3f + x4f 12
x1c + x2c + x3c + x4c 18
x1b + x2b + x3b + x4b 10
Total volume of cargo in each compartment does not exceed space capacity on flight.
s.t. 500x1f + 700x2f + 600x3f + 400x4f 7000
500x1c + 700x2c + 600x3c + 400x4c 9000
500x1b + 700x2b + 600x3b + 400x4b 5000
The weight loaded into each compartment is the same (two constraints suffice).
s.t.

1
12 (x1f + x2f + x3f + x4f )
1
12 (x1f + x2f + x3f + x4f )
1
10 (x1b + x2b + x3b + x4b )

=
=
=

1
18 (x1c
1
10 (x1b
1
18 (x1c

+ x2c + x3c + x4c )


+ x2b + x3b + x4b )
+ x2c + x3c + x4c )

The weight loaded are non-negative.


0, i I, j J

s.t. xij
Optimal objective: z = 13330.

Optimal solution(in meaningful fashion):


The front compartment loads 11 tons of cargo 3 and 1 ton of cargo 4.
The center compartment loads 10 tons of cargo 1, 2.67 tons of cargo 2, and 5.33
tons of cargo 4.
The back compartment loads 3.33 tons of cargo 2 and 6.67 tons of cargo 4.

3. Job assignment problem.


Sets:
Set of jobs : I := {1, .., 10}
Set of workers : J := {A, B, C}
Decision variables:
xij :=

the fraction of job i done by worker j

Objective function: maximize total profit for the flight

max

7x2A + 3x3A + 18x6A + 13x7A + 6x8A + 9x10A


+12x1B + 5x2B + 12x4B + 4x5B + 22x6B + 17x8B + 13x9B
+18x1C + 6x3C + 8x4C + 10x5C + 19x7C + 8x9C + 15x10C

Constraints: Every job shall be 100% completed.


s.t.

x1B + x1C
x2A + x2B
x3A + x3C
x4B + x4C
x5B + x5C
x6A + x6B
x7A + x7C
x8A + x8B
x9B + x9C
x10A + x10C

=
=
=
=
=
=
=
=
=
=

1
1
1
1
1
1
1
1
1
1

Total working hour for each worker is less than or equal to 40 hours.
s.t.

7x2A + 3x3A + 18x6A + 13x7A + 6x8A + 9x10A 40


12x1B + 5x2B + 12x4B + 4x5B + 22x6B + 17x8B + 13x9B 40
18x1C + 6x3C + 8x4C + 10x5C + 19x7C + 8x9C + 15x10C 40

The fraction of work done are non-negative.


0, i I, j J

s.t. xij

The fraction of work done is zero if the worker cannot work of a particular job
s.t. xij

= 0, (i, j) {(1, A), (2, C), (3, B), (4, A), (5, A),
(6, C), (7, B), (8, C), (9, A), (10, B)}

Vous aimerez peut-être aussi