It appears that you have a function named 'fval' in your Matlab path. This 
function is apparently being called instead of simply referencing the local 
variable named 'fval' (at line 98 in have_fcn.m). This seems strange, since I 
thought variables normally take precedence over functions. But, in any case, a 
function named 'fval' (not part of MATPOWER) is apparently being called and is 
causing the error.

Hope this helps,

    Ray

-- 
Ray Zimmerman
Senior Research Associate
419A Warren Hall, Cornell University, Ithaca, NY 14853
phone: (607) 255-9645




On Jan 1, 2013, at 2:40 AM, dian anggun trisnadi <[email protected]> 
wrote:

> greeting
> 
> hi!
> my name is Dian, I'm a college student from Indonesia.
> 
> i had an problem to run AC OPF using KNITRO threre an error like this when
> i run "runopf.m"
> 
> MATPOWER Version 4.1, 14-Dec-2011 -- AC Optimal Power Flow
> ??? Input argument "co" is undefined.
> 
> Error in ==> fval at 25
> stringa = get(co,'String');
> 
> Error in ==> have_fcn at 98
>             TorF = exist('fval', 'var') && fval == 1;
> 
> Error in ==> opf_execute at 143
>     if ~have_fcn('knitro')
> 
> Error in ==> opf at 225
> [results, success, raw] = opf_execute(om, mpopt);
> 
> Error in ==> runopf at 96
> [r, success] = opf(casedata, mpopt);
> 
> what i suppose to do to solve this problem?
> I'm sure the KNITRO had no problem, because when i run example file from
> KNITRO there are no error found.
> 
> nb : I'm using windows 7, Knitro v8, and Matlab 2010a
> 
> thanks, Dian

Reply via email to