It’s hard to offer advice to generic questions. It’s a lot easier if you can provide a reproducible example. Take a read of: Please read: make it easier to help you
now the results are inaccurate
How inaccurate?
Any additional suggestion to try?
Take a look through the Ipopt options: