anchored_difference_bounded_variables

static OperationNamespace.anchored_difference_bounded_variables(count, lower_bound, upper_bound, difference_bound, *, name=None)

Creates a sequence of variables with an anchored difference bound.

Use this function to create a sequence of optimization variables that have a difference bound (each variable is constrained to be within a given distance of the adjacent variables) and are anchored to zero at the start and end (the initial and final variables are within a given distance of zero).

Parameters
  • count (int) – The number \(N\) of individual real-valued variables to create.

  • lower_bound (float) – The lower bound \(v_\mathrm{min}\) on the variables. The same lower bound applies to all count individual variables.

  • upper_bound (float) – The upper bound \(v_\mathrm{max}\) on the variables. The same upper bound applies to all count individual variables.

  • difference_bound (float) – The difference bound \(\delta\) to enforce between adjacent variables.

  • name (str, optional) – The name of the node.

Returns

The sequence \(\{v_n\}\) of \(N\) anchored difference-bounded optimization variables, satisfying \(v_\mathrm{min}\leq v_n\leq v_\mathrm{max}\), \(|v_{n-1}-v_n|\leq\delta\) for \(2\leq n\leq N\), \(|v_1|\leq\delta\), and \(|v_N|\leq\delta\).

Return type

Tensor

See also

bounded_optimization_variable()

Create bounded optimization variables.

calculate_optimization()

Find the minimum of generic functions.

unbounded_optimization_variable()

Create unbounded optimization variables.