[Ipopt] re-use AmplTNLP
Ali Baharev
ali.baharev at gmail.com
Tue May 19 12:56:59 EDT 2009
Is the following below enough? (Because it seems to work...)
(from ampl_ipopt.cpp)
retval = app->OptimizeTNLP(ampl_tnlp);
AmplTNLP* raw_ptr = static_cast<AmplTNLP*>(GetRawPtr(ampl_tnlp));
ASL_pfgh* asl = raw_ptr->AmplSolverObject();
for (int i=0; i<n_var; ++i)
havex0[i] = 1;
// Change the initial point here
X0[0] = 0.1167;
X0[1] = 0.0370;
// etc ...
// Change bounds on the variables here
LUv[0] = 0.02;
LUv[1] = 0.20;
LUv[2] = 0.01;
LUv[3] = 0.05;
// etc ...
retval = app->ReOptimizeTNLP(ampl_tnlp);
// etc...
Any help is greatly appreciated.
Ali
More information about the Ipopt
mailing list