Robotran C Documentation

Equilibrium

Computation of the system equilibrium using an iterative Newton method.
For more information, see Robotran theoritical framework.

Code sample

For running the equilibrium, insert the following code in your main script and adapt it to your need :

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
/* EQUILIBRIUM *
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
MbsEquil *mbs_equil;
mbs_data->process = 2;
mbs_equil = mbs_new_equil(mbs_data);
// Equil options (see documentations for additional options)
mbs_equil->options->method = 1;
mbs_equil->options->senstol = 1e-2;
mbs_equil->options->verbose = 1;
mbs_run_equil(mbs_equil, mbs_data);
mbs_delete_equil(mbs_equil, mbs_data);

Use

The equilibrium is performed by the function mbs_run_equil().

The user specifies the desired options of the direct dynamics in MbsEquilOptions structure. The results are written to file at the end of computation.

The function calls successively :

MbsEquilOptions::verbose
int verbose
no = 0, yes = 1, extra outputs = 2 [default = 1]
Definition: mbs_equil_struct.h:16
MbsEquilOptions::method
int method
fsolvepk = 1, other method to be added. [default = 1]
Definition: mbs_equil_struct.h:14
MbsEquil::options
MbsEquilOptions * options
structure defining the option of a equilibrium
Definition: mbs_equil_struct.h:70
MbsEquil
Definition: mbs_equil_struct.h:68
mbs_delete_equil
void mbs_delete_equil(MbsEquil *eq, MbsData *s)
Free the Equilibrium structure (pointers table, Equibrium options, ...)
Definition: mbs_equil.c:146
mbs_new_equil
MbsEquil * mbs_new_equil(MbsData *s)
Allocate the memory for the Equilibrium Options (but not for all the Equilibrium structure) Initializ...
Definition: mbs_equil.c:34
MbsData::process
int process
Flag that indicate which module is currently running (1=partitioning, 2=equilibrium,...
Definition: mbs_data.h:297
MbsEquilOptions::senstol
double senstol
tolerance for testing a variable non-sensitivity [default = 1e-6]
Definition: mbs_equil_struct.h:39
mbs_run_equil
int mbs_run_equil(MbsEquil *eq, MbsData *s)
Run the Equilibrium process.
Definition: mbs_equil.c:214