Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solve the name-conflict issue #38

Open
pablokrupa opened this issue Aug 27, 2023 · 0 comments
Open

Solve the name-conflict issue #38

pablokrupa opened this issue Aug 27, 2023 · 0 comments
Labels
enhancement New feature or request fix Things that need to be fixed

Comments

@pablokrupa
Copy link
Member

Currently, all solvers declare #defines with the same names, such as nn for the state dimension. They also all call the MPC solver the same way, independently of the value given to options.save_name. This can cause a name-conflict issue if two or more solvers are included in the same .c file.

The solution is for all #defines to be called after the save_name, e.g., if save_name is myMPC, then the #defines will be something like: #define myMPC_nn. This would require a search and substitute in the generated files, substituting nn for myMPC_nn.

Same goes for the function name, which should be called like the save_name, instead of by the name of the MPC formulation and the solver.

@pablokrupa pablokrupa added enhancement New feature or request fix Things that need to be fixed labels Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fix Things that need to be fixed
Projects
None yet
Development

No branches or pull requests

1 participant