[Coin-ipopt] Example hs071_f.f

Andreas Waechter andreasw at watson.ibm.com
Wed May 10 14:26:11 EDT 2006


Hi,

Just to add:  You are right, we could have used the values of the bounds 
in DAT to make the effect of it more visible.  Essentially, I just put 
them in to show that DAT can be used to transfer values among the 
indivudual functions as well as the main program.  But with the current 
value (0.d0), it doesn't really show anything... I might change it in the 
new release.

Other than that, those arrays are simply passed unmodified from the main 
program to the evaluation subroutines.  This way, a user can avoid global 
variables, and can just transfer arbitrary information.  This can be 
handy, if you write code for an optimization problem that has certain 
constants in the constraints or objective function, that are fixed for a 
particular problem, but are different for different instances.  In IDAT 
and DAT, you can just store that information, and you don't need to 
recompile your code for different values of the parameters, and you also 
don't need COMMON blocks in order to transfer the information from the 
main program (that might read those values from a file) to the subroutine 
that computes the constraints.

Hope this helps,

Andreas

On Mon, 8 May 2006, Carl Damon Laird wrote:

> I am not sure exactly what 25 and 4 represent in your question, but it is my 
> udnerstanding that DAT and IDAT are arrays that you can use for whatever you 
> wish. These represent "user data" that you may want passed into your 
> evaluation routines through IPOPT.
>
> The hs071_f example does not use the values from these arrays in the 
> evaluation routines since they are not needed, but we include them in the 
> call to optimize as an example. Of course, in the code for your specific 
> problem you can set the values as you wish and then access the entries in the 
> evaluation routines.
>
> I hope this helps, but if I have misunderstood your question, feel free to 
> submit to the list again.
>
> Cheers,
>
> Carl.
>
>
> On Sun, 7 May 2006, Su Ba wrote:
>
>> Hi,
>> 
>> Should it is more reasonable to revise DAT(1) = 25 and DAT(2)=4 instead of 
>> zeros in the example hs071_f.f ?  Could you tell me about the usage of 
>> IDAT(n)?  In which case we need it?  Can you give me an example?
>> 
>> Thank you so much.
>> 
>> Danh.
>> 
>> _________________________________________________________________
>> Express yourself instantly with MSN Messenger! Download today it's FREE! 
>> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>> 
>> _______________________________________________
>> Coin-ipopt mailing list
>> Coin-ipopt at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/coin-ipopt
>> 
>> 
> _______________________________________________
> Coin-ipopt mailing list
> Coin-ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-ipopt
>



More information about the Coin-ipopt mailing list