src.costs.auxi
¶
contained non linear functions (and there derivative) to impose constraints
Module Contents¶
Functions¶
|
blow up before d_min_hard and zero after d_min_soft |
|
gradient of :func: f_non_linear |
|
blow up after c0 and zero before c1 |
|
gradient of :func: f_e |
- src.costs.auxi.f_non_linear(d_min_hard, d_min_soft, d_min_penalization, x)¶
blow up before d_min_hard and zero after d_min_soft
- Parameters
d_min_hard (float) – cost is inf for x smaller than this value
d_min_soft (float) – cost is 0 for x bigger than this value
d_min_penalization (float) – a multiplicative constant in the cost
x (float) – the argument
- Return type
float
- src.costs.auxi.grad_f_non_linear(d_min_hard, d_min_soft, d_min_penalization, x)¶
gradient of :func: f_non_linear
- src.costs.auxi.f_e(c0, c1, x)¶
blow up after c0 and zero before c1
- Parameters
c0 (float) – cost is 0 for x smaller than this value
c1 (float) – cost is inf for x bigger than this value
x (float) – the argument
- Return type
float
- src.costs.auxi.grad_f_e(c0, c1, x)¶
gradient of :func: f_e