-
Hi, I have a problem implemented in AMPL and I like to transfer the model into a Java environment without using AMPL. I used the same options but I do get different results. Even if I use the AMPL solution as a starting point, it is moving out of optimality in my Java code. My implementation in Java seems to be somehow wrong. I checked the values of the constraints and did the derivative test without any issues. Comparing single constraints in both implementations results in different solutions regarding a non-linear constraint. However, I cannot find the issue. Moreover, at some runs the results of exact vs. approximated Hessian differ. Therefore, I would like to know, if I can expect the same results and if there are any hints to further test my implementation. PS: In case it is helpful I can upload the implementation of one of the problematic constraints |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
It would be difficult to achieve exactly the same results. Even if you manage to get variables and constraints into the same order as with AMPL, there could still be small numerical differences in function, gradient, etc evaluations due to rounding in floating-pointing arithmetics. Increasing the print_level for both AMPL and Java versions and looking at the diff may help to see where things start to go different. |
Beta Was this translation helpful? Give feedback.
It would be difficult to achieve exactly the same results. Even if you manage to get variables and constraints into the same order as with AMPL, there could still be small numerical differences in function, gradient, etc evaluations due to rounding in floating-pointing arithmetics.
Increasing the print_level for both AMPL and Java versions and looking at the diff may help to see where things start to go different.