Optimistic and pessimistic ambiguous chance constraints with applications