function mpc = caseloop22
%% 22 bus loop case in MATPOWER format
%  W. A. Bukhsh, Feb 2013 
%%   References:
%   [1] W. A. Bukhsh, Andreas Grothey, Ken McKinnon, Paul trodden, "Local Solutions of Optimal Power Flow Problem"
%       submitted to IEEE Transactions on Power Systems, 2013
%   [2] W. A. Bukhsh, Andreas Grothey, Ken McKinnon, Paul trodden, "Local Solutions of Optimal Power Flow Problem"
%       Technical Report ERGO, 2011

%% MATPOWER Case Format : Version 2
mpc.version = '2';

%%-----  Power Flow Data  -----%%
%% system MVA base
mpc.baseMVA = 100;
mpc.bus = [
1	3	0	0	0	0	1	0.95	0.00	345	1	1.05	0.95;
2	1	95	20	0	0	1	0.95	-342.86	345	1	1.05	0.95;
3	2	0	0	0	0	1	0.95	-325.71	345	1	1.05	0.95;
4	1	95	20	0	0	1	0.95	-308.57	345	1	1.05	0.95;
5	2	0	0	0	0	1	0.95	-291.43	345	1	1.05	0.95;
6	1	95	20	0	0	1	0.95	-274.29	345	1	1.05	0.95;
7	2	0	0	0	0	1	0.95	-257.14	345	1	1.05	0.95;
8	1	95	20	0	0	1	0.95	-240.00	345	1	1.05	0.95;
9	2	0	0	0	0	1	0.95	-222.86	345	1	1.05	0.95;
10	1	95	20	0	0	1	0.95	-205.71	345	1	1.05	0.95;
11	2	0	0	0	0	1	0.95	-188.57	345	1	1.05	0.95;
12	1	95	20	0	0	1	0.95	-171.43	345	1	1.05	0.95;
13	2	0	0	0	0	1	0.95	-154.29	345	1	1.05	0.95;
14	1	95	20	0	0	1	0.95	-137.14	345	1	1.05	0.95;
15	2	0	0	0	0	1	0.95	-120.00	345	1	1.05	0.95;
16	1	95	20	0	0	1	0.95	-102.86	345	1	1.05	0.95;
17	2	0	0	0	0	1	0.95	-85.71	345	1	1.05	0.95;
18	1	95	20	0	0	1	0.95	-68.57	345	1	1.05	0.95;
19	2	0	0	0	0	1	0.95	-51.43	345	1	1.05	0.95;
20	1	95	20	0	0	1	0.95	-34.29	345	1	1.05	0.95;
21	2	0	0	0	0	1	0.95	-17.14	345	1	1.05	0.95;
22	1	95	20	0	0	1	0.95	0.00	345	1	1.05	0.95;
];
mpc.gen = [
1	95.00	20.00	20000.00	-20000.00	1.00	100	1	10000	0	0	0	0	0	0	0	0	0	0	0	0;
3	95.00	20.00	20000.00	-20000.00	1.00	100	1	10000	0	0	0	0	0	0	0	0	0	0	0	0;
5	95.00	20.00	20000.00	-20000.00	1.00	100	1	10000	0	0	0	0	0	0	0	0	0	0	0	0;
7	95.00	20.00	20000.00	-20000.00	1.00	100	1	10000	0	0	0	0	0	0	0	0	0	0	0	0;
9	95.00	20.00	20000.00	-20000.00	1.00	100	1	10000	0	0	0	0	0	0	0	0	0	0	0	0;
11	95.00	20.00	20000.00	-20000.00	1.00	100	1	10000	0	0	0	0	0	0	0	0	0	0	0	0;
13	95.00	20.00	20000.00	-20000.00	1.00	100	1	10000	0	0	0	0	0	0	0	0	0	0	0	0;
15	95.00	20.00	20000.00	-20000.00	1.00	100	1	10000	0	0	0	0	0	0	0	0	0	0	0	0;
17	95.00	20.00	20000.00	-20000.00	1.00	100	1	10000	0	0	0	0	0	0	0	0	0	0	0	0;
19	95.00	20.00	20000.00	-20000.00	1.00	100	1	10000	0	0	0	0	0	0	0	0	0	0	0	0;
21	95.00	20.00	20000.00	-20000.00	1.00	100	1	10000	0	0	0	0	0	0	0	0	0	0	0	0;
];
mpc.branch = [
1	2	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
2	3	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
3	4	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
4	5	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
5	6	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
6	7	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
7	8	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
8	9	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
9	10	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
10	11	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
11	12	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
12	13	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
13	14	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
14	15	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
15	16	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
16	17	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
17	18	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
18	19	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
19	20	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
20	21	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
21	22	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
22	1	0.01000	0.05000	0.00000	2500.00	2500.00	2500.00	0.00	0.00	1	-360.00	360.00;
];
mpc.areas =[
1 1;
];
mpc.gencost = [
2	0	0	3	0	2	0;
2	0	0	3	0	2	0;
2	0	0	3	0	2	0;
2	0	0	3	0	2	0;
2	0	0	3	0	2	0;
2	0	0	3	0	2	0;
2	0	0	3	0	2	0;
2	0	0	3	0	2	0;
2	0	0	3	0	2	0;
2	0	0	3	0	2	0;
2	0	0	3	0	2	0;
];
mpc.bus(:,3)=2.15*mpc.bus(:,3);
mpc.bus(:,4)=2.15*mpc.bus(:,4)
