# Transform from constrained to unconstrained optimization

In a constrained optimization problem, I found in a paper a way to define new variables such that the constraints disappear. They only give the new variable definitions, and I would like to understand how they did.

The context is thermodynamics. A mixture of $c$ components can phase separates into $p$ phases. $z_i$ is the total mole number of component $i$ and $n_{ij}$ is the number of moles of component $i$ in the phase $j$. The free energy $G(\{n_{ij}\}_{ij})$ is known. The problem is to find the composition $\{n_{ij}\}_{ij}$ that minimizes the free energy $G$.

The mass conservation gives the constraints

$\sum_{j} n_{ij} = z_i$

$0 \leq n_{ij} \leq z_i$

From this, the paper defines the new variables $\beta_{ij}$

$n_{i1} = \beta_{i1} z_i ~~~~~~~~~~~~i=1,...,c$

$n_{ij} = \beta_{ij} (z_i - \sum_{m=1}^{j-1} n_{im}) ~~~~~~~~~ i=1,...,c ~~~~~~~~ j=2,...,p-1$

$n_{ip}=z_i - \sum_{m=1}^{p-1}n_{im} ~~~~~~~ i=1,...,c$

with $\beta_{ij} \in [0:1]$ and the problem is know unconstrained

Any help, direction, that will get me to understand how the authors achieve this variable change would be greatly appreciated.

Thank you.

Problem source: Srinivas, Rangaiah, "Differential Evolution with Tabu List for Global Optimization and Its Application to Phase Equilibrium and Parameter Estimation Problems." Ind. Eng. Chem. Res. 2007, 46, 3410-3421

• I don't understand why you think the problem is no unconstrained. $\beta_{ij}\in [0,1]$ implies that there are constraints $0\le \beta_{ij} \le 1$. The problem has only been rescaled, but it is still constrained. Commented Jul 7, 2014 at 9:34
• Ok, strictly speaking it is still constrained. But the space is now merely an hypercube, and any unconstrained minimization procedure will do the job.
– J-D
Commented Jul 7, 2014 at 14:21
• And BTW the paper also recall the problem as unconstrained.
– J-D
Commented Jul 7, 2014 at 14:30
• You can always reformulate any linear constrained problem into a box constrained problem using slack variables. But I'm not quite sure why you think these can be considered as "unconstrained": the methods to solve box-constrained problems most definitely need to be able to take into account the constraints! Commented Jul 8, 2014 at 13:33
• "You can always reformulate any linear constrained problem into a box constrained problem using slack variables". Yes I got it now, thank you. Although the problem is still constrained in a box, it seems easier now, because you know the shape of the space is not too tricky. For example when the constrained space becomes very narrow, the search get more and more difficult, because it has too reduce a lot the step size in order not to leave the space. In a box, the procedure becomes much simpler.
– J-D
Commented Jul 8, 2014 at 15:02

Ok I got it.

Let's take a simple case, with only 3 components and 2 phases.

$n_{ij}$ is the number of moles of components i in phase j.

$z_i$ is the total number of moles of component i.

We must satisfy the mass conservation

$n_{11}+n_{12}+n_{13} = z_1$

$n_{21}+n_{22}+n_{23} = z_2$

$n_{31}+n_{32}+n_{33} = z_3$

Let's fill the phases, component by component. We start with the component 1 in the phase 1. The minimum quantity we can put is obviously 0, and the maximum quantity is the total number of mole of component 1 : $z_1$. Therefore one can define the variable $\beta_{11}$

$n_{11}=\beta_{11} z_1$

And $\beta_{11}$ is free to range between 0 and 1.

Now, we still use the component 1, and we want to fill the phase 2. The minimum quantity 0, and the maximum quantity is the total number of mole of component 1, minus the amount we already put in phase 1 : ($z_1-n_{11}$). So we define $\beta_{12}$

$n_{12}=\beta_{12} (z_1-n_{11})$

and $\beta_{12}$ is also free to range between 0 and 1.

Now we want to fill the 3rd phase with component 1, and there is only one possibility : the remaining quantity of component 1 ($z_1-n_{11}-n_{12}$) and

$n_{13}=z_1-n_{11}-n_{12}$

And so on.....

We then arrive to the general equations.