Tequation Struct Reference

## Detailed Description

An equation with linear, quadratic or bilinear terms.

NOTE: An equation can be seen as a polynomial (in)equated to a constant value and, thus, as a polynomial with an offset (equal to the opposite of the righ-hand value of the equation). Therefore in many places in the CuikSuite equations are used as polynomials, ignoring the associated (in)equality. This can be a bit confusing but implementing a separate type for the polynomials will let the equation type almost empty.

We can have different types of equations according to their role in the problem:

• SYSTEM_EQ An equation obtained from the kinematic constraints.
• COORD_EQ Equations defined to obtain cartesian variables (i.e., variables for corners of the mechanism links and bodies) from system ones (i.e., variables defining the valid mechanism poses).
• DUMMY_EQ Parabolas and saddle equations obtained from the linealization of non-linear equations.
• DERIVED_EQ Equation obtained via the function DeriveEquation
equation.h equation.c

Definition at line 236 of file equation.h.

## Data Fields

unsigned int type

boolean polynomial

unsigned int cmp

unsigned int order

double value

unsigned int maxMonomials

unsigned int nMonomials

Tmonomial ** monomials

Tvariable_set vars

## Field Documentation

 unsigned int Tequation::type

Type of equation SYSTEM_EQ, COORD_EQ, DUMMY_EQ, DERIVED_EQ.

Definition at line 237 of file equation.h.

 boolean Tequation::polynomial

TRUE if the equation is polynomial

Definition at line 239 of file equation.h.

 unsigned int Tequation::cmp

Relational operator in the equation LEQ, GEQ, EQU.

Definition at line 241 of file equation.h.

 unsigned int Tequation::order

Order of the equation (1-lineal, 2-bilineal, 2-quadratic).

Definition at line 242 of file equation.h.

 double Tequation::value
 unsigned int Tequation::maxMonomials

Maximum number of monomials in the equation.

Definition at line 245 of file equation.h.

Referenced by AddScaledMonomial(), CopyEquation(), DeriveEquation(), and InitEquation().

 unsigned int Tequation::nMonomials

Current number of monomials in the equation.

Definition at line 246 of file equation.h.

 Tmonomial** Tequation::monomials

Array with pointers to the monomials of the equation.

Definition at line 247 of file equation.h.

 Tvariable_set Tequation::vars

Variables involved in the equation monomials.

Definition at line 249 of file equation.h.