-
-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: SetIpoptProblemScaling for FORTRAN interface #577
Comments
Following up on the above, we were able to modify IpStdFInterface by adding the function:
Everything seems to work as expected when applied to a modified hs071_f.f in the examples. We compared the results to those obtained with cyipopt in python and the results agreed. Also, if no x_scaling is desired, one can either pass an array populated with all 1s, or make So while we have a workaround, it would be helpful still if this were added to the Ipopt package. Thanks! Edit: Fixed the return value passed by the function. |
Sorry for the late reply. |
I'm adding ipsetproblemscaling in branch 577-fscaling: https://github.com/coin-or/Ipopt/compare/577-fscaling I don't know much about Fortran, however. Can you let me know how to "make |
If a user knows that they are going to do (for example) x scaling, they don't need the array to be allocatable, so they can just do
If they know they aren't going to do g_scaling, they could do
and nothing more. Then
and then of course G_SCALING will not have a null pointer. If they later want to not use g scaling, they can
and it will again have a null pointer. For your example, I might suggest this:
as an example with one scaling used and the other not. The allocate attribute is not available in F77, so to use the feature a user would have to declare and populate both the g scaling and x scaling arrays. |
- as suggested in #577 - requires Fortran > 77
I see. Thank you very much. I thought this may not work with F77. The IPSETPROBLEMSCALING will be available with the next release. |
Thanks so much for this addition! One small problem in the documentation. The example works as is, but to work without g scaling, one has to change the two lines indicated in the comments, and in addition comment out the line
since of course the variable G_SCALING isn't allocated. |
The Ipopt Fortran interface has all but one of the routines available in the C interface. The mapping between the two is:
Would it be possible to add an additional routine, IPSETPROBLEMSCALING, to the Fortran interface? For our problems, scaling is important, and we're finding it difficult to work around the fact that it's not available. We have tried using a Fortran interface without much success.
Thanks!
The text was updated successfully, but these errors were encountered: