opt=opti('qp',Hdyn,fdyn,'lin',Adyn,ldyn,udyn,'bounds',xmindyn,xmaxdyn,'qc',Q,lq,qrldyn);
[x,fval,exitflag,info]=solve(opt);
Status-----------------Total time : 12 hourNumber of bus : 20Number of line : 19Number of generator : 9
Objective functionH matrix: 804 x 804f matrix: 804 x 1
Linear ConstraintsA matrix: 947 x 804l matrix: 947 x 1u matrix: 947 x 1
Objective value : 20.308845 Exit Status : Success Time : 62.157521 Algorithm : IPOPT: Interior Point NL Solver Fuel cost: 0.110000.P^2 + 0.000000.P + 0.000000Total cost: 1220.308845
Pg=[
0.5420 0.5143 0.4977 0.4873 0.5254 0.5862 0.4270 0.4270 0.4270 0.4270 0.4270 0.4270 %should be negative from this column but only showed zero
0.0600 0.0600 0.0600 0.0600 0.0600 0.0600 0.0279 0.0000 0.0000 0.0000 0.0000 0.0000 0.0600 0.0600 0.0600 0.0600 0.0600 0.0600 0.0279 0.0000 0.0000 0.0000 0.0000 0.0000 0.0270 0.0270 0.0270 0.0270 0.0270 0.0270 0.0270 0.0000 0.0000 0.0000 0.0000 0.0000 0.0400 0.0400 0.0400 0.0400 0.0400 0.0400 0.0400 0.0000 0.0000 0.0000 0.0000 0.0000