cuiksample.c File Reference

Detailed Description

A utility to generate random samples taking as a departing point a cuik file.

See Also
cuiksampleworld.c cuikplan.c

Definition in file cuiksample.c.

Functions

int main (int argc, char **arg)
 Main body of the cuiksample application. More...
 

Function Documentation

int main ( int  argc,
char **  arg 
)

Main body of the cuiksample application.

Use:

  • cuiksample problem_name.cuik num_samples

where

  • problem_name contains the kinematic equations.
  • num_samples Number of samples to generate.

The .cuik extension is optional.

The number of samples to generate as well as the degrees of freedom of the mechanism are taken from the corresponding paremeter file.

If the number of degrees of freedom set in the parameter file is set to 0, we try to determine the rigth value from the equation structure (number of variables minus number of equations). However, this estimated value can be wrong and, therefore, it is better to set it correctly in the parameter file.

Parameters
argcNumber of elements in the command line that starts the application (i.e., the cuiksample command itself and its arguments).
argStrings with the arguments.
Returns
EXIT_SUCCESS (0) if the execution worked out fine and EXIT_FAILURE if not.

Definition at line 48 of file cuiksample.c.

References CreateFileName(), CT_N_DOF, CUIK_EXT, DeleteCuikSystem(), DeleteFileName(), DeleteParameters(), FALSE, GetFileFullName(), GetParameter(), IncrementalSampleCuikSystem(), InitCuikSystemFromFile(), InitParametersFromFile(), NEW, NO_UINT, PARAM_EXT, randomReset(), and TRUE.