With multiple ensembles & keep_soft_constraints = False easy to fail LICQ
When there are multiple ensembles it is rather easy to end up in situations when the gradients of the active constraints are linearly dependent. For example, consider a simple storage where V(t1), V(t0) and V'(t1), V'(t0) are variable corresponding to the volume for the first and second ensemble at times t1 and t0. Let Q(t1) be the control variable. Moreover, suppose that at the first priority we have a Volume range goal where the target_min = target_max and that we can actually attain such goal. Then at the next priority, we will have the constraints:
- V(t1) - V(t0) / dt = Q(t1) - Qin
- V'(t1) - V'(t0) / dt = Q(t1) - Qin'
- V(t1) = target
- V'(t1) = target
which are clearly linearly dependent.
A possible way to circumvent this issue is #1100.
Note that this is not an issue if keep_soft_constraints = True or if all the constraints are linear.