- class MinMaxBarrierObjective#
- class Params(x_nominal_lower, x_nominal_upper, error_nominal, dist_zero_to_nominal)#
Fields are the same as
x-value of the point at which the error is equal to error_nominal on the left-hand side of the barrier function.
x-value of the point at which the error is equal to error_nominal on the right-hand side of the barrier function.
The distance from either of the x_nominal points to the region of zero error. Must be less than half the distance between x_nominal_lower and x_nominal_upper, and must be greater than zero.
- class ExtraValues(unwhitened_residual)#
unwhitened_residual (Matrix) –
The value of each element of the vector after applying the barrier function but before applying the cost scaling.
- static residual_at_timestep(vector, params, power=1, cost_scaling=1)#
Returns the residual block for the given timestep, where the residual is computed by applying a barrier function to each element of
vector, and then optionally scaling the corresponding cost in the overall optimization problem by
vector (Matrix) – Each element of the given vector has a barrier function and scaling applied to it.
params (Params) – Parameters defining the barrier function
power (float) – Power of the barrier function. Defaults to 1, producing a linear barrier function in the residual, which corresponds to a quadratic cost in the overall optimization problem.
cost_scaling (float) – Optional scaling parameter. Corresponds to multiplying the cost in the overall optimization problem by a constant.
- Return type: