Skip to content
Snippets Groups Projects
Commit c93fc4c9 authored by os4g18's avatar os4g18
Browse files

added cwk files

parent 6d5b82a7
No related branches found
No related tags found
No related merge requests found
/* Objective function */
max: 143 x + 60 y;
120 x + 210 y <= 15000;
110 x + 30 y <= 4000;
x + y <= 75;
/* Variable bounds */
\ No newline at end of file
/* Objective function */
max: xs;
xs=xs_11+xs_21+xs_22;
xs_11=x11_0+x11_1+x11_2+x11_3;
xs_21=x21_0+x21_1;
xs_22=x22_2+x22_3;
x11_0+x21_0=x0_t;
x11_1+x21_1=x1_t;
x11_2+x22_2=x2_t;
x11_3+x22_3=x3_t;
xt=x0_t+x1_t+x2_t+x3_t;
xs=xt;
xs_11<=2;
xs_21<=1;
xs_22<=1;
x11_0<=1;
x11_1<=1;
x11_2<=1;
x11_3<=1;
x21_0<=1;
x21_1<=1;
x22_2<=1;
x22_3<=1;
x0_t<=1;
x1_t<=1;
x2_t<=1;
x3_t<=1;
/* Variable bounds */
\ No newline at end of file
/* Objective function */
min: c;
c=21 x2_16+22 x1_17+22 x2_17+23 x1_18+ 23 x2_18+24 x1_19+ 24 x2_19+25 x2_20;
x1_17+x1_18+x1_19=3;
x2_16+x2_17+x2_18+x2_19+x2_20=9;
0<=x1_17<=2;
0<=x1_18<=2;
0<=x1_19<=2;
0<=x2_16<=3;
0<=x2_17<=3;
0<=x2_18<=3;
0<=x2_19<=3;
0<=x2_20<=3;
/* Variable bounds */
\ No newline at end of file
/* Objective function */
min: c;
c=1 x1_0+2 x1_1+2 x2_1+4 x1_2+ 4 x2_2+8 x1_3+ 8 x2_3+16 x1_4+16 x2_4+32 x1_5;
x1_0+x1_1+x1_2+x1_3+x1_4+x1_5=4;
x2_1+x2_2+x2_3+x2_4=5;
0<=x1_0<=1;
0<=x1_1<=1;
0<=x1_2<=1;
0<=x1_3<=1;
0<=x1_4<=1;
0<=x1_5<=1;
0<=x2_1<=2;
0<=x2_2<=2;
0<=x2_3<=2;
0<=x2_4<=2;
/* Variable bounds */
\ No newline at end of file
COMP3217 Security of Cyber-Physical Systems
20/21 Coursework 2: Detection of Manipulated Pricing in Smart Energy CPS Scheduling
The coursework is worth 50% of the total mark for this course. It involves writing programs for the task described below, and you can choose any major programming language such as C/C++, Python, etc. The purpose of this coursework is to understand the linear programming based energy scheduling for smart home cyber-physical system, understand the interdependence between the pricing information and the energy load scheduling, develop detection techniques for pricing attacks, and get familiar with some cyber-physical system security programming skills.
Consider a small community consisting of only 5 users, each of whom has 10 smart home appliances. The details are included in COMP3217CW2-Input.xlsx
You are given a set of 10,000 predictive guideline price curves (TrainingData.txt), where half of them are labelled as Normal and the other half are labelled as Abnormal. There are 25 numbers in each predictive guideline price curve, where the first 24 numbers refer to the unit for each hour and the last number is binary indicating whether it is a normal pricing curve (if it is 0) or an abnormal pricing curve (if it is 1). These 10,000 predictive guideline price curves are basically the training data.
You are also given 100 predictive guideline price curves without labels, which are the testing data (TestingData.txt), where there are 24 numbers in each predictive guideline curve.
You need to design and implement a classification technique to model those training data and effectively compute the labels for all testing data (i.e., 0 or 1 for each predictive guideline pricing curve). You can adopt any of the existing classification techniques (e.g., any machine learning or statistical analysis algorithm) available in the literature, or choose to develop your own technique. In case you adopt an existing technique, you need to implement it by yourself.
For each of those testing data labelled with Abnormal (i.e., labelled with 1) as determined by your code, you will need to compute the linear programming based energy scheduling solution according to that abnormal predictive guideline price curve, and plot the scheduling results showing the hourly energy usage of this community (i.e., 24 bars where each bar shows the total energy usage from all of 5 users during the corresponding hour).
In the report, you should give a clear description of the problem, the linear programming based scheduling algorithm, and your classification technique. You need to show the computed labels for all of the 100 testing data. You should also analyse and discuss your results (including, but not limited to, training error and testing error). The classification accuracy on 100 testing data (testing error) will be an important factor in determining your performance on this coursework, followed by the classification accuracy on 10,000 training data (training error).
You should make good use of a software repository (e.g., git or github) and your code needs to be maintainable and designed with a make-based build structure.
Your code should contain sufficient comments.
Your code should be laid out neatly with consistent indentation.
Assessment criteria
Correctness of classification 50%
Correctness of energy scheduling 10%
Clarity of program and comments 15%
Quality of report and analysis 25%
Submission
Due Date: April 23, 2021
You are required to submit the report, together with the source code files, into the submission system.
File added
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment