cyqlone develop
Fast, parallel and vectorized solver for linear systems with optimal control structure.
Loading...
Searching...
No Matches
ocp-backend-cyqlone.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cyqlone/config.hpp>
7#include <guanaqo/mat-view.hpp>
8
9#include <cstdint>
10#include <limits>
11#include <memory>
12#include <span>
13
14namespace cyqlone::qpalm {
15
16/// @addtogroup topic-optimization-solvers-ocp
17/// @{
18
23
30
32 index_t processors = 8;
33 bool print_residuals = false;
35 // bool init_x0 = false; // TODO
37 index_t max_update_count = 5;
38 bool detailed_timings = false;
40 uint32_t spin_count = std::numeric_limits<uint32_t>::max();
42};
43
45 index_t num_updates = 0;
46 index_t rank_updates = 0;
47 index_t num_factor = 0;
48};
49
50/// @}
51
52} // namespace cyqlone::qpalm
53
54namespace CYQLONE_NS(cyqlone::qpalm) {
55
57
58template <index_t VL, StorageOrder DefaultOrder = StorageOrder::ColMajor>
59struct CyQPALMBackend;
60
61namespace detail {
62
63template <index_t VL, StorageOrder DefaultOrder>
64struct backend_stats_type<CyQPALMBackend<VL, DefaultOrder>> {
66};
67
68} // namespace detail
69
70/// @addtogroup topic-optimization-solvers-ocp
71/// @{
72
73template <index_t VL, StorageOrder DefaultOrder = StorageOrder::ColMajor>
74struct unique_CyQPALMBackend : std::unique_ptr<CyQPALMBackend<VL, DefaultOrder>> {
77 unique_CyQPALMBackend &operator=(unique_CyQPALMBackend &&) noexcept = default;
79 unique_CyQPALMBackend(std::unique_ptr<CyQPALMBackend<VL, DefaultOrder>> &&o) noexcept
80 : std::unique_ptr<CyQPALMBackend<VL, DefaultOrder>>{std::move(o)} {}
81};
82
83template <index_t VL, StorageOrder DefaultOrder = StorageOrder::ColMajor>
84unique_CyQPALMBackend<VL, DefaultOrder>
86 const CyQPALMBackendSettings &settings);
87
88template <index_t VL, StorageOrder DefaultOrder = StorageOrder::ColMajor>
90 const CyqloneStorage<real_t> &ocp);
91
92template <index_t VL, StorageOrder DefaultOrder = StorageOrder::ColMajor>
94
95/// @}
96
97template <index_t VL, StorageOrder DefaultOrder>
101
102} // namespace CYQLONE_NS(cyqlone::qpalm)
#define CYQLONE_NS(ns)
Definition config.hpp:10
Data structure for optimal control problems where the initial states are eliminated.
Parameters and settings for the Tricyqle block-tridiagonal solver.
std::span< const real_t > initial_equality_multipliers
std::span< const real_t > initial_inequality_multipliers
std::span< const real_t > initial_variables
cyqlone::TricyqleParams< real_t > tricyqle_params
unique_CyQPALMBackend< VL, DefaultOrder > make_cyqpalm_backend(const CyqloneStorage< real_t > &ocp, CyqloneData data, const CyQPALMBackendSettings &settings)
void update_cyqpalm_backend(CyQPALMBackend< VL, DefaultOrder > &backend, const CyqloneStorage< real_t > &ocp)
Storage for a linear-quadratic OCP with the initial states x₀ eliminated.
Storage for a linear-quadratic OCP of the form.
Definition ocp.hpp:37
unique_CyQPALMBackend(unique_CyQPALMBackend &&) noexcept=default