kul-optec / nmpc-codegen

C Code generation for NMPC
https://kul-forbes.github.io/nmpc-codegen/
MIT License
29 stars 4 forks source link

Alternative limit: make it possible to set a max time rather than max iterations #12

Open korken89 opened 5 years ago

korken89 commented 5 years ago

Hi,

During the work where we used PANOC on a quadrotor we sometimes went over the max time which was allowed when PANOC did a lot of internal linesearch steps. With this in mind and after talking with @alphaville , it would be good to be able to choose a MAX_ITERATIONS or MAX_TIME, where after each PANOC iteration it would check if the time limit has been broken. As we still want PANOC to continue iterating while inside its time budget.

BR Emil

MelisWillem commented 5 years ago

Maybe you should join the skype conversation with me and Pantelis this evening?

korken89 commented 5 years ago

Sure, no problem! What time do you plan to have it?

MelisWillem commented 5 years ago

20.15 CET

korken89 commented 5 years ago

I will come online around then, I have gym until 8 so might be a few minutes late.

korken89 commented 5 years ago

I am available from now, you can add me: Skype name: "skuggbane"

MelisWillem commented 5 years ago

a max iterations already exists, after some toughts, a max_time would be hard as different embedded systems have different timers/drivers. However we can create a "callback" function that allows you to decide yourself after every iteration if you want to continue

korken89 commented 5 years ago

That sounds like a good idea! A simple predicate to act alongside the residual limit would be perfect. The predicate can then be no. of iterations / time / any other thing.

MelisWillem commented 5 years ago

Only 1 problem I really don't have the time. Work + side hustle is 7 days on 7