function test_cpf
% function: test continuation power flow (CPF)
% created by Rui Bo on 2007/11/12

casename = 'case30';%'case6bus'; %'case30'

%% test cpf
fprintf('\n------------testing continuation power flow (CPF) solver\n');
loadvarloc = 7;%6;%7                 % bus number at which load changes
sigmaForLambda = 0.2;%0.05;          % stepsize for Lambda
sigmaForVoltage = 0.05;%0.025;       % stepsize for voltage
[max_lambda, predicted_list, corrected_list, combined_list, success, et] = cpf(casename, loadvarloc, sigmaForLambda, sigmaForVoltage);
fprintf('maximum lambda is %f\n\n', max_lambda);

%% draw PV curve
flag_combinedCurve = true;
busesToDraw = [];%[3:6];
drawPVcurves(casename, loadvarloc, corrected_list, combined_list, flag_combinedCurve, busesToDraw);

