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

Function tiny_set_x0

src/tinympc/tiny_api.cpp:443–453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

441}
442
443int tiny_set_x0(TinySolver* solver, tinyVector x0) {
444 if (!solver) {
445 std::cout << "Error in tiny_set_x0: solver is nullptr" << std::endl;
446 return 1;
447 }
448 if (x0.rows() != solver->work->nx) {
449 perror("Error in tiny_set_x0: x0 is not the correct length");
450 }
451 solver->work->x.col(0) = x0;
452 return 0;
453}
454
455int tiny_set_x_ref(TinySolver* solver, tinyMatrix x_ref) {
456 if (!solver) {

Callers 5

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 2

rowsMethod · 0.45
colMethod · 0.45

Tested by

no test coverage detected