residual-methods function

Constraint Residual

Constraint Residual

The residual expression of a constraint, i.e. the amount by which it is violated, and the value of that violation. For instance, if our constraint is g(x)0g(x) \leq 0, the residual is max(g(x),0)max(g(x), 0) applied elementwise. methods

residual(object) violation(object)

Arguments

  • object: A Constraint object.

Returns

A Expression representing the residual, or the value of this expression.

  • Maintainer: Anqi Fu
  • License: Apache License 2.0 | file LICENSE
  • Last published: 2024-11-07