[Ipopt] Linear Constraints at Ipopt

Wendel Alexandre Xavier de Melo wendelalexandre at gmail.com
Wed Mar 23 14:02:57 EDT 2011


Thanks for your answers, Stefan and Andreas.

Have a nice weekend

Wendel

2011/3/22 Andreas Waechter <andreasw at watson.ibm.com>

> Hi,
>
> I don't think that telling Ipopt which constraints are linear makes a
> difference at this point, Ipopt is not taking advantage of this knowledge If
> I remember correctly, we added this feature in the interface for the Bonmin
> MINLP code.
>
> Andreas
>
>
> On Tue, 22 Mar 2011, Stefan Vigerske wrote:
>
>  Hi,
>>
>>  I am working about a problem optimization wich has linear constraints. I
>>> have implemented these constraints like as the other (nonlinear)
>>> constraints
>>> using C++ interface (in methods eval_g and eval_jac_g of my TNLP class).
>>> However, I have saw, in the TNLP class, there is a method for constraints
>>> linearity (get_constraints_linearity). I would like to ask if is possible
>>> implementing my linear constraints using this method (instead of
>>> implemeting
>>> in eval_g). If yes, do I need include these constraints in the jacobian
>>> information, or the first derivative of these constraints is gotten in a
>>> automatic way? Again if yes, there is any convergence advantage in
>>> codifying
>>> at this way?
>>>
>>
>> No, you need to implement linear constraints in eval_g and eval_jac_g.
>> The method get_constraints_linearity is just to tell Ipopt which
>> constraints are linear, so it can safe some computations by knowing that
>> for these constraints the gradient does not change (I guess).
>>
>>  I am sorry if is a dummie question, but there is no example using the
>>> method
>>> get_constraints_linearity...
>>>
>>
>> For each constraint i, i=0,...,m-1, you have to set
>> const_types[i] to Ipopt::TNLP::LINEAR, of constraint i is linear, or
>> Ipopt::TNLP::NON+LINEAR otherwise.
>>
>> You may also implement get_variables_linearity to tell Ipopt which
>> variables appear only in linear parts of constraints and objective.
>>
>> Stefan
>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Ipopt mailing list
>>> Ipopt at list.coin-or.org
>>> http://list.coin-or.org/mailman/listinfo/ipopt
>>>
>>
>>
>> --
>> Stefan Vigerske
>> Humboldt University Berlin, Numerical Mathematics
>> http://www.math.hu-berlin.de/~stefan
>>
>> _______________________________________________
>> Ipopt mailing list
>> Ipopt at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/ipopt
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/ipopt/attachments/20110323/58e48e84/attachment.html 


More information about the Ipopt mailing list