MCPcopy Create free account
hub / github.com/TinyMPC/TinyMPC / tiny_set_u_ref

Function tiny_set_u_ref

src/tinympc/tiny_api.cpp:467–477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465}
466
467int tiny_set_u_ref(TinySolver* solver, tinyMatrix u_ref) {
468 if (!solver) {
469 std::cout << "Error in tiny_set_u_ref: solver is nullptr" << std::endl;
470 return 1;
471 }
472 int status = 0;
473 status |= check_dimension("Control/input reference trajectory (u_ref)", "rows", u_ref.rows(), solver->work->nu);
474 status |= check_dimension("Control/input reference trajectory (u_ref)", "columns",u_ref.cols(), solver->work->N-1);
475 solver->work->Uref = u_ref;
476 return 0;
477}
478
479void tiny_initialize_sensitivity_matrices(TinySolver *solver) {
480

Callers

nothing calls this directly

Calls 3

check_dimensionFunction · 0.85
rowsMethod · 0.45
colsMethod · 0.45

Tested by

no test coverage detected