forked from rtaormina/epanetCPA
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.m
More file actions
26 lines (20 loc) · 752 Bytes
/
main.m
File metadata and controls
26 lines (20 loc) · 752 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
%% Examples of cyber-physical attacks on WADI testbed
%% INITIALIZATION
clear; clc;
% add path for epanetCPA toolbox
addpath('.\epanetCPA\')
% add location of the map and cpa files
inpFilePath = 'minitown_map.inp';
% Define scenario
scenarioFolder = './scenarios/minitown/';
cpaFilePath = 'minitown_attack.cpa';
noAttackCpaFile = 'minitown_no_attacks.cpa';
exp_name = cpaFilePath(1:strfind(cpaFilePath,'.cpa')-1);
% Similation without attacks (used for comparison).
simul = EpanetCPA(inpFilePath, [scenarioFolder, noAttackCpaFile]); %
simul = simul.run();
simul.outputResults('minitown_no_attacks');
% Similation with attacks
simul = EpanetCPA(inpFilePath, [scenarioFolder,cpaFilePath]); %
simul = simul.run();
simul.outputResults(exp_name);