程序代写案例-MATPMD4
时间:2022-03-13
MATPMD4 - Stochastic Processes and Optimisation
Project 2: Optimisation
Important: Part 1 and Part 2 must be done individually and must be your own work.
Part 3 can be done individually or in a group of 2. (Groups of more than 2 are not per-
mitted.)
PART 1: MAXIMISING A FUNCTION
Objective: Find the maximum value of f(x, y, z), where
f(x, y, z) = esin(40z) + esin(50x) + sin(60ey) + sin[70 sin(x)] + sin[70 cos(z)]
+ sin[sin(80y)]− sin[10(x + y)] + x
2 + y2 + z2
4
Constraints: The solution must be subject to the (hard) constraints:
−1 ≤ x, y, z ≤ 1 and x, y, z ∈ R
You should explain the approach taken, attaching any programming code that is used -
provide comments to the code where appropriate.
Equation in Python:
math.exp(math.sin(40*z)) + math.exp(math.sin(50*x)) + math.sin(60*math.exp(y))
+ math.sin(70*math.sin(x)) + math.sin(70*math.cos(z)) + math.sin(math.sin(80*y))
- math.sin(10*(x+y)) + (x**2+y**2+z**2)/4
1
MATPMD4 - Stochastic Processes and Optimisation
PART 2: DISTRIBUTION NETWORK
A major supermarket is updating its delivery network. They have 2 main warehouses
(W1 and W2) and 23 stores at locations (1-23). Each day they must carry out a daily
delivery from their two warehouses to all 23 stores, with the vehicles returning to the ware-
houses at the end of the day. The geographical locations of the sites are shown below, with
exact distances over the page:
0
20
40
60
80
100
0 20 40 60 80 100
t1
t2
t3
t4t
5 t6
t7
t8
t9
t10
t11
t12 t13
t14
t15
t16
t17
t18
t19
t20
t21
t22
t23
yW1
y
W2
(An Excel version of this data will be available on Canvas.)
There are two types of vehicle that the supermarket can use:
Cost per mile Maximum stores it can supply
Van £1 4
Lorry £2 16
Given the aim is to minimise the total daily costs, find the best strategy such that
every store receives its delivery and the warehouses have the correct number of vehicles at
the end of the day to carry out the deliveries the following day.
Questions: Which stores should each warehouse supply? How many vans or lorries does
each warehouse require? What routes should each vehicle take? What is the total cost?
2
MATPMD4 - Stochastic Processes and Optimisation
T
h
e
d
is
ta
n
ce
s
fr
om
si
te
i
to
si
te
j,
in
m
il
es
,
ar
e
gi
ve
n
in
th
e
ta
b
le
b
el
ow
(t
ab
le
is
sy
m
m
et
ri
ca
l)
:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
W
1
W
2
1
0
2
74
0
3
58
25
0
4
77
45
28
0
5
88
55
40
13
0
6
72
45
25
5
16
0
7
61
62
68
96
10
9
93
0
8
47
28
16
43
56
40
54
0
9
10
1
30
45
47
51
50
90
55
0
10
25
54
45
70
82
66
39
30
83
0
11
75
20
18
25
35
25
78
31
28
60
0
12
80
53
35
8
8
9
10
3
49
53
75
33
0
13
43
47
22
34
45
29
74
24
66
40
38
37
0
14
57
17
16
43
56
41
54
11
46
37
25
50
33
0
15
33
57
33
45
55
40
74
31
78
37
50
47
12
41
0
16
60
61
36
28
34
24
96
45
72
62
45
26
22
51
27
0
17
93
19
40
49
56
51
77
46
13
73
26
56
62
36
73
72
0
18
57
67
42
36
41
32
98
49
80
62
53
34
25
56
25
8
79
0
19
22
52
38
62
74
57
49
25
80
11
55
66
30
35
26
51
71
51
0
20
90
69
51
24
15
25
11
8
65
67
88
49
16
49
67
56
31
72
36
79
0
21
52
26
7
34
47
31
62
9
49
38
23
41
21
12
31
39
43
44
32
56
0
22
48
35
11
32
44
28
67
14
56
38
28
37
12
21
23
31
50
35
30
51
9
0
23
95
37
38
27
29
31
98
52
23
82
22
32
55
47
67
55
30
63
76
44
44
48
0
W
1
71
56
34
15
19
12
10
0
47
62
69
38
12
30
50
38
14
63
22
60
19
39
33
42
0
W
2
35
43
37
64
76
60
36
21
72
11
51
69
38
27
38
60
62
62
15
84
30
32
73
65
0
3
MATPMD4 - Stochastic Processes and Optimisation
PART 3: YOUR OWN REAL-LIFE EXAMPLE - Max 4 sides
Part 3 can be done either individually (maximum 4 pages) or in pairs (maximum 6 pages).
Give an example of a real-life optimisation problem. This can be any example from business,
government, leisure or sport. It may involve using existing data, or simply approximating
behaviour with simulated data and your own model.
The key points you must include in your report are:
(i)Background: Introduce the situation, including any relevant information that is needed
to understand the problem (including references);
(ii) Aim: Specify what is to be optimised. What is the main objective? What con-
straints will there be?
(iii) Model: Convert your problem into a mathematical or statistical problem - what
is the form of your solutions? What is your objective function? What will the mathemati-
cal or statistical model be to get from your solutions to your objective? What constraints
exist on your possible solutions?
(iv) Optimisation Method: Explain how you solved the problem - for example, what
algorithm(s) did you use etc. Submit your code/program so your results can be verified.
Comment or explain how your code works - this can be done a separate file, and is not
included in the page limit.
(v) Results: Give the results to your problem. Is there just one optima, or multiple
optima? Explain how you know you have got the optimal solution, or at least a solution
close to the optimal, and that you are not at a local optima?
(vi) Conclusion: Relate your results back in terms of the original problem. Carry out
a critical analysis of your results - what are the strengths and weaknesses of your work?
(Weaknesses in your model, for example due to the assumptions you make to simplify it,
are not a bad thing, as long as you are aware of them. Remember, no model is perfect!)
4


essay、essay代写