<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><DIV>hello everybody,</DIV>
<DIV> I have a question about the <STRONG>get_starting_point </STRONG>function. I computed a value which used in my application in this function. The value depended to the starting points of the Ipopt algorithm. I used to think that the agorithm should enter the get_starting_point function <STRONG>once</STRONG>, and then I could get the value I wanted in the <STRONG>finalize_solution </STRONG>function<STRONG>.</STRONG></DIV>
<DIV> However, I got a wrong result of the value in the <STRONG>finalize_solution </STRONG>function. I am very worried about the result because it is really a very simple procedure. I used the GDB to debug the program, then I found that the algorithm entered the get_starting_point function<STRONG> twice!!! </STRONG>The first time when the algorithm entered the get_starting_point function , I got the right result. The second time , I got the wrong result.</DIV>
<DIV> My question is why the Ipopt algorithm would enter the <STRONG>get_starting_point </STRONG>function<STRONG> more than one time? </STRONG>What's the purpose of this ? Thank you for any suggestions!!</DIV>
<DIV> Regard</DIV>
<DIV> LiuQuanchang.</DIV>
<DIV><STRONG>The C++ codes of the get_starting_point function are as followings:</STRONG></DIV>
<DIV>bool reatvOptSolver::get_starting_point(Index n, bool init_x, Number* x, bool init_z, Number* z_L, Number* z_U, Index m, bool init_lambda, Number* lambda)<BR>{<BR> for (int i=0;i<pqnodeN;i++)<BR> {<BR> x[2*i] = vroAlgData.nodevalue[i].vlu;<BR> x[2*i+1] = vroAlgData.nodevalue[i].theta;<BR> }<BR> <BR> for (int i=0;i<pvnodeN;i++)<BR> {<BR> x[2*pqnodeN+i]= vroAlgData.nodevalue[i+pqnodeN].theta;<BR> }<BR> <BR> Number obj_value;<BR> obj_value = pow(blnV,2)*Gii(nodenum-1);<BR> <BR> for (int i=0;i<nodenum-1;i++)<BR> {<BR> <BR> if (i<pqnodeN)<BR> {<BR> obj_value += 2*blnV*x[2*i]*Gij(nodenum-1,i)*cos(blnTheta-x[2*i+1]);<BR> <BR> }else<BR> { <BR> obj_value += 2*blnV*vroAlgData.nodevalue[i].vlu*Gij(nodenum-1,i)*cos(blnTheta-x[i+pqnodeN]);<BR> <BR> }<BR> <BR> for (int j=0;j<nodenum-1;j++)<BR> {<BR> <BR> if (j<pqnodeN)<BR> {<BR> if (i<pqnodeN)<BR> {<BR> obj_value += x[2*i]*x[2*j]*Gij(i,j)*cos(x[2*i+1]-x[2*j+1]);<BR> } <BR> else<BR> {<BR> obj_value += vroAlgData.nodevalue[i].vlu*x[2*j]*Gij(i,j)*cos(x[i+pqnodeN]-x[2*j+1]);<BR> }<BR> }else<BR> { <BR> if (i<pqnodeN)<BR> { <BR> obj_value += x[2*i]*vroAlgData.nodevalue[j].vlu*Gij(i,j)*cos(x[2*i+1]-x[j+pqnodeN]);<BR> } <BR> else<BR> {<BR> obj_value += vroAlgData.nodevalue[i].vlu*vroAlgData.nodevalue[j].vlu*Gij(i,j)*cos(x[i+pqnodeN]-x[j+pqnodeN]);<BR> }<BR> }<BR> }<BR> }</DIV>
<DIV> <STRONG>iterinfo->vroInitPLoss = obj_value;<BR></STRONG> <BR> return true;<BR>}</DIV></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>