MAMBO logo MAMBO & the MAMBO Toolbox MAMBO logo

MotionOutput — Construction of a MAMBO motion description [mathematica]

MotionOutput["ode"->odeset,"states"->statelist,options]

odeset: Mathematica set of differential equations

statelist: sequence of names of MAMBO state variables and their initial values

options: optional arguments for error checking and automatic spooling to output file

The function MotionOutput generates a MAMBO motion description corresponding to the differential equations odeset in the unknown variables given by statelist, where statelist is a Mathematica list of substitution rules with left-hand sides given by the names of MAMBO state variables and right-hand sides given by their initial values. In the absence of a substitution arrow and a right-hand side, the initial value is assumed to equal 0.

The optional arguments passed to MotionOutput allow the user to spool the output directly to a file; to check that the differential equations are not singular in the initial configuration; and to check that the resulting MAMBO motion description contains nothing but numbers, MAMBO parameters, MAMBO animated variables, MAMBO state variables, and MAMBO insignals.
"filename"->String
specifies the name (and path) of the output file in the Mathematica string String.
"checksings"
aborts the generation of a MAMBO motion description if the differential equations are singular in the initital configuration as specified by the initial values of all MAMBO state variables and parameters. An error message is thrown.
checkargs
aborts the generation of a MAMBO motion description if any algebraic symbol in the motion description has not been declared as a MAMBO parameter, a MAMBO state variable, an input signal, or the MAMBO time variable using any of the following optional arguments. An error message is thrown.
"anims"->animlist
where animlist is a Mathematica list of substitution rules with left-hand sides given by the names of MAMBO animated variables used in the corresponding MAMBO geometry description and right-hand sides given by algebraic expressions defining the animated variables.
"parameters"->parlist
where parlist is a Mathematica list of substitution rules with left-hand sides given by the names of MAMBO parameters and right-hand sides given by their values. In the absence of a substitution arrow and a right-hand side, the value is assumed to equal 0.
"insignals"->insiglist
where insiglist is a Mathematica list of substitution rules with left-hand sides given by the names of input signals and right-hand sides given by algebraic expressions defining the input signals.

SetTime[t];
MotionOutput["ode"->{q1'==u1,q2'==alpha*u1*q1}, 
  "states"->{q1->0,q2},"parameters"->{alpha->1}, 
  "anims"->{p2->Cos[q1]},"insignals"->{u1->Cos[t]}, 
  "checksings","checkargs","filename"->"output.dyn"];


Toolbox functions