[Ipopt] periodic boundary condition (modifying variables

Knut Heidemann heidemannknut at gmail.com
Wed Apr 10 07:46:21 EDT 2013


Hi,

Projecting inside the evaluation routines should be possible and, I 
guess, sufficient.
Where exactly should I modify the variables?

For example

/bool WLCNLP::eval_f( Index n, const Number* x, bool new_x, Number& 
obj_value )
/
does not let me modify x. How would one usually do that?

Currently I am processing x as follows, in order to get the objective value:
/
     const Eigen::Map< const Eigen::Matrix< Number, Eigen::Dynamic, 1 > 
 > x_map( x, n );
     obj_value = system.evaluateEnergy(x_map);/

(I apologize for my very limited programming skills.)

Best,
Knut.

Am 02.04.2013 17:53, schrieb Stefan Vigerske:
> Hi,
>
> I don't think that this is possible without implementation somewhere 
> deep in Ipopt.
> Could you let the variables free and just project their values into 
> [0,L] inside your evaluation routines?
>
> Stefan
>
> On 04/02/2013 01:45 PM, Knut Heidemann wrote:
>> Hi everyone,
>>
>> I am searching for the feature in IPOPT, which allows me to modify the
>> optimization variables in between iterations.
>> In particular, I want to apply periodic boundary conditions on my
>> problem, meaning that every time a variable leaves the interval [0,L], I
>> want to do the following:
>>
>> If x < 0 : x+=L
>> If x > L : x-=L
>>
>> Is there a way of realizing this such that none of the values stays
>> outside the interval in between two steps of the "lowest" optimization
>> level (inside the Newton type iteration)?
>>
>> Best,
>> Knut.
>> _______________________________________________
>> 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/20130410/f5299781/attachment.html>


More information about the Ipopt mailing list