Did you create a case called case39target.m?

Please read the documentation for runcpf. You need to provide two case files 
that have different load and generation patterns in order to define the scaling 
of the loads/generation as lambda increases.

You could for example do something like …

define_constants;
mpcb = loadcase('case39');
mpct = mpcb;
mpct.gen(:, PG) = mpct.gen(:, PG) * 2;
mpct.bus(:, [PD QD]) = mpct.bus(:, [PD QD]) * 2;
results = runcpf(mpcb, mpct);

    Ray


On Sep 7, 2020, at 12:04 PM, Kaled Zareer 
<[email protected]<mailto:[email protected]>> wrote:

By using results = runcpf('case39', 'case39target'), I obtain the following 
error:

Error using loadcase (line 190)
loadcase: specified case not in MATLAB's search path

Error in runcpf (line 286)
    mpct = loadcase(targetcasedata);

Any suggestions, please.

Thank you

Khaled


On Monday, September 7, 2020, 11:52:14 AM EDT, Ray Daniel Zimmerman 
<[email protected]<mailto:[email protected]>> wrote:


I agree this is confusing. It turns out that runcpf() really should always 
require two input arguments, the base case and the target case. And it should 
always throw an error (with a clear error message) if the latter is not 
provided. Instead, currently, it provides 'case9target' as a default value for 
the target case. This means it works for when using 'case9' as the base case, 
but throws the error you encountered if you provide any other base case without 
providing the target.

Simply provide a consistent pair of both base and target cases and it should 
work just fine with other systems.

And I’ll fix this so it requires that the user provide both cases on input, 
with a clear error message if the 2nd is missing.

   Ray



On Sep 5, 2020, at 12:04 PM, Kaled Zareer 
<[email protected]<mailto:[email protected]>> wrote:

Hi all,

The command runcpf('case9') works well. However when I change the system (i.e 
case 39, case 118), I obtain the following error:

''Matrix dimensions must agree.

Error in runcpf (line 316)
 if any(mpcb.bus(:, BUS_TYPE) ~= mpct.bus(:, BUS_TYPE))''

Your help is highly appreciated.

Thank you

Khaled



Reply via email to