cuiksmoothpath.c File Reference

Detailed Description

dot_inline_dotgraph_33.png

Local optimization of a path. Reduces measure over a path connecting two samples. In general the mesasure is the path length, but in EFFORT where the control effor is minimized. The control effort is only relevant in structures with an associated potential energy (i.e., in tensegrity structures). Otherwise, the control effort is (almost) the same as the path lenght.

See Also
cuikatlas.c

Definition in file cuiksmoothpath.c.

Functions

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

Function Documentation

int main ( int  argc,
char **  arg 
)

Main body of the cuiksmoothpath application.

Use:

  • cuiksmoothpath problem_name path_name mode iterations parallel

where

  • problem_name Name of the file describing the problem.
  • path_name Name of the path to smooth.
  • mode [optional] is the algorithm to use: RANDOM, GRADIENT, SHORTCUT, or EFFORT. The default is SHORTCUT (is faster but might return sub-optimal paths).
  • iterations [optional] is the maximum number of iterations. The default is 2 for RANDOM smoothing and 1000 for GRADIENT smoothing. For the RANDOM method this number is scaled by the number of steps in the path. The GRADIENT method might stop earlier if the gradient becomes 0.
  • parallel [optional] 1 if the smooth has to be exectued in parallel and 0 for serial execution. The default is 0 for RANDOM and SHORTCUT and 1 for GRADIENT.

The problem_name is without any extension.

Parameters
argcNumber of elements in the command line that starts the application (i.e., the cuiksmoothpath 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 81 of file cuiksmoothpath.c.

References CreateFileName(), CS_WD_DELETE, CS_WD_INIT, DeleteFileName(), DeleteParameters(), DeleteSamples(), Error(), FALSE, GetFileFullName(), InitParametersFromFile(), LoadSamples(), PARAM_EXT, randomSet(), SaveSamples(), SMOOTH_DISPERSION, SMOOTH_EFFORT, SMOOTH_GRADIENT, SMOOTH_RANDOM, SMOOTH_SHORTCUT, SmoothSamples(), SOL_EXT, and TRUE.