首页
编程语言
数据库
网络开发
Algorithm算法
移动开发
系统相关
金融统计
人工智能
其他
首页
>
> 详细
COMP2051讲解 、辅导 C/C++,Python编程
Artificial Intelligence Methods (COMP2051 or AE2AIM) Coursework Ver1.0 1
Artificial Intelligence Methods (COMP2051 or AE2AIM)
Prof. Ruibin Bai Spring 2024
Coursework: Perturbative hyper-heuristic for Bin Packing Problem
1. Introduction
Bin packing is one of the most studied combinatorial optimisation problems and has
applications in logistics, space planning, production, cloud computing, etc. Bin packing is
proven to be NP-Hard and the actual difficulties depend on both the size of the problem (i.e.
the total number of items to be packed) and other factors like the distribution of item sizes in
relation to the bin size as well as the number of distinct item sizes (different items may have a
same size).
In this coursework, you are asked to write a C/C++/Python program to solve this problem
using a perturbative hyper-heuristic method. In addition to submitting source code, a
written report (no more than 2000 words and 6 pages) is required to describe your algorithm
(see Section 4 for detailed requirements). Both your program and report must be completed
independently by yourself. The submitted documents must successfully pass a plagiarism
checker before they can be marked. Once a plagiarism case is established, the academic
misconduct policies shall be applied strictly.
This coursework carries 45% of the module marks.
2. Bin Packing Problem (BPP)
Given a set of n items, each item j has a size of aj, BPP aims to pack all items in the
minimum number of identical sized bins without violating the capacity of bins (V). The
problem can be mathematically formulated as follow:
Artificial Intelligence Methods (COMP2051 or AE2AIM) Coursework Ver1.0 2
This mathematical formulation is generally NOT solvable by existing integer programming
solvers like CPlex, Gurobi, LPSolve, especially when the number of items n is large. The
solution space of bin packing problem is characterised by its huge size and plateau-like that
makes it very challenging for traditional neighbourhood search methods. In order to
consistently solve the problem with good quality solutions, metaheuristics and hyperheuristics are used, which is the task of this coursework.
3. Problem instances
Over the years, a large number of BPP instances have been introduced by various research.
See https://www.euro-online.org/websites/esicup/data-sets/ for a collection of different bin
packing problem. In this coursework, we shall provide 3 instances files (binpack1.txt,
binpack3.txt and binpack11.txt), respectively representing easy, medium and hard instances.
From which 10 instances shall be selected for testing and evaluation of your algorithm in
marking. For each test instance, only 1 run is executed, and its objective value is used for
marking the performance component (see Section 5).
4. Experiments conditions and submission requirements
The following requirements should be satisfied by your program:
(1) You are required to submit two files exactly. The first file should contain all your
program source codes. The second file is a coursework report. Please do NOT
compress the files.
(2) Your source code should adopt a clean structure and be properly commented.
Artificial Intelligence Methods (COMP2051 or AE2AIM) Coursework Ver1.0 3
(3) Your report should include the followings:
• The main components of the algorithm, including solution encoding, fitness
function, list of low-level heuristics as well as considerations regarding the
intensification and diversification mechanisms. (12 marks).
• Statistical results (avg, best, worst of 5 runs) of the algorithm for all the problem
instances, in comparison with the best published results (i.e. the absolute gap to
the best results). Note that although your report should include results for 5 runs
but your final submission should only have one single run for each instance (i.e.
if you use the sketch code from the lab, set global variable NUM_OF_RUNS=1
before you submit the code). (3 marks)
• A short discussion/reflection on results and performance of the algorithm. (5
marks)
(4) Name your program file after your student id. For example, if your student number
is 2019560, name your program as 2019560.c (or 2019560.cpp, or 2019560.py).
(5) Your program should compile and run without errors on either CSLinux Server or a
computer in the IAMET406. Therefore, please fully tested before submission. You
may use one of the following commands (assuming your student id is 2019560 and
your program is named after your id):
gcc -std=c99 -lm 2019560.c -o 2019560
or
g++ -std=c++11 -lm 2019560.cpp -o 2019560
For Python programs, this second can be skipped.
(6) After compilation, your program should be executable using the following
command:
./2019560 -s data_fle -o solution_file -t max_time
where 2019560 is the executable file of your program, data_file is one of
problem instance files specified in Section 3. max_time is the maximum time
permitted for a single run of your algorithm. In this coursework, maximum of 30
seconds is permitted. soluton_file is the file for output the best solutions by
your algorithm. The format should be as follows:
# of problems
Instance_id1
obj= objective_value abs_gap
item_indx in bin0
item_indx in bin1
… …
Instance_id2
obj= objective_value abs_gap
item_indx in bin0
Artificial Intelligence Methods (COMP2051 or AE2AIM) Coursework Ver1.0 4
item_indx in bin1
… …
An example solution file for problem data file “binpack1.txt” is available on
moodle.
For submissions using Python, the compilation and running are combined in one
command as follows:
python 2019560.py -s data_fle -o solution_file -t max_time
(7) The solution file output in (6) by your algorithm (solution_file) is expected to
pass a solution checking test successfully using the following command on
CSLInux:
./bpp_checker -s problem_file -c solution_file
where problem_file is one of problem data files in Section 3. If your solution file
format is correct, you should get a command line message similar to: “Your total score
out of 20 instances is: 80." If the solutions are infeasible for some instances, you would
get error messages.
The solution checker can be downloaded from moodle page. It is runnable only on
CSLinux.
(8) Your algorithm should run only ONCE for each problem instance and each run
should take no more than 30 seconds.
(9) Please carefully check the memory management in your program and test your
algorithm with a full run on CSLinux (i.e. running multiple instances in one go). In
the past, some submitted programs can run for 1-2 instances but then crashed
because of out-of-memory error. This, if happens, will greatly affect your score.
(10) You must strictly follow policies and regulations related to Plagiarism. You are
prohibited from using recent AI tools like ChatGPT/GPT-4 or other similar large
language models (LLMs). Once a case is established, it will be treated as a
plagiarism case and relevant policies and penalties shall be applied.
Artificial Intelligence Methods (COMP2051 or AE2AIM) Coursework Ver1.0 5
5. Marking criteria
• The quality of the experimental results (20 marks). Your algorithm shall be tested for
a file containing 10 instances chosen from the provided set of instances. The
performance of your algorithm is evaluated by computing the absolute gap with the
best known results using
_ = _ _ − _ _
Criteria Mark
abs_gap < 0 New best results! Bonus: 2 extra marks for
each new best result.
abs_gap <= 0 2 marks per instance
0
1
2< abs_gap <=3 0.5 mark per instance
• abs_gap >4 or
• infeasible solution or
• fail to output solution
within required time limit
0 mark
• The quality of codes, including organisation of the functions/methods, naming
conventions and clarity and succinctness of the comments (5 marks)
• Report (20 marks)
6. Submission deadline
3rd May 2024, 4pm Beijing Time
Standard penalties are applied for late submissions.
7. How to submit
Submit via Moodle.
8. Practical Hints
• Solution encoding for bin packing is slightly more challenging compared with
knapsack program because both the number of bins to be used and the number of
items to be packed in each bin are parts of decisions to be optimised. Therefore, the
Artificial Intelligence Methods (COMP2051 or AE2AIM) Coursework Ver1.0 6
data structure that is used to hold the packing information cannot be implemented via
fixed-size arrays. You may consider to use vector from C++ STL (standard template
library) which requires you to include
as header file. If you prefer C style
without classes, the following data type would be also acceptable:
struct bin_struct {
std::vector
packed_items;
int cap_left;
};
struct solution_struct {
struct problem_struct* prob; //maintain a shallow copy of problem data
float objective;
int feasibility; //indicate the feasibility of the solution
std::vector
bins;
};
In this way, you could open/close bins and at the same time to add/remove items for a
specific bin through API functions provided by the vector library.
• The search space of bin packing problem has a lot of plateaus that make the problem
extremely difficult for simple neighbourhood methods. Therefore, multiple low-level
heuristics are suggested within a perturbative hyper-heuristic method. You are free to
select any of the perturbative hyper-heuristic methods described in
(https://link.springer.com/article/10.1007/s10288-011-0182-8), as well as some of the
more recent ones
(https://www.sciencedirect.com/science/article/pii/S0377221719306526).
• Your algorithm must be runnable on CSLinux and/or computers on IAMET406.
Therefore, you are not permitted to use external libraries designed specifically for
optimisation.
联系我们
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-21:00
微信:codinghelp
热点文章
更多
program讲解 、辅导 c++,java...
2024-05-15
program讲解 、辅导 c/c++,ja...
2024-05-15
辅导 cpt206、java程序设计讲解...
2024-05-15
讲解 infs 2042、java程序设计...
2024-05-15
辅导 csci-ga、讲解 java编程语...
2024-05-15
program辅导 、讲解 matlab语言...
2024-05-15
讲解 econ20120 homework 1讲解...
2024-05-15
辅导 bpln0025: business case...
2024-05-15
讲解 600543 current issues i...
2024-05-15
辅导 lh physical iiib / 03 3...
2024-05-15
讲解 ecs776p image processin...
2024-05-15
讲解 bit233: network design ...
2024-05-15
辅导 eecs 111: system softwa...
2024-05-15
辅导 ematm0067 text analytic...
2024-05-15
讲解 projectile motion assig...
2024-05-15
辅导 finance 251: financial ...
2024-05-15
讲解 acc202 literature revie...
2024-05-15
讲解 econ20120 homework 2讲解...
2024-05-15
讲解 instruction for ca3 gro...
2024-05-15
讲解 comp814 text mining讲解...
2024-05-15
热点标签
math5007
2702ict
bff3121–
comu7000
stat6118
comp814
acc202
ematm0067
bit233
ecs776p
600543
fina864
csys5020
busi4412
bpln0025
econ0051
ecmt2150
econ20120
comp3400
inf6028
bman30702
math0002
msci242l
cpt210
econ2101
mgt11001
com00177m
bman71282
fit2001
econ7030
159.342 ‐ operating
mang6134
math1005/math6005
geog5404m
comp1710/6780
infs 2042
159.341
econ7310
comp3221
comp10002
cpt206
ecmt1010
fit3094
finm081
econ2005
cpt202
socs0030
data7201
data2x01
mn-3507
mat246h1
ib2d90
ib3j80
acc207
comp90007
compx518-24a
fit1050
info1111
acct2201
buad801
compsci369
cse 332s
info1110
math1033
scie1000
eeee2057
math4063
cmt219
econ5074
eng5009
ec333
econ0001
csse2310/csse7231
cpt204
elec4630
dts104tc
ma117
comp2017
640481
csit128
eco000109m
finc5090
ggr202h5f
nbs8295
4ssmn902
chc6171
dsa1002
ebu6304
csci-ua.202
ma416
mec206
comp1021
com6511
iom209
bism7202
idepg001
comp1212
ecom209
cpt106
math1062
mn-3526
5aaob204
citx1401
econ0028
bsan3204
comp9123
fnce3000
fmhu5002
psyc10003
fina2222
be631-6-sp/1
finc2011
37989
cmt218
itp122
qbus6820
ecmt1020
bus0117
soft3202/comp9202
basc0057
mecm30013
aem4060
acb1120
comp2123
econ2151
ecmt6006
inmr77
com 5140
ocmp5328
comp1039
had7002h
cmt309
asb-3715
elec373
cpt204-2324
be631-6-sp
econ3016
mast10007
comp30023
buss6002
comp4403
finm1416
csc-30002
6qqmn971
fin668
mnfg309
inft2031
cits1402
comp2011
eecs 3221
ebu4201
ct60a9600
com336
8pro102
comp8410
comp3425
econ7300
comp222
finm8007
comp2006
comp26020
comp1721
eeen3007j
cis432
csci251
comp5125m
com398sust
finm7405
econ7021
fin600
infs4205/7205
mktg2510-
32022
mth6158
comp328
finn41615
2024
mec302
mgmt3004
mgt7158
com160
as.640.440
rv32i
eecs 113
comp1117b
cs 412
f27sb
comp 315
ecs 116
fit5046
comp30024
acs341
econ1020
isys3014
acc408
comp1047
csc 256
cs 6347
comp5349
ecx2953/ecx5953
联系我们
- QQ: 99515681 微信:codinghelp
© 2024
www.7daixie.com
站长地图
程序辅导网!