Chance-constraint method

From optimization
Revision as of 18:06, 7 June 2015 by Jld778 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Author: Cristine Li (ChE 345 Spring 2015)

Steward: Dajun Yue, Fengqi You

The chance-constrained method is one of the major approaches to solving optimization problems under various uncertainties. It is a formulation of an optimization problem that ensures that the probability of meeting a certain constraint is above a certain level. In other words, it restricts the feasible region so that the confidence level of the solution is high. The chance-constrained method is a relatively robust approach, however, it is often difficult to solve.1

Chance constrained optimization is especially important in engineering and finance where uncertainties in price, demand, supply, currency exchange rate, recycle and feed rate, and demographic condition are common. Some classical applications of the chance-constrained method include water reservoir management and financial risk management. More recently, the method has been used in unmanned autonomous vehicle navigation as well as optimal renewable energy generation.2



Charnes and Cooper first introduced chance constrained programming in 1959 as a tool to solve optimization problems under uncertainty. They approached the problem by developing a method that ensured that the decision made by a model led to a certain probability of complying with constraints. Miller and Wagner, in 1965, revaluated the method and looked into how to increase the efficiency of solving chance constrained optimization problems. Many studies in the early 2000s, from Prekopa, Cooper, Deng, Herion, Romish, Nemirovski, Shapiro, etc have looked into more ways of analyzing chance constrained optimization and increasing the efficiencies of such problems. Recently, there has been a focus on using chance constrained optimization to solve process-engineering problems by Li, Garcia, and Wozny. Such problems are especially difficult due to their nonlinearity and dynamic processes.3


In order to deal with uncertainties in optimization, the available stochastic information is integrated into the problem formulation. The general formulation of an optimization problem under uncertainty is

\text{min} & ~~ f(x,\xi)\\
\text{s.t} & ~~ g(x, \xi) = 0 \\
& ~~ h(x,\xi) \ge 0\\

where f is the objective function, g is the equality constraints, and h is the inequality constraints; x is the typical decision vector, and \xi is the vector of uncertainty.

Under the chance constrained method, the inequality constraint is formulated as

P(h(x, \xi) \ge 0) \ge p where p \in [0,1] is the probability level.

In everyday engineering practices, the output variables y (which belongs to x) is typically restricted to

y_{min} \le y(\xi) \le y_{max}

The upper and lower bound can be due to temperature and pressure restrictions and be very important for safety reasons.3 This inequality constraint is then formulated as

P(y_{min} \le y(\xi) \le y_{max}) \ge p.

Single vs Joint Chance Constraint

Since both h(x, \xi) and y(\xi) are vectors, the actual constraints can be expanded out in two ways—individual and joint. A typical constraint is of the form

h_i (x, \xi) \ge 0 (i = 1, ..., m)

Under individual chance constraint, each line of the original constraint can be transformed individually. The above constraint would be expanded out to be

P (h_i (x, \xi) \ge 0) \ge p (i = 1, ..., m)

With this transformation, each line is now its own chance constraint. They can be transformed into linear deterministic inequalities and analytical solutions can be obtained easily.

With joint constraint, the original constraint as a whole, is reformulated as one chance constraint.

P(h_i (x, \xi) \ge 0 (i = 1,..., m)) \ge p

Individual chance constraints are easy to solve, however, they only guarantee that each line satisfies the constraint to a certain confidence level. Joint chance constraint ensures that the constraint as a whole is satisfied to a certain confidence level, however, it is incredibly difficult to solve, even numerically.4

Approach to Solution

In simple cases, where decision and random variables can be decoupled, and the constraint can be relaxed into deterministic constraints using probability density functions, and normal linear programming or nonlinear programming approaches can be used to solve the problem. 5 However, there are many challenges associated with transforming chance constraints into deterministic constraints, mainly associated with structure, convexity, and stability.4

In more complicated cases where decision and random variables can interact in a way such that it’s impossible to decouple them, the problem is currently impossible to solve.


A problem is considered linear if linear transformation of multivariate distributed variables can be used to estimate the distribution of the constraints. The strategy to solving such a problem is to relax the problem into equivalent deterministic problems. In other words, one can calculate the probability by using the probability density function and substitute the left hand side of the constraint with a deterministic expression.

Typically, these probability density functions can be obtained through statistical regression if abundant data is available, or interpolation and extrapolation if few data is available. In cases where uncertain variables have correlations, marginal distribution functions can be used to calculate the probability.

The feasible region of chance-constrained problems depends on the user’s desired confidence level. If a high confidence level is required, as in cases dealing with safety parameters, the feasible region is small. If the confidence level is lowered, the feasible region becomes larger.

In certain cases where one constraint may be more important than another, one can formulate the problem such that the confidence level of one constraint is higher for the more important constraint.3


Like the linear case, the strategy to solving a nonlinear chance constrained problem is to relax the problem by transforming it into a deterministic NLP problem. However, the nonlinear chance constrained problem is particularly difficult to solve because nonlinear propagation makes it hard to obtain the distribution of output variables even when the distributions of the variables with uncertainty are known. Several strategies, including back-mapping, robust optimization, and sample average approximation, are used to approximate the distribution of the output variables.

Dynamics nonlinear chance constrained problems have also been a focus of recent research. Such problems are even more difficult due to issues with stability.3

Structural Challenges

However, there are many complications to this simple approach. First off, simplifying the constraints into deterministic constraints may be very difficult due to difficulties associated with calculating the probabilities. For a nonlinear problem, for instance, the main challenge lies in holding the constraints and their gradients constant while calculating probabilities. Often, there is no closed-form analytical representation of the probabilities. Even numerical integration could be a huge problem in complex cases involving more than 3 dimensions.4

Convexity Challenges

Another challenge associated with transforming probabilistic constraints into deterministic ones has to do with global optimization. If a optimization problem is convex, then the local optimum is also the global optimum, otherwise, methods such as the McCormick Envelope approximation must be used. Consider a general chance constraint, P(h(\xi \le x) \ge p) = F_{\xi} (h(x) \ge p). If F_{\xi}(h(x)) is concave, then the optimization problem is convex.

In order to ensure that F_{\xi}(h(x)) is concave, all h must be linear, F_{\xi}(h(x)) must be increasing and concave. However, F_{\xi}(h(x)) is never concave since 0 and 1 bound probability density functions. Many F_{\xi}(h(x)) are log concave, and it turns out that this property is enough for the overall problem to be considered convex. With convex problems, joint chance constraints can be used to solved with convex algorithms such as the supporting hyperplane method. For this reason and the importance of convexity in finding global optima, log concavity of different distributions must be considered in a chance constraint problem.

A challenging issue comes in when the distribution is uniform or normal with independent components, since these may lack strong log concavity in certain circumstances. Furthermore, it should be noted that the Student’s t-distribution, the Cauchy distribution, the Pareto distribution, and the log-normal distribution are not log concave.4

Stability Challenges

Furthermore, calculating the probabilities require a probability density function. It is assumed that the probability density function is known or can be obtained for chance constraint problems. However, these functions are rarely ever known to be very precise, and are typically approximations. One issue that arises is if slight changes in the distribution could cause major changes to the optimal solution. If the assumed distribution was slightly different than the actual distribution, and the solution is not stable, then optimal solutions are useless and can lead to disastrous results. In order to achieve Hölder- or Lipschitz stability one has to impose further structural conditions, such as strong log-concavity, strict complementarity, and C1,1-differentiability.4


Chance-constrained method applications

The chance-constraint method is used very often in engineering as well as finance due to uncertainties in demand, supply, price, energy availability etc.

Traditionally, chance-constraint method was very useful in power systems management. Uncertainties came in with energy availability. Sustainable energy such as wind and solar energy contained many uncertainties since wind speed differ significantly throughout the year and solar intensity can differ depending on time of the day or location. To ensure that a power plant can meet energy demand at least to a certain confidence level, chance-constraint method was formulated such that P (h (x, \xi) \ge a ) \ge p where h(x, \xi) represents the supply of energy under uncertainty, a represents the demand for energy, and p is the confidence level.2

Chance-constraint method has also often been used to meet safety requirements. For instance, the amount of rain that a certain area receives has huge uncertainties associated with it. Water reservoir have minimum and maximum levels at which no damage is done to the reservoir or the surrounding areas. In these cases, overestimation of uncertainty in combination with a high confidence level is used in the chance-constraint model to ensure that the probability of safety violation due to uncertainty in the amount of rain water received is as low as possible.1

Outside of engineering, the approach has been used for a long time in the financial industry for risk management. For instance, many uncertainties come in when investing. Market conditions are very unpredictable and volatile, so in order maximize the amount of money earned in return, one can utilize the chance constraint method and set the probability that one's investment return a specific value to be at a high confidence level.4

More recently, the approach has been applied to mid term supply chain planning at multiple sites. In other words, the production level at each site was determined by a chance-constraint model under demand uncertainty to avoid inventory depletion and excessive shortage on the consumers' end. This problem focused on the trade off between consumer satisfaction level and the production cost. In order to have high consumer satisfaction, a high confidence level is required for the constraint that supply satisfies consumer demands. However, this high confidence level correspond to high production cost. So the use of chance-constraint modeling allows a company to decide whether cost or consumer satisfaction is more important and then decide on the confidence level they want to meet.6

A state-of-the-art application of this model involves unmanned vehicles. In this problem, uncertainty comes in the form of random obstacles and sensor measurement errors. Probability density functions of these two variables are estimated based on previous data, and formulated into the chance constraints. Based on these constraints, unmanned vehicles can travel through a specific region with the shortest distance while avoiding random obstacles at a high confidence level.2

Another modern application involves fault tolerance and reliability of mechatronic systems. Industrial robots are becoming more and more common in factories. However, uncertainties are inherent in the performance of the robots and in the life-cycle of the robots. Chance constraint modeling can be used to ensure a high performance level of the robots given uncertainties in the qualities of the different parts of the robots as well as in the construction of the robots.2

Overall, the chance-constraint method has many applications currently. Therefore, many have attempted to solve more complicated chance constraint problems involving nonlinear and dynamic random variables.


The following example illustrates how to incorporate uncertainties into problem formulation in the financial industry. It will illustrate the difference between the deterministic and the chance-constraint model.

Consider a pension fund that will be used by a company to issue payments for 15 years financed by buying three types of bonds. An initial fund of K = 250000 is given. The objective of the problem is to maximize the amount of cash the company has, subject to the constraint of meeting the payment requirements each year.

Let's define

\alpha_{ij} = yield per bond of type i in year j

\beta_{j} = payment required in year j

\gamma_i = cost of bond i

x_i = number of bond i bought

Let's further define

a_{ij} = \sum_{k=1}^j \alpha_{ik} - \gamma_i

b_j= \sum_{k=1}^j  \beta_k -K


For the deterministic model, the problem can be formulated as follow

\text{max}  & ~~  \sum_{i=1}^n a_{im} x_i \\
\text{s.t.} & ~~  \sum_{i=1}^n a_{ij}x_i \ge b_j (j = 1,...,m) \\

The following data has been obtained


And a solution using linear programming found x_1 = 31.1, x_2 = 55.5, x_3 = 147.3 and the final amount of cash is $127332

The thick line in the following graph shows year by year cash profile.


Even though the thick line never goes below 0 in the previous graph. It's clear to see that with some uncertainty in the data, the line could easily dive below 0.

Let's assume that \beta_j introduced above are expected values of random payments \beta_{j*}. We will further assume that \beta_{j*} is normally distributed with \sigma = 500. When 100 different payment profiles were simulated based on the normal distribution (represented by the thin gray lines) we can clearly see that it's actually possible for the cash to dive below 0 which shouldn't be allowed based on the constraint of the problem.4

Individual Chance Constraint

To incorporate uncertainty into this question, we will first look at the single chance constraint method. In this case, we will introduce a new variable

\xi_j = \sum_{k=1}^j  \beta_{k*} -K

The problem then becomes

\text{max}  & ~~  \sum_{i=1}^n a_{im} x_i \\
\text{s.t.} & ~~  P(\sum_{i=1}^n a_{ij}x_i \ge \xi_j )\ge p) &~~ (j = 1,...,m) \\

Since we assumed that \xi_j is normally distributed with variance \sigma^2, we can transform the constraint for each j into

\sum_{i=1}^n a_{ij}x_i \ge b_j + \sigma_j q_p

where q_p is the p-quantile of the standard normal distribution.

Selecting p = 0.95, we can solve the above problem as a deterministic linear programming problem, yielding x_1 = 62.8, x_2 = 72.6, x_3 = 101.1 with final cash $103925.

So with uncertainties in the payment term, we should buy more short-term bonds.

Now, using 100 normally distributed payment profiles, we arrive at the following graph. The probability of the cash profile going below $0 is significantly lower than that of the deterministic model introduced above.


Based on the following graph, one can see that there's a trade-off between confidence level of always having a cash profile above $0 and the final cash left in the company at the end of the 15 years.


Since individual chance constraint only makes sure that each line satisfies the constraint to a high confidence level, the entire profile could still dive below 0 at a less than ideal confidence level. This is a problem that could be addressed by joint chance constraint.4

Joint Chance Constraint

With joint chance constraint, the entire matrix of possible \xi_j is considered simultaneously. In other words, the problem is formulated as

\text{max}  & ~~  \sum_{i=1}^n a_{im} x_i \\
\text{s.t.} & ~~  P(\sum_{i=1}^n a_{ij}x_i \ge \xi_j  &~~ (j = 1,...,m) ) \ge p\\

This problem requires calculation of multidimensional distributions. Specific calculations are not included here because it's a very difficult process. In any case, the final answer obtained is x1=65.8,   x2=83.7,   x3=86.2, with a final amount of cash of $98,160.4

Here, we see a further shift towards short term bonds and a lower cash return.

Note: All data and calculations are from Henrion's Introduction to Chance-Constraint Programming. Please consult the website for more information.4


The chance-constraint method is a great way to solve optimization problems due to its robustness. It allows one to set a desired confidence level and take into account trade-off between two or more objectives. However, it can be extremely difficult to solve. Probability density functions are often difficult to formulate, especially for the nonlinear problems. Issues with convexity and stability of these questions mean that small deviations from the actual density function could cause major changes in the optimal solution. Further complications are added when the variables with and without uncertainty can not be decoupled. Due to these complications, there's no single approach to solving chance-constraint problems. Though the most common approach to simple questions is to transform the chance constraints into deterministic functions by decoupling the variables with and without uncertainty and using probability density functions.

This approach has many applications in the engineering field and the finance field. Namely, it is widely used in energy management, risk management, and more recently, determination of production level, performance of industrial robots, and performance of unmanned vehicle. A lot of research in the area focuses on solving nonlinear dynamic questions with chance constraints.


  1. Ackoij, Wim et al. (2011). Chance Constrained Programming and Its Applications to Energy Management. Stochastic Optimization - Seeing the Optimal for the Uncertain. In-Tech.
  2. Geletu, A. (2012). Chance constrained optimization-applications, properties and numerical issues. Retrieved May 24, 2015, from
  3. Li, P., Garcia, H., & Gunter, W. (2008). Chance constrained programming approach to process optimization under uncertainty. Computer Aided Chemical Engineering, 32(1), 1245–1250.
  4. Henrion, R. (2004). Introduction to Chance-Constrained Programming. Retrieved June 7, 2015, from
  5. Henrion, R. (2009). Chance Constrained Problems. Retrieved 7 June 2015, from
  6. Gupta, A., Maranas, C. D., & McDonald, C. M. (2000). Mid-term supply chain planning under demand uncertainty: customer demand satisfaction and inventory management. Computers & Chemical Engineering, 24 (12), 2613–2621.