NUMERICAL MODELLING AND COMPUTATION

OPTIMIZATION

PERFORMANCE CRITERIA:

TARGETED LEARNING OUTCOMES

3. Design and write structured programmes in a high-level language and use them to solve
familiar real world engineering problems
4. Locate and use technical evidence in the solution of engineering problems and evaluate it
6. Work and learn independently and communicate results effectively.

Important Information – Please Read Before Completing Your Work

All students should submit their work by the date specified using the procedures specified in the Student Handbook.
An assessment that has been handed in after this deadline will be marked initially as if it had been handed in on
time, but the Board of Examiners will normally apply a lateness penalty.

Your attention is drawn to the Section on Academic Misconduct in the Student’s Handbook.

Collaborative reports are explicitly forbidden and so the report submitted is expected to be unique for each student.

Any queries that you may have on the requirements of this assessment should be e-mailed to mriley@lincoln.ac.uk.
No queries will be answered after respective submission dates.

You must ensure you retain a copy of your completed work prior to submission.

Page 2 of 5
PROGRAMME:  MECHANICAL ENGINEERING – BENG (HONS)
MODULE CODE:
EGR2003M
MODULE TITLE:  ENGINEERING SCIENCE AND MATHEMATICS 4
SUBJECT:  NUMERICAL MODELLING AND COMPUTATION
COURSEWORK TITLE:  RESIT COURSEWORK 3: OPTIMIZATION

COURSEWORK BRIEF:
You have joined a medium sized manufacturing firm as a junior engineer. The senior management wants
to  see  more  use  of  optimisation  techniques  in  the  company  and  your  line  manager  has  tasked  you  with
comparing two optimisers. Elvis, another junior engineer, began this  work last year but has since left the
company. You have been provided with his incomplete work in a .zip file. Take the .zip file and extract the
contents to your working folder in MATLAB.

A.
Introduction
Elvis used  5  main  scripts  for  benchmarking  purposes:  benchmark.m and objfun1.m  …
objfun4.m. These 4  functions are  useful because they are representative of the  kinds  of problems that
your company’s design department face.

i)  Load  the  workspace  file elvis_surfaces.mat which  contains  the  necessary  raw  data  to  plot  the
response surfaces of the 4 objfun benchmark functions. The X and Y matrices are identical for all these
3-D shaded surface plots. The raw response data for each function is stored in Z1 Z2 Z3 and Z4 matrices.
Use the surfc MATLAB function for plotting (type help surfc for usage). Label the surface plot
axes ‘x’ and ‘y’ for the search space and ‘response’ for the objective function evaluation (Z’s).

4 Marks

ii)  Optimisation  algorithms  tend  to  be  suited  to  some  kinds  of  surfaces  more  than  others. Visually  inspect
your  4 surface  plots  and  decide  for  each  case  if  it  is  [convex  or  non-convex],  and  [continuous  or
discontinuous]. Title your plots from A. i) with the two categories that you believe describe each surface.  4 Marks

B.
Benchmarking
Two optimisation algorithms have been shortlisted for use in your company: Nelder Mead & Differential
Evolution. For the sake of simplicity, your line manager has stated that it would be better to adopt just one.
Elvis had started to compare these two algorithms on the test functions but never completed his work. His
work to date is found in a table at the end of this document.

READ ALSO :   Job Analysis And Approaches To Job Designs

i)  Using Elvis’s table as a starting point (found in the MS word document), complete all the experiments in
that  table and  tabulate  your  results.  The  Nelder  Mead  implementation  takes  random  starting  points  each
time. The differential evolution algorithm also uses random numbers for initialisation. As this means that
test results can vary, you will need to repeat each experiment several times (minimum = 5). Calculate and
tabulate  the  co-efficient  of  variation  of  your  results too  (the co-efficient  of  variation  is a  measure  of
scatter). For help on using this script, type ‘help benchmark’

16 Marks

ii)  Tuning the optimisation algorithms.
Changing the configuration of optimisation algorithms can significantly alter their performance. Your aim
is  to  tune  each  optimiser  to  ideally  return  a  more  optimal  result,  with  fewer  iterations  (i.e.  a  lower
num_func_calls)  across  all  of  the  test  functions.  Once  you  have  altered any  tuning  parameters,
benchmark with your new settings against all of the test functions before tuning the parameters again.

Write  a MATLAB script to  automate  this  testing  procedure and  repeat  all  the  tests  in B. i)  for  each  new
tuning  step. Tip1:  use nested for loops for  creating  test  iterations  and  fill vectors for  logging  the  results.
Tip2:  You  could  call  benchmark.m  from  your  script  using
[result,iterations]=benchmark(… , … , … , … , …) which would capture its output.

Tuning parameters (tune_var1,tune_var2)
  For testing Nelder Mead, tune both the size of the simplex and also the convergence criteria.
  For Differential Evolution tests, alter the size of the population and also the max generations.
  Tabulate the results of your tuning, showing in one table the best results over the 12 benchmarks.
16 Marks

Page 3 of 5
  Also include the 4 tuning parameters you used to get this table.
iii)  On  no  more  than  four  sides of  A4 and  using  no  more  than  800  words  in  12  point  Arial  font,  complete  a
summary report on the results of your optimiser tests. Briefly Introduce the work, Outline your Methods,
summarise  your Results as  well as inserting your tables from B. i) and B. ii). Provide a short Discussion
for the reader. At the back under the sub heading of Appendix, copy from MATLAB and paste into Word
your 4 labelled graphs from A. ii) and also paste your script used in B. ii)

  For each optimiser you should (at a minimum) consider ease of use, ease of adaptation, repeatability
of results (scatter), accuracy of results, cost of use (iterations), performance on different surfaces/in
different dimensions.

25 Marks

C.
Pressure vessel design optimisation
Your manufacturing firm sells a particular type of pressure vessel as one of their products. It is desired to
reduce the cost of the compressed air storage tank although it must still withstand the same air pressure of
3000psi. To do this any new design must satisfy a number of constraints.

Search space

READ ALSO :   Your Turn: A Sports Sales Plan

There  are  four  bounded  design
variables: Length  and  Radius  of  the
cylindrical  section  (L)  and  (R),  the
thickness  of  the  shell  (T
s
)   and  the
thickness  of  the  head  (T
h
)  within  the
following  4  dimensional  search
domain:

Problem specification

The cylindrical  pressure vessel is capped  at  both  ends  by  hemispherical  heads  as  shown  in  the  diagram.
The objective of the optimisation is to minimise the cost of the materials used to manufacture the vessel.
An equation for calculating the cost (based on the volume of material used) is already known. Also known
are the constraints that must be satisfied for the correct operation of any new design.

Constraints to satisfy for any new pressure vessel

Minimum  volume  of  the  tank

. The  minimum  volume  of  compressed  air  to  be  held  in  the  tank  is
21.237m
3

Shell wall limit

. The shell wall takes a minimum value as given by the following constraint:

Head wall limit

. The head wall takes a minimum value as given by the following constraint:

Length limit

. The cylindrical section has a limit placed on its maximum length such that:

Page 4 of 5

The optimisation

This single objective optimisation is to minimise the cost of the material used in production of the vessel
whilst not straying outside any of the above four constraints.

The cost of the materials used in the vessel (objective function) is given by:

i)  Elvis  has  made  errors  in  calculating  the  volume  of  the  tank  (constraint

)  in  the vessel.m MATLAB
objective  function  program  that  he  was  writing.  Fix  the  errors  in  the

constraint  calculation in
vessel.m to match

given above and verify that your company’s current pressure vessel (L=3500mm,
R=1200mm, Ts=30mm,Th=20mm)  has a cost of  £6073.93. Tip: in MATLAB, try  using x=[3500 1200
30 20]; vessel(x) for this test.

2 Marks

ii)  Elvis chose to handle any violation of the constraints by returning an exceptionally high price (

).
This is to force any optimiser to search elsewhere. Read and understand the vessel.m script to see how
he did that. Unfortunately he only had time to code the

constraint before he left the company. Using the
equations above, add code to the vessel.m script to also evaluate all the three remaining constraints for
any  set  of  design  variables.  Test  your  new vessel.m script  by  executing  it  from  the command  window
and ensure that your new constraints return costs of greater than

when violated e.g. try L=6200mm
or Ts=18.5mm which should violate

and

.

9 Marks

iii)  Use your tuned (i.e. best) Nelder Mead from B. ii) and vessel.m to optimise (i.e. reduce) the price of the
pressure  vessel.  Repeat  10  times,  each  time  quoting  the  new  design  variables  of  the  converged  solution
(L,R,Ts, Th), the new cost in pounds, and the four constraint evaluations

in a table. Also tabulate
the  number of function  calls  to  convergence  as  the  expense  of  using  this  optimisation  algorithm
(num_func_calls). DO NOT submit MATLAB code for this – show tables using a word processor.

12 Marks

iv)  Repeat part iii) but use your tuned Differential Evolution algorithm and likewise, tabulate
num_func_calls as your expense of using this algorithm.

READ ALSO :   Christian Theology - second Creation narrative in the Book of Genesis

NOTE: If you did not successfully finish the tuning problem of part B. ii), please still complete problems
part  C. ii) and C. iv). Just use the default tuning values as per the benchmark.m help-file (for NM use
tune_var1=5 and tune_var2=0.001 for DE use tune_var1=15 and tune_var2=200).

12 Marks

NOTES: MAKE 1 SUBMISSION FOR THIS COURSE WORK
1 ALL CONTENTS SHOULD BE WORD PROCESSED; FOR PART C. COPY AND PASTE YOUR
MATLAB  CODE (THE  MODIFIED VESSEL.M  FILE)  AND  INSERT  YOUR  TWO RESULT  TABLES  FROM
PARTS C. III) AND C. IV) AT THE BACK OF THE SUMMARY REPORT YOU CREATED IN B. III). EMAIL THIS
SINGLE DOCUMENT TO jensmith@lincoln.ac.uk

Page 5 of 5
MARKING CRITERIA:

COURSEWORK WILL BE MARKED ACCORDING TO THE FOLLOWING UNIVERSITY CRITERIA.

90-100%: a range of marks consistent with a first where the work is exceptional in all areas;

80-89%: a range of marks consistent with a first where the work is exceptional in most areas.

70-79%:  a  range  of  marks  consistent  with  a  first.    Work  which  shows  excellent  content,  organisation  and
presentation,  reasoning  and  originality;  evidence  of  independent  reading  and  thinking  and  a  clear  and
authoritative grasp of theoretical positions; ability to sustain  an argument, to think analytically  and/or critically
and to synthesise material effectively.

60-69%: a  range  of  marks  consistent  with  an  upper  second. Well-organised  and  lucid  coverage  of  the  main
points  in  an  answer;  intelligent  interpretation  and  confident  use  of  evidence,  examples  and  references;  clear
evidence  of  critical  judgement  in  selecting,  ordering  and  analysing  content;    demonstrates  some  ability  to
synthesise material and to construct responses, which reveal insight and may offer some originality.

50-59%: a range of marks consistent with lower second; shows a grasp of the main issues and uses relevant
materials in a generally business-like approach, restricted evidence of additional reading; possible unevenness
in structure of answers and failure to understand the more subtle points: some critical analysis and a modest
degree of insight should be present.

40-49%:  a  range  of  marks  which  is  consistent  with  third  class;  demonstrates  limited  understanding  with  no
enrichment  of  the  basic  course  material  presented  in  classes;  superficial  lines  of  argument  and  muddled
presentation; little or no attempt to relate issues to a broader framework; lower end of the range equates to a
minimum or threshold pass.

35-39%:    achieves  many  of  the  learning  outcomes  required  for  a mark  of  40% but  falls  short  in  one  or  more
areas.

30-34%: a fail; may achieve some learning outcomes but falls short in most areas; shows considerable lack of
understanding of basic course material and little evidence of research.

0-29%:  a  fail;  basic  factual  errors  of  considerable  magnitude  showing  little  understanding  of  basic  course
material; falls substantially short of the learning outcomes for compensation.

MARKING SCHEME:

THE  FOLLOWING  MARKING  SCHEME  WILL  BE  APPLIED  TO  THE  SUBMITTED
COURSEWORK.
SECTION A               8 MARKS
SECTION B               57 MARKS
SECTION C               35 MARKS
TOTAL: 100 MARKS

 PLACE THIS ORDER OR A SIMILAR ORDER WITH US TODAY AND GET AN AMAZING DISCOUNT 🙂