kul-optec / nmpc-codegen

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

What's the meaning of tau? #14

Closed KomicaReborn closed 4 years ago

KomicaReborn commented 4 years ago

Hello, I'm studying panoc recently. In your paper, the value of tau is Max {1 / 2 ^ i}. Isn't the value of tau 1? What's the meaning of this definition?

MelisWillem commented 4 years ago

@KomicaReborn first of all you should check out this panoc solver: https://github.com/Zilleplus/PANOCSharp . It's a much cleaner version that does exactly the same thing written in C#. It's a prototype for a new C++ version I am working on.

But to answer your question, tau is used to backtrack, we want to maximize the usuage of the accelerator. So if tau is 1 we use only the accelerator(lbfgs) if it's zero then this is a pure proximal gradient algorithm.

The FBE (forward backward envelop) is a special cost function that we use to backtrack.

So we take the highest tau such that FBE(x_old) <FBE(x_new) -> with x_new = x_old + step_prox_grad(tau-1) + step_lbfgstau. you can find this in the C# code at line 92 till 113

Or in the C code at line 120. But again I highly recommend to study the C# code first.

@alphaville , @lostella , @panpat feel free to correct me here if I am wrong.

lostella commented 4 years ago

So we take the highest tau such that FBE(x_old) <FBE(x_new)

The exact inequality you can find in eq (9) here: https://arxiv.org/pdf/1709.06487.pdf

Other than that, the above explanation is accurate

KomicaReborn commented 4 years ago

ok, thank you very much. My other question is where is the output interface of panoc solver?

KomicaReborn commented 4 years ago

So we take the highest tau such that FBE(x_old) <FBE(x_new)

The exact inequality you can find in eq (9) here: https://arxiv.org/pdf/1709.06487.pdf

Other than that, the above explanation is accurate

Thank you for your reply, I'm looking at your recommended paper. I will study it carefully (even if it is difficult)

MelisWillem commented 4 years ago

@KomicaReborn this repo is the share code used in nmpc-codegen-python and nmpc-codegen-matlab. You should use check out the demo's in those repo's.

MelisWillem commented 4 years ago

@KomicaReborn , @lostella closing the issue