# Limits and unity-checks.#

Limits can be defined on single numerical properties of nodes such as tension, force, heel, et. cetera. The resulting unity checks (UCs) can be visualized using color, reported or used in optimizations.

There are two types of limits:

Absolute limit

Range limit

An absolute limit compares the absolute value of the property to the limit. The UC then becomes:

```
UC = |value| / limit
```

A range limit defines a (min, max) for a value. In that case the UC is calculated as the distance of the value from the center of the range. The closer the value is to the edge of the range, the higher the UC.

```
UC = |(value-mid) / 0.5*(max-min)|
where mid = mean(max, min)
```

## Defining limits#

In the GUI the limits can be defined in the “limits” view. The unity checks can be visualized using color by checking the ‘UC’ button in the view panel.

## Scripting#

Every node has a “limits” dictionary. The keys in this dictionary correspond to property names. The corresponding values are float (for an absolute limit) or a 2-sized tuple for a range:

```
node = s['Cable']
node.limits['tension'] = 1000
node.UC # --> returns node.tension / 1000
```