Robotran C Documentation

Coordinate partitioning

Partitionning of the generalized coordinates into independent and dependent variables (for constrained multibody systems only).
For more information, see Robotran theoritical framework.

Note
This module must be run once prior to any other module in case of multibody model containing loop and/or user-constraint.

Code sample

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

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* COORDINATE PARTITIONING *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
MbsPart *mbs_part;
mbs_data->process = 1;
mbs_part = mbs_new_part(mbs_data);
mbs_part->options->rowperm=1;
mbs_part->options->verbose = 1;
mbs_run_part(mbs_part, mbs_data);
mbs_delete_part(mbs_part);

Use

The partitioning is performed by the function mbs_run_part().

The user specifies the desired options of the partitioning in the MbsPartOptions structure. The results are provided in the MbsPart structure, and .

The function calls successively :

Notes

The Partitioning module randomly perturb the system. For the results to be reproducible, the module set the seed of the random generator (MbsPartOptions::set_seed). If your simulation requires a random seed, either:

MbsPart::options
MbsPartOptions * options
Structure containing the options for coordinate partitioning module.
Definition: mbs_part.h:66
mbs_run_part
int mbs_run_part(MbsPart *mbs_part, MbsData *mbs_data)
Main function of the coordinate partitioning module.
Definition: mbs_part.c:532
MbsPart
Main structure for the coordinate partitioning module.
Definition: mbs_part.h:64
MbsPartOptions::verbose
int verbose
Verbosity level of the module, defined in file mbs_define.h.
Definition: mbs_part.h:31
mbs_new_part
MbsPart * mbs_new_part(MbsData *mbs_data)
Allocate a new MbsPart structure for the given MbsData structure.
Definition: mbs_part.c:868
MbsData::process
int process
Flag that indicate which module is currently running (1=partitioning, 2=equilibrium,...
Definition: mbs_data.h:396
mbs_delete_part
void mbs_delete_part(MbsPart *mbs_part)
Free the memory of the given MbsPart structure.
Definition: mbs_part.c:893
MbsPartOptions::rowperm
int rowperm
Flag to allow lines permutations: 0 no permutation (default).
Definition: mbs_part.h:18