Skip to content

← optimization package

BoxConstraint

A constraint projection forcing the given solution to lie inside an n-dimensional box.

The box is defined by a lower and upper limit of same dimensionality as the data itself, or alternatively two scalars. This corresponds to coordinatewise clipping to the box limits and will not maintain the same orientation of the solution vector, unlike the l-infinity norm constraint. Like all constraint nodes, this is normally used as part of an optimization problem formulation given to a (typically convex) solver node. Version 1.0.0

Ports/Properties

data

Data to process.

  • verbose name: Data
  • default value: None
  • port type: DataPort
  • value type: object (can be None)
  • data direction: INOUT

lower

Lower bound for solution.

  • verbose name: Lower
  • default value: None
  • port type: DataPort
  • value type: AnyNumeric (can be None)
  • data direction: IN

upper

Upper bound for solution.

  • verbose name: Upper
  • default value: None
  • port type: DataPort
  • value type: AnyNumeric (can be None)
  • data direction: IN

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

  • verbose name: Set Breakpoint (Debug Only)
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

  • verbose name: Metadata
  • default value: {}
  • port type: DictPort
  • value type: dict (can be None)