[Ipopt] IPOPT uses incorrect number of variables

Stefan Vigerske stefan at math.hu-berlin.de
Mon Jun 18 14:26:30 EDT 2012


Hi,

the output

Total number of variables............................:        1

refers to the internal problem representation of Ipopt.
By default, all fixed variables (lb=ub) are taken out there.
Can you make sure that you do not have almost all variables fixed?

You can change what Ipopt is doing with fixed variables via the
fixed_variable_treatment option.

When asking for function values, Ipopt transforms the internal point 
back to the users formulation. That's why you see again 640 variables in 
the eval methods.

Hope this helps,
Stefan


On 06/18/2012 08:11 PM, Seth Watts wrote:
> Hello all -
>
> I have written a NLP class that uses code I have written using C++ and the
> Petsc library to evaluate the objective and constraint functions, their
> derivatives, etc. The number of parameters is set at run-time by reading in
> a value from an input file. Although I have confirmed that this value (128)
> is read in correctly and passed to my class file correctly, IPOPT appears
> to act as though there is only one variable. That is the number displayed
> in the summary table (Total number of
> variables............................:        1) and when I have the
> parameters sent to the screen, only the first value changes - the others
> remain zero (or at least on the order of 1e-310).  Additionally, despite
> setting number of constraint functions to 5 and number of nonzeros in jac_g
> as 5*n = 640, the summary table shows only 5 nonzeros in jac_g. However,
> the value of 'n' in each of the class methods is the correct value of 128.
>
> I can't reproduce this problem with simple toy problems; that is, if I make
> a simple MyNLP class file for which n is set to 128, m to 5, and nnz_jac_g
> to 640, IPOPT runs correctly, the right values appear in the summary table,
> and so on. This leads me to suspect the problem is in something I have done
> in my class definition, but I don't know what it could be. In the
> get_starting_point method, the values returned to x are as I intend, but
> the next time a new_x flag is true and I print out the parameters, all but
> the first value have been set to near-zero values.
>
> I am running IPOPT version 3.10, checked out via subversion last week. I am
> using MUMPS as my linear solver. I am using the quasi-Newton option so that
> I do not supply the Hessian matrix (as it is both dense and expensive to
> compute). I am running Ubuntu 12.04 64-bit.
>
> Thanks in advance for any suggestions you might have.
>
> - Seth
>
>
>
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt


More information about the Ipopt mailing list