cyqlone develop
Fast, parallel and vectorized solver for linear systems with optimal control structure.
Loading...
Searching...
No Matches
SpringMassParams Struct Reference

#include <cyqlone/qpalm/example-problems/spring-mass.hpp>

Detailed Description

Examples
benchmarks/cyqpalm/spring-mass.cpp.

Definition at line 11 of file spring-mass.hpp.

Public Types

enum  ActuatorPlacement { IndividualActuators , RandomActuators , RandomPairsOfActuators , WangBoydActuators }

Static Public Member Functions

static SpringMassParams wang_boyd_2008 (index_t n_masses, index_t N_horiz=30, uint64_t seed=0)
static SpringMassParams wang_boyd_2008_width (index_t n_masses, index_t N_horiz=30, uint64_t seed=0, double steady_state_spring_length=0.1)
static SpringMassParams domahidi_2012 (index_t n_masses, index_t N_horiz, uint64_t seed=0)
static SpringMassParams active_state_constr (index_t n_masses=18, index_t N_horiz=256, uint64_t seed=0)

Public Attributes

real_t friction = 0
 friction coefficient
real_t k_spring = 1
 spring constant between masses
real_t F_max = 0.5
 maximum actuator force
real_t p_max = 4
 maximum displacement of each mass
real_t p_min = -p_max
 minimum displacement of each mass
real_t p_min_f = p_min
 minimum displacement of each mass for the final stage
real_t p_max_f = p_max
 maximum displacement of each mass for the final stage
real_t v_max = 0
 maximum velocity of each mass (zero = no limit)
real_t v_max_f = v_max
 maximum velocity of each mass for the final stage
real_t width = 1
 width of the setup (distance between the walls)
index_t N_horiz = 32
 number of discretization steps
real_t T_horiz = 15
 time horizon
real_t q_vel = 1
 scaling factor for cost terms for the velocity
real_t q_pos = 1
 scaling factor for cost terms for the position
real_t q_vel_f = q_vel
 scaling factor for terminal cost term for the velocity
real_t q_pos_f = q_pos
 scaling factor for terminal cost term for the position
real_t r_act = 1
 scaling factor for cost terms for the actuators
std::vector< real_t > masses {1, 1, 1, 1, 1, 1}
index_t n_actuators = static_cast<index_t>(masses.size()) - 1
 number of actuators
enum cyqlone::qpalm::problems::SpringMassParams::ActuatorPlacement actuator_placement = IndividualActuators
uint64_t seed = 0
 random seed for actuator placement

Member Enumeration Documentation

◆ ActuatorPlacement

Enumerator
IndividualActuators 
RandomActuators 
RandomPairsOfActuators 
WangBoydActuators 

Definition at line 31 of file spring-mass.hpp.

Member Function Documentation

◆ wang_boyd_2008()

SpringMassParams cyqlone::qpalm::problems::SpringMassParams::wang_boyd_2008 ( index_t n_masses,
index_t N_horiz = 30,
uint64_t seed = 0 )
inlinestatic
Examples
benchmarks/cyqpalm/spring-mass.cpp.

Definition at line 39 of file spring-mass.hpp.

◆ wang_boyd_2008_width()

SpringMassParams cyqlone::qpalm::problems::SpringMassParams::wang_boyd_2008_width ( index_t n_masses,
index_t N_horiz = 30,
uint64_t seed = 0,
double steady_state_spring_length = 0.1 )
inlinestatic
Examples
benchmarks/cyqpalm/spring-mass.cpp.

Definition at line 65 of file spring-mass.hpp.

◆ domahidi_2012()

SpringMassParams cyqlone::qpalm::problems::SpringMassParams::domahidi_2012 ( index_t n_masses,
index_t N_horiz,
uint64_t seed = 0 )
inlinestatic
Examples
benchmarks/cyqpalm/spring-mass.cpp.

Definition at line 73 of file spring-mass.hpp.

◆ active_state_constr()

SpringMassParams cyqlone::qpalm::problems::SpringMassParams::active_state_constr ( index_t n_masses = 18,
index_t N_horiz = 256,
uint64_t seed = 0 )
inlinestatic
Examples
benchmarks/cyqpalm/spring-mass.cpp.

Definition at line 96 of file spring-mass.hpp.

Member Data Documentation

◆ friction

friction coefficient

Definition at line 12 of file spring-mass.hpp.

◆ k_spring

spring constant between masses

Definition at line 13 of file spring-mass.hpp.

◆ F_max

maximum actuator force

Definition at line 14 of file spring-mass.hpp.

◆ p_max

maximum displacement of each mass

Examples
benchmarks/cyqpalm/spring-mass.cpp.

Definition at line 15 of file spring-mass.hpp.

◆ p_min

minimum displacement of each mass

Definition at line 16 of file spring-mass.hpp.

◆ p_min_f

minimum displacement of each mass for the final stage

Definition at line 17 of file spring-mass.hpp.

◆ p_max_f

maximum displacement of each mass for the final stage

Definition at line 18 of file spring-mass.hpp.

◆ v_max

maximum velocity of each mass (zero = no limit)

Definition at line 19 of file spring-mass.hpp.

◆ v_max_f

maximum velocity of each mass for the final stage

Definition at line 20 of file spring-mass.hpp.

◆ width

width of the setup (distance between the walls)

Definition at line 21 of file spring-mass.hpp.

◆ N_horiz

number of discretization steps

Definition at line 22 of file spring-mass.hpp.

◆ T_horiz

time horizon

Definition at line 23 of file spring-mass.hpp.

◆ q_vel

scaling factor for cost terms for the velocity

Definition at line 24 of file spring-mass.hpp.

◆ q_pos

scaling factor for cost terms for the position

Definition at line 25 of file spring-mass.hpp.

◆ q_vel_f

scaling factor for terminal cost term for the velocity

Definition at line 26 of file spring-mass.hpp.

◆ q_pos_f

scaling factor for terminal cost term for the position

Definition at line 27 of file spring-mass.hpp.

◆ r_act

scaling factor for cost terms for the actuators

Definition at line 28 of file spring-mass.hpp.

◆ masses

std::vector<real_t> cyqlone::qpalm::problems::SpringMassParams::masses {1, 1, 1, 1, 1, 1}
Examples
benchmarks/cyqpalm/spring-mass.cpp.

Definition at line 29 of file spring-mass.hpp.

◆ n_actuators

index_t cyqlone::qpalm::problems::SpringMassParams::n_actuators = static_cast<index_t>(masses.size()) - 1

number of actuators

Definition at line 30 of file spring-mass.hpp.

◆ actuator_placement

◆ seed

random seed for actuator placement

Examples
benchmarks/cyqpalm/spring-mass.cpp.

Definition at line 37 of file spring-mass.hpp.


The documentation for this struct was generated from the following file:
  • src/example-problems/include/cyqlone/qpalm/example-problems/spring-mass.hpp