# optimizing a discontinous function

I am trying to maximize the following function (variable: $\theta$, a vector ($\theta_1$,...,$\theta_K$). most likely $K\leq5$

\begin{aligned} F(\theta, c_0, c_1) = &P_{\theta}(T_0 > c_0, \max T_i >c_1, \min T_i <-c_1) \\ &+ \sum_{S \subset \{1,2,.,K\},\\ 1\leq |S|\leq K-1} P_{\theta}(T_0 > c_0, \min_{i\in S} |T_i| >c_1, \max_{i \in \bar{S}} |T_i| \leq c_1) \\ &\mspace{100mu}\mathcal{I}(\max_{i\in S} |\theta_i| \leq \min_{i\in \bar{S}} |\theta_i|) \end{aligned}

where $T_i$ is normally distributed with mean $\theta_i$ and variance 1. $T_0 = \sum_{1<= i<j <=K} (T_i-T_j)^2$

So basically this function is First, a sum of Gaussian integrals which I don't believe has any closed form. Second, discontinuous due to the multiplication of indicator $\mathcal{I}(\max_{i\in S} |\theta_i| \leq \min_{i\in \bar{S}} |\theta_i|)$

My approach now: use quasi-Monte Carlo to numerically calculate the integral. Use simulated annealing to optimize.

Seems quite clumsy. Is there a better way to do this?

• It's currently hard to read your function definition, since brackets aren't matched and the mentioned integration/expectation calculation does not appear in the formula. Could you clean up the formatting? – Geoffrey Irving Mar 4 '14 at 5:28
• Just cleaned up. I forgot to mention that all $\theta_i$ will be non-negative. This function is piece-wise continuous. For example, when K=2, it is continuous on $\theta_1>\theta_2>0$, on $\theta_1=\theta_2$, and on $\theta_2>\theta_1>0$. I could optimize the function on each of the three regions. However, as K increases, this will be very time-consuming. – user3075021 Mar 4 '14 at 19:29