Skip to main content
added 1005 characters in body
Source Link
Richard
  • 4k
  • 14
  • 34

Your problem can be approximated as a discrete time forward Euler integration, therefore it can be cast as a linear program. The osqp library will give you C code that will meet your performance constraints.

I have no idea about the RobOptim library.

2022-06-14 Update

You've mentioned that your objective function has sines and cosines. These functions are non-convex, so they cannot be handled well by any non-convex programming library.

However, if you want a fast solver, then using a non-convex optimizer such as the one you link to won't get you there. Though such a solver may still work for your use case, you're leaving a lot of performance on the table. Convex solvers are also guaranteed to find a globally optimal solution which nonconvex solvers do not offer such a guarantee. Therefore, it's worth figuring out if your problem can be modified to make a convex program.

The solution is to build a convex approximation of the sine/cosine functions. This paper surveys several possibilities.

As you can see below, the approximations are quite good!

Convex approximations of sine and cosine functions

Your problem can be approximated as a discrete time forward Euler integration, therefore it can be cast as a linear program. The osqp library will give you C code that will meet your performance constraints.

I have no idea about the RobOptim library.

Your problem can be approximated as a discrete time forward Euler integration, therefore it can be cast as a linear program. The osqp library will give you C code that will meet your performance constraints.

I have no idea about the RobOptim library.

2022-06-14 Update

You've mentioned that your objective function has sines and cosines. These functions are non-convex, so they cannot be handled well by any non-convex programming library.

However, if you want a fast solver, then using a non-convex optimizer such as the one you link to won't get you there. Though such a solver may still work for your use case, you're leaving a lot of performance on the table. Convex solvers are also guaranteed to find a globally optimal solution which nonconvex solvers do not offer such a guarantee. Therefore, it's worth figuring out if your problem can be modified to make a convex program.

The solution is to build a convex approximation of the sine/cosine functions. This paper surveys several possibilities.

As you can see below, the approximations are quite good!

Convex approximations of sine and cosine functions

Source Link
Richard
  • 4k
  • 14
  • 34

Your problem can be approximated as a discrete time forward Euler integration, therefore it can be cast as a linear program. The osqp library will give you C code that will meet your performance constraints.

I have no idea about the RobOptim library.