nicolapiccinelli / libmpc

libmpc++ is a C++ header-only library to solve linear and non-linear MPC
https://altairlab.gitlab.io/optcontrol/libmpc/
MIT License
138 stars 21 forks source link

Specifying weights in NLMPC #15

Closed abdelhakim96 closed 1 year ago

abdelhakim96 commented 1 year ago

is there a way to specify weights in NLMPC? in the van der pol example no weights are defined.

nicolapiccinelli commented 1 year ago

In the nonlinear MPC the definition of the functions is up to the user. If you need weights just add them in your cost function. You can define them directly in the lambda function or even statically in your code.