From: Marina on
I am trying to minimize a function using knitro under a "for" loop which describes the different agents for which I solve the problem.

now, under [jk,fval]=ktrlink(...) where I need to specify my constraints I have one constraint for each agent i
how can I tell matlab to solve for each i using the i'th constraint?
From: Nicolas on
Dear Marina,

If I understand well, in each loop, you have to extract only the constraints concerning the agent i from your constraint matrix and only the variables concerning the agent i from your variable vector. Then you can call ktrlink once for each agent.

Best regards.

Nicolas Omont

"Marina " <selini99(a)hotmail.com> wrote in message <h8qm98$7h$1(a)fred.mathworks.com>...
> I am trying to minimize a function using knitro under a "for" loop which describes the different agents for which I solve the problem.
>
> now, under [jk,fval]=ktrlink(...) where I need to specify my constraints I have one constraint for each agent i
> how can I tell matlab to solve for each i using the i'th constraint?