I'll try that. Thank you. On Dec 15, 2017 3:38 PM, "Ray Zimmerman" <r...@cornell.edu> wrote:
> Hi Monisha, > > Yes, if your power_flow_fcn and power_flow_hess functions need more than > the standard inputs (x for the former, x and lambda for the latter), you > need to include them in the 6th argument when you define your > user_constraints.nle field. I don’t recommend passing in the full mpc, > since that results in mpc being assigned to a field inside mpc (circular). > Instead, just pass in the parameters you need, like Yf, Yt, Pf0, Pt0, Qf0, > Qt0. That is, add them to the arguments expected by your two functions, > and add them to the 6th element in the user_constraints.nle field. > > On the other hand, I suspect that it may be better to simply use the > callback interface. Have a look at toggle_softlims() for an example that > could be helpful for you. > > Ray > > > > On Dec 12, 2017, at 1:58 PM, Monisha Raju <monis...@buffalo.edu> wrote: > > Hi, > > I'm trying to add power flow constraints and Pf, Qf, Pt and Qt as > variables. I've tried a few different ways but I'm not sure what I'm > missing. It looks like the 6th field in the user_constraints is required. > However I can't pass any parameters. > > I've sent an email regarding this issue before. I was hoping I could get > some guidance. I've attached the required files for clarity. > > Regards, > Monisha Raju > Graduate Research Assistant > University at Buffalo > <power_flow_fcn.m><power_flow_hess.m><problem1.m> > > >