Robotran C Documentation
mbs_equil_struct.h
Go to the documentation of this file.
1 
2 #ifndef MBS_EQUIL_STRUCT_h
3 #define MBS_EQUIL_STRUCT_h
4 
5 #include "useful_functions.h"
6 
7 #include "mbs_data.h"
8 #include "mbs_aux.h"
9 #include "mbs_buffer.h"
10 #include "mbs_linearipk_struct.h"
11 
12 typedef struct MbsEquilOptions
13 {
14  int method;
15  double equitol;
16  int verbose;
17  int save2file;
19 
20  int grad_lpk;
22  double lpk_relincr;
23  double lpk_absincr;
24  double lpk_absincr_max;
25  double lpk_equitol;
26  double lpk_lintol;
27 
28  char* resfilename;
29  const char* respath;
30  const char* animpath;
31  char* buffer_format;
32 
33  // solvepk related...
34  int mode;
35  int relax;
36  double relaxcoeff;
37  double relaxIterMax;
38  int soft;
39  double senstol;
40  double devjac;
41  int itermax;
42 
43  int visualize;
45 
46  //int nqui; //!< number of ignored independent variables for quasistatic equilibrium ??Q should disappear
47  //int *qui; //!< index of ignored independant variables
48 
49  int nquch;
50  int *quch;
51  double **xch_ptr;
52 
53  int nxe;
54  double **xe_ptr;
55 
56  int *xe_index;
57 
58 
59  int saveperiod;
60  int save_anim;
61  int framerate;
62  int buffersize;
64  void (* fxe_ptr)(MbsData*, double*);
65 
67 
68 typedef struct MbsEquil
69 {
71  MbsAux* aux;
72 
73  double *qd_saved;
74  double *qdd_saved;
75 
76  int nx;
77  double *x;
78  double **x_ptr;
79 
80  int Nux_saved;
81 
82  int nxch;
83  int *xch;
84 
85  int nxe;
86  int *xe;
87 
88  int nxs;
89  int *xs;
90  int nxns;
91  int *xns;
92 
93  //----- SolvePk related variables -----//
94  double norm_pk;
95 
96  double **grad;
97  double **grad_Rr;
98  double **grad_uxd;
99  double **grad_fxe;
101 
102  double *F;
103  double R;
104  int iter;
106  int bufferNb;
109  double** savedArrays;
110 
111  int success;
112 
113 } MbsEquil;
114 
115 #endif
MbsEquil::x
double * x
variables for the equilibrium
Definition: mbs_equil_struct.h:77
MbsEquilOptions::respath
const char * respath
Path in which result file are saved. [default:resultsR folder].
Definition: mbs_equil_struct.h:29
MbsEquilOptions::grad_lpk
int grad_lpk
options to compute the gradient through the lpk parabolic fitting method. If not activated,...
Definition: mbs_equil_struct.h:20
MbsEquil::nxe
int nxe
number of added variables for the equilibrium
Definition: mbs_equil_struct.h:85
MbsEquilOptions::clearmbsglobal
int clearmbsglobal
Q? inout = 1, out = 2, none = 3, all = 4, default = 1 ???
Definition: mbs_equil_struct.h:44
MbsEquil::xe
int * xe
index of the added variables in the vector of equilibrium variables
Definition: mbs_equil_struct.h:86
useful_functions.h
MbsEquilOptions::lpk_absincr_max
double lpk_absincr_max
options for the lpk gradient [default = 0]
Definition: mbs_equil_struct.h:24
MbsEquilOptions::compute_uxd
int compute_uxd
no = 0, yes = 1, flag to compute the extra constitutive differential equations as equil equations [de...
Definition: mbs_equil_struct.h:18
MbsEquilOptions::visualize
int visualize
Q? no = 0, yes = 1, default = 0.
Definition: mbs_equil_struct.h:43
MbsEquilOptions::buffer_format
char * buffer_format
if NULL, "%e" is used
Definition: mbs_equil_struct.h:31
mbs_data.h
MbsGrowingBuffer
buffer used to store the user variables to output
Definition: mbs_buffer.h:92
MbsEquilOptions::lpk_relincr
double lpk_relincr
options for the lpk gradient [default = 1e-2]
Definition: mbs_equil_struct.h:22
MbsEquil::buffers
MbsBuffer ** buffers
buffer to store generalized coordinates, velocities, acceleration, joint forces...
Definition: mbs_equil_struct.h:107
MbsLpk
Definition: mbs_linearipk_struct.h:19
MbsEquilOptions::lpk_absincr
double lpk_absincr
options for the lpk gradient [default = 1e-3]
Definition: mbs_equil_struct.h:23
MbsEquil::qd_saved
double * qd_saved
initial generalized velocities as defined in the mbsysPad
Definition: mbs_equil_struct.h:73
MbsEquilOptions::verbose
int verbose
no = 0, yes = 1, extra outputs = 2 [default = 1]
Definition: mbs_equil_struct.h:16
MbsEquilOptions::quch
int * quch
index of changed independant variables
Definition: mbs_equil_struct.h:50
mbs_buffer.h
MbsEquilOptions::method
int method
fsolvepk = 1, other method to be added. [default = 1]
Definition: mbs_equil_struct.h:14
MbsEquil::x_ptr
double ** x_ptr
vector of pointers pointing to the equilibrium variables
Definition: mbs_equil_struct.h:78
MbsEquilOptions::resfilename
char * resfilename
The keyword used for determining the name of result files [default:equil].
Definition: mbs_equil_struct.h:28
MbsEquil::F
double * F
Definition: mbs_equil_struct.h:102
MbsEquil::xns
int * xns
index of non sensitive variables in the vector of equilibrium variables
Definition: mbs_equil_struct.h:91
MbsEquil::nxns
int nxns
number of non sensitive variables for the equilibrium
Definition: mbs_equil_struct.h:90
MbsEquilOptions::devjac
double devjac
deviate state for Gradient calculation [default = 1e-6]
Definition: mbs_equil_struct.h:40
MbsEquilOptions::equitol
double equitol
equilibrium acceptation tolerance [default = 1e-6]
Definition: mbs_equil_struct.h:15
MbsEquilOptions::framerate
int framerate
number of frame per second for the .anim file
Definition: mbs_equil_struct.h:61
MbsEquil::options
MbsEquilOptions * options
structure defining the option of a equilibrium
Definition: mbs_equil_struct.h:70
mbs_linearipk_struct.h
MbsEquil::nxs
int nxs
number of sensitive variables for the equilibrium
Definition: mbs_equil_struct.h:88
MbsEquilOptions::animpath
const char * animpath
Path in which animation file are saved. [default:animationR folder].
Definition: mbs_equil_struct.h:30
MbsEquil
Definition: mbs_equil_struct.h:68
MbsEquilOptions::itermax
int itermax
maximum number of iteration for solvepk [default = 30]
Definition: mbs_equil_struct.h:41
MbsEquil::grad
double ** grad
Linear Tangent matrix: delta Fx / delta x (obtained numerically)
Definition: mbs_equil_struct.h:96
MbsEquil::qdd_saved
double * qdd_saved
initial generalized accelerations as defined in the mbsysPad
Definition: mbs_equil_struct.h:74
MbsBuffer
Definition: mbs_buffer.h:46
MbsEquil::Nux_saved
int Nux_saved
copy of mbs_data Nux
Definition: mbs_equil_struct.h:80
MbsEquil::iter
int iter
current iteration in the equilibrium computation
Definition: mbs_equil_struct.h:104
MbsEquil::lpk
MbsLpk * lpk
working structure to compute the linearized matrices (one by one)
Definition: mbs_equil_struct.h:100
MbsEquilOptions::nxe
int nxe
number of extra equilibrium variables
Definition: mbs_equil_struct.h:53
MbsEquilOptions::fxe_ptr
void(* fxe_ptr)(MbsData *, double *)
pointer pointing on the .c function calculating the added equilibrum functions
Definition: mbs_equil_struct.h:64
MbsEquilOptions::relaxcoeff
double relaxcoeff
relaxation coefficient [default = 0.9]
Definition: mbs_equil_struct.h:36
MbsEquil::grad_Rr
double ** grad_Rr
mbs Linear Tangent matrix: delta Rr / delta x (obtained numerically)
Definition: mbs_equil_struct.h:97
MbsEquilOptions::soft
int soft
softing in pk algorithm no = 0, yes = 1 [default = 0]
Definition: mbs_equil_struct.h:38
MbsEquilOptions::save_anim
int save_anim
1 to save the anim file, 0 otherwise (only valid if 'save2file' is set to 1)
Definition: mbs_equil_struct.h:60
MbsEquilOptions::relax
int relax
relaxation in pk algorithm no = 0, yes = 1 [default = 0]
Definition: mbs_equil_struct.h:35
MbsEquil::xch
int * xch
index of the exchange variables in the vector of equilibrium variables
Definition: mbs_equil_struct.h:83
MbsEquil::bufferNb
int bufferNb
Definition: mbs_equil_struct.h:106
MbsEquilOptions::saveperiod
int saveperiod
The number of iteration between two buffer records [default = 1] (every iteration are recorded)
Definition: mbs_equil_struct.h:59
MbsData
Definition: mbs_data.h:149
MbsEquil::success
int success
1 if the equilibrium process were successful (0 if none -1 if failed)
Definition: mbs_equil_struct.h:111
MbsEquilOptions::xe_index
int * xe_index
vector containing the index of the added variables inside the equilibrium variables vector
Definition: mbs_equil_struct.h:56
MbsEquilOptions
Definition: mbs_equil_struct.h:12
MbsEquilOptions::lpk_equitol
double lpk_equitol
options for the lpk gradient [default = 1e-6]
Definition: mbs_equil_struct.h:25
MbsEquil::grad_uxd
double ** grad_uxd
uxd Linear Tangent matrix: delta uxd / delta x (obtained numerically)
Definition: mbs_equil_struct.h:98
MbsEquilOptions::senstol
double senstol
tolerance for testing a variable non-sensitivity [default = 1e-6]
Definition: mbs_equil_struct.h:39
MbsEquilOptions::buffersize
int buffersize
The number of time step that can be recorded in the buffer [default = -1].
Definition: mbs_equil_struct.h:62
MbsEquil::user_buffer
MbsGrowingBuffer * user_buffer
growing buffer to store user values
Definition: mbs_equil_struct.h:108
MbsEquilOptions::lpk_lintol
double lpk_lintol
options for the lpk gradient [default = 1e-3]
Definition: mbs_equil_struct.h:26
MbsEquil::nx
int nx
number of variables for the equilibrium
Definition: mbs_equil_struct.h:76
MbsEquil::aux
MbsAux * aux
Definition: mbs_equil_struct.h:71
MbsEquil::xs
int * xs
index of sensitive variables in the vector of equilibrium variables
Definition: mbs_equil_struct.h:89
MbsEquil::grad_fxe
double ** grad_fxe
fxe Linear Tangent matrix: delta fxe / delta x (obtained numerically)
Definition: mbs_equil_struct.h:99
MbsEquil::savePeriodCounter
int savePeriodCounter
counter for checking whether results must be saved
Definition: mbs_equil_struct.h:105
MbsEquilOptions::xe_ptr
double ** xe_ptr
vector of pointers pointing to the extra variables
Definition: mbs_equil_struct.h:54
MbsEquilOptions::max_save_user
int max_save_user
The maximal number of user variables saved [default = 12].
Definition: mbs_equil_struct.h:63
MbsEquil::norm_pk
double norm_pk
norm of the equlibrium variables vector x (parameter to minimize in the solvepk algorithm)
Definition: mbs_equil_struct.h:94
MbsEquilOptions::save2file
int save2file
1: results saved 0: not saved [default = 1]
Definition: mbs_equil_struct.h:17
MbsEquil::nxch
int nxch
number of exchange variables for the equilibrium
Definition: mbs_equil_struct.h:82
MbsEquilOptions::nquch
int nquch
number of changed independant variables
Definition: mbs_equil_struct.h:49
MbsEquil::savedArrays
double ** savedArrays
pointer to the array that must be saved to buffers
Definition: mbs_equil_struct.h:109
mbs_aux.h
MbsEquil::R
double R
Definition: mbs_equil_struct.h:103
MbsEquilOptions::relaxIterMax
double relaxIterMax
maximum number of relaxation iterations [default = 10]
Definition: mbs_equil_struct.h:37
MbsEquilOptions::mode
int mode
1=static / 2=quasistatic / 3=dynamic [default = 1]
Definition: mbs_equil_struct.h:34
MbsEquilOptions::xch_ptr
double ** xch_ptr
vector of pointers pointing to the exchange variables (the ones that replaces the changed qu)
Definition: mbs_equil_struct.h:51
MbsEquilOptions::lpk_itermax
int lpk_itermax
options for the lpk gradient [default = 10]
Definition: mbs_equil_struct.h:21