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

Function tiny_set_x_ref

src/tinympc/tiny_api.cpp:455–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

453}
454
455int tiny_set_x_ref(TinySolver* solver, tinyMatrix x_ref) {
456 if (!solver) {
457 std::cout << "Error in tiny_set_x_ref: solver is nullptr" << std::endl;
458 return 1;
459 }
460 int status = 0;
461 status |= check_dimension("State reference trajectory (x_ref)", "rows", x_ref.rows(), solver->work->nx);
462 status |= check_dimension("State reference trajectory (x_ref)", "columns", x_ref.cols(), solver->work->N);
463 solver->work->Xref = x_ref;
464 return 0;
465}
466
467int tiny_set_u_ref(TinySolver* solver, tinyMatrix u_ref) {
468 if (!solver) {

Callers

nothing calls this directly

Calls 3

check_dimensionFunction · 0.85
rowsMethod · 0.45
colsMethod · 0.45

Tested by

no test coverage detected