Published: 31 August 2016

# Building and optimizing a model of low level for two-phase filtration

K. A. Sidelnikov1
A. M. Gubanov2
V. A. Tenenev3
M. A. Sharonov4
1JSC “Izhevsk Petroleum Research Center”, Izhevsk, Russia
2Institute of Oil and Gas, Udmurt State University, Izhevsk, Russia
3, 4Kalashnikov Izhevsk State Technical University, Izhevsk, Russia
Corresponding Author:
K. A. Sidelnikov
Views 9

#### Abstract

The paper proposes a method for constructing models of low level for two-phase flow based on a combination of finite-difference solutions and detailed spatial approximation, providing the possibility of approximating the models for solving optimal control the operating parameters of the oil reservoir.

## 1. Introduction

The choice of numerical methods for solving optimization problems determined by the type tasks. For a simple class of optimization problems with linear objective function and linear constraints (linear programming) developed methods to find an optimal solution (or set the insolubility of the problem) in a finite number of calculation steps. Introduction conditions discrete variables complicates finding solutions. Arbitrary views of objective functions and constraints limiting the capacity of existing computational optimization methods. The biggest challenge for solving optimization problems is the presence of several extremes. Upon receipt of the decision, without any additional studies of the behavior of the objective function, it is impossible to establish unequivocally, it has converged to some extremes. Therefore, global optimization is yet unsolved problem. The result of the application of classical optimization methods, such as requiring the calculation of derivatives, as well as direct methods is highly dependent on the existing initial allowable approach. In [1, 2] fairly complete and detailed concepts and modern approaches to the implementation of genetic algorithms. The analysis of the existing crossing operators, selection and mutation, and suggested some new ones. The focus is on algorithms for solving unconstrained optimization or with restrictions “corridor” type. Therefore, we will consider further development of genetic algorithm adapted for solving problems with constraints of any kind.

## 2. The model of the system and the optimization strategy

The use of real coding can improve the accuracy of the solutions found and increase the speed of finding the global minimum or maximum. The speed is increased due to the lack of coding and decoding processes of chromosomes in each step of the algorithm. The only transformation that it is advisable to carry out this reduction of variables to a dimensionless form in the range [0, 1]. The literature describes the following types are most common crossing operators [2-5].

BLX-$\alpha$ operator. For crossing two individuals selected:

1
${\mathbf{x}}^{\left(1\right)}=\left({x}_{1}^{\left(1\right)},...,{x}_{i}^{\left(1\right)},...,{x}_{n}^{\left(1\right)}\right),\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}{\mathbf{x}}^{\left(2\right)}=\left({x}_{1}^{\left(2\right)},...,{x}_{i}^{\left(2\right)},...,{x}_{n}^{\left(2\right)}\right).$

The value of the new gene is defined as a linear combination of ${x}_{i}={a}_{BLX}{x}_{i}^{\left(1\right)}+{b}_{BLX}{x}_{i}^{\left(2\right)}$. Coefficients ${a}_{BLX}$, ${b}_{BLX}$ defined by the following relations: ${a}_{BLX}=\left(1+\alpha -u\left(1+2\alpha \right)\right)$, ${b}_{BLX}=\left(u\left(1+2\alpha \right)-\alpha \right)$, where the number of $\alpha \in \left[0,1\right]$; $u\in \left(0,1\right)$ – random number.

B1 operator simulating mating with binary coding:

2
${x}_{i}={a}_{Bin1}{x}_{i}^{\left(1\right)}+{b}_{Bin1}{x}_{i}^{\left(2\right)},{a}_{Bin1}=\frac{\left(1+z\right)}{2},\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}{b}_{Bin1}=\frac{\left(1-z\right)}{2},$
3
$z=\left\{\begin{array}{l}{\left(2u\right)}^{\frac{1}{1+\beta }},u\le 0.5,\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}\beta >1,\\ {\left(2\left(1-u\right)\right)}^{-\frac{1}{1+\beta }},u>0.5.\end{array}\right\$

Crossover operator B2.

Just as in a binary coding, transform the real number ${r}_{i}$ on the interval $\left[{A}_{i},{B}_{i}\right]$ an integer ${g}_{i}=\left({2}^{L}-1\right)\left({r}_{i}-{A}_{i}\right)/{B}_{i}-{A}_{i}$. In the case of a binary cross-breeding with the binary representation of the number ${g}_{i}$ randomly determined by the position of the section of the chromosome $k$ for crossing. This is followed by the exchange of selected parts of the chromosomes. If there are two numbers ${g}^{\left(1\right)}=\sum _{j=0}^{L}{l}_{j}^{\left(1\right)}{2}^{j}$, ${g}^{\left(2\right)}=\sum _{j=0}^{L}{l}_{j}^{\left(2\right)}{2}^{j}$, the result of interbreeding $\delta \in \left(1{0}^{-4},1{0}^{-3}\right)$.

The result of the simulation of the operation in the real version is the expression:

4
${x}_{i}={a}_{Bin2}{x}_{i}^{\left(1\right)}+{b}_{Bin2}{x}_{i}^{\left(2\right)}.$

Coefficients ${a}_{Bin2}$, ${b}_{Bin2}$ are defined as follows:

5
${b}_{Bin2}=\frac{{2}^{\xi }}{{2}^{L}}={2}^{\xi -L}={2}^{-1}{\left({2}^{-u}\right)}^{L-1},\mathrm{}\mathrm{}\mathrm{}\mathrm{}{a}_{Bin2}=1-{b}_{Bin2},$

where $\xi \in \left[0,L\right)$ – a random number corresponding to the position of crossing; ${A}_{i}^{\text{'}}={x}_{i}^{\text{'}}-{\mathrm{\Delta }}_{i}$, ${B}_{i}^{\text{'}}={x}_{i}^{\text{'}}+{\mathrm{\Delta }}_{i}$; ${\mathrm{\Delta }}_{i}=\delta \left({B}_{i}-{A}_{i}\right)$ – random number and $u\in \left[0,1\right]$.

Operators crossing B1, B2, BLX are probabilistic mechanism by random choice of u. The operators Bin1, Bin2 often crossing occurs in the lower ranks of numbers. The operator BLX crossing occurs uniformly in the range of the real numbers. For all operators crossing condition $a+b=1$.

As used random mutation operator mutation in which ${g}_{i}$, subject to change, it takes a random value in the range of its changes $\mathbf{x}=\left({x\mathrm{\text{'}}}_{i}\right)$, $i=\overline{1,N}\left[{A}_{i},{B}_{i}\right]$.

Besides mutation operator applied inversion operator that for real code has the form:

6
$\overline{\mathbf{g}}=\left\{\begin{array}{l}\left({\overline{g}}_{i}={g}_{i-\xi }\right),\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}i=\overline{1,N-\xi ,}\\ \left({\overline{g}}_{i}={g}_{i-n+\xi }\right),\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}i=\overline{N-\xi +1,N},\end{array}\right\,\mathrm{}\mathrm{}\mathrm{}\mathrm{}\xi \in \left(1,N\right).$

The sequence of operations in a real coding algorithm is the same as the standard binary encoding genetic algorithm. The difference lies in the form of genetic operators. Before starting the process at $t=$ 0 is formed by a population consisting of individuals of m. An individual or chromosome is represented as:

7
$G=\left[\mathbf{x}\psi \right]=\left({g}_{i}\right),\mathrm{}\mathrm{}\mathrm{}\mathrm{}i=\overline{1,N},$

where $\mathbf{x}=\left({x}_{i}\right)$, $i=\overline{1,N}$ – vector function arguments; $\psi$ – transformation, the transition from the vector $\mathbf{x}$ (phenotype) to the encoded representation (genotype).

The transformation is carried out by bringing the argument to the dimensionless form:

8
$\psi :\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}{y}_{i}=\frac{{x}_{i}-\underset{i=\overline{1,N}}{\mathrm{m}\mathrm{i}\mathrm{n}{x}_{i}}}{\underset{i=\overline{1,N}}{\mathrm{m}\mathrm{a}\mathrm{x}{x}_{i}}-\underset{i=\overline{1,N}}{\mathrm{m}\mathrm{i}\mathrm{n}{x}_{i}}},\mathrm{}\mathrm{}\mathrm{}\mathrm{}i=\overline{\overline{1,N}}.$

Inverse transformation:

9
${\psi }^{-1}:\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}{x}_{i}=\underset{i=\overline{1,N}}{\mathrm{m}\mathrm{i}\mathrm{n}{x}_{i}}+{y}_{i}\left(\underset{i=\overline{1,N}}{\mathrm{m}\mathrm{a}\mathrm{x}{x}_{i}}-\underset{i=\overline{1,N}}{\mathrm{m}\mathrm{i}\mathrm{n}{x}_{i}}\right),\mathrm{}\mathrm{}\mathrm{}\mathrm{}i=\overline{1,N}.$

Held on the evolution of the population iteration $t=t+1$. The selection of individuals for crossbreeding carried out by the tournament: two randomly selected individuals and individuals with the best quality involved for mating with a given probability of crossing.

One of the ways to improve the work of optimization techniques is the use of hybrid algorithms that combine the properties of gradient and evolutionary algorithms. Usually, they find the initial approximation, localized in extremum, using a genetic algorithm, and then specify the position of the extremum of the gradient method. In that case also accelerates convergence, but the extremum is not necessarily global.

In [1, 6], a hybrid algorithm based on parallel work of genetic operators and any additional gradient or direct method. leader - in population created by the genetic algorithm, the best individual is selected. This leader is trained separately for an additional method. If it is thus a qualitative indication of better than all other individuals in the population, then it is introduced into a population and is involved in the reproduction of progeny. If there is individual in the population resulting from evolution to be the best indicator, it becomes the leader.

As an additional method shows good efficacy conjugate gradient method (the Fletcher-Reeves) (CGM). In the method of Fletcher-Reeves search direction extremum is conjugated. The system of linearly independent directions ${\mathbf{z}}_{i}$, $i=\overline{1,N-1}$ is said to be conjugate with respect to the positive definite matrix $\mathbf{H}$, if ${\mathbf{z}}_{i}^{T}\mathbf{H}{\mathbf{z}}_{j}=0$, $i\ne j$, $i$, $j=\overline{1,K-1}$. It is necessary to construct a sequence of conjugate $k$ directions ${\mathbf{z}}_{i}$, $i=\overline{1,k}$, are linear combinations $\nabla F\left({\mathbf{x}}^{k}\right)$ and previous destinations ${\mathbf{z}}_{i}$, $i=\overline{0,k-1}$. The starting direction is taken ${\mathbf{z}}_{0}=-\nabla F\left({\mathbf{x}}^{0}\right)$. Direction ${\mathbf{z}}_{1}$ selected conjugate ${\mathbf{z}}_{0}$ towards $\mathbf{H}={\nabla }^{2}F\left(\mathbf{x}\right)$, so that ${\mathbf{z}}_{0}^{T}\mathbf{H}{\mathbf{z}}_{1}=0$ and ${\mathbf{z}}_{1}=-\nabla F\left({\mathbf{x}}^{1}\right)+{w}_{1}{\mathbf{z}}_{0}$. Coefficient ${w}_{1}={\nabla }^{T}F\left({\mathbf{x}}^{1}\right)\nabla F\left({\mathbf{x}}^{1}\right)/{\nabla }^{T}F\left({\mathbf{x}}^{0}\right)\nabla F\left({\mathbf{x}}^{0}\right).$ For direction $k$ we have ${w}_{k}={\nabla }^{T}F\left({\mathbf{x}}^{k}\right)\nabla F\left({\mathbf{x}}^{k}\right)/{\nabla }^{T}F\left({\mathbf{x}}^{k-1}\right)\nabla F\left({\mathbf{x}}^{k-1}\right)$. Having built a sequence of search directions we get the following algorithm: 1) $k=$0, at point ${\mathbf{x}}^{0}$ determined ${\mathbf{z}}_{0}=-\nabla F\left({\mathbf{x}}^{0}\right)$; 2) $k=k+1$, determined ${\mathbf{x}}^{k}={\mathbf{x}}^{k-1}-{\delta }^{k-1}\nabla F\left({\mathbf{x}}^{k-1}\right)$, ${\delta }^{k-1}=\underset{\delta >0}{\mathrm{argmin}}f\left({\mathbf{X}}^{k-1}-\delta {\mathbf{z}}_{k-1}\right)$. Compute $F\left({\mathbf{x}}^{k}\right)$, $\nabla F\left({\mathbf{x}}^{k}\right)$ and direction ${\mathbf{z}}_{k}=-\nabla F\left({\mathbf{x}}^{k}\right)+{w}_{k}{\mathbf{z}}_{k-1}$. When $k=N$${\mathbf{x}}^{0}$ replaced to ${\mathbf{x}}^{N}$ and the iterative process is cyclically repeated until the conditions $‖\nabla f\left({\mathbf{x}}^{k}‖<\epsilon$.

Conjugate gradient method has a high rate of convergence to the optimal solution, which is close to the square. In addition, this method does not calculate the matrix and are not stored in memory, it can be used to solve optimization problems of large dimension.

The hybrid algorithm.

1) $k=$0. Formed population consisting of m individuals $\left\{{C}^{s},s=\overline{1,m}{\right\}}^{k}$ for VGA or RGA method. The first issue to take special ${C}^{1}$ with the best result (the minimum value of the function (1)). With the conversion ${\psi }^{-1}$ we obtain a vector ${\mathbf{x}}_{b}^{k}$ and ${\mathbf{x}}^{k}={\mathbf{x}}_{b}^{k}$.

2) $k=k+1$. Using the method of MSG is calculated as follows $\mathbf{x}=\left({x\mathrm{\text{'}}}_{i}\right)$, $i=\overline{1,N}$ vector approach ${\mathbf{x}}^{k}$. Genetic algorithm creates the next population $\left\{{C}^{s},s=\overline{1,m}{\right\}}^{k}$ and it is the best specimen that defines the next vector ${\mathbf{x}}_{b}^{k}$.

3) If $F\left({\mathbf{x}}_{b}^{k}\right), then ${\mathbf{x}}^{k}={\mathbf{x}}_{b}^{k}$.

4) If $F\left({\mathbf{x}}_{b}^{k}\right)\ge F\left({\mathbf{x}}^{k}\right)$, then ${C}^{1}=\left[{\mathbf{x}}^{k},\psi \right]$.$\delta \in \left(1{0}^{-4},1{0}^{-3}\right)$.

5) $\mathbf{x}=\left({x}_{i}^{\text{'}}\right)$, $i=\overline{1,N}$, ${A}_{i}^{\text{'}}={x}_{i}^{\text{'}}-{\mathrm{\Delta }}_{i}$, ${B}_{i}^{\text{'}}={x}_{i}^{\text{'}}+{\mathrm{\Delta }}_{i}$; ${\mathrm{\Delta }}_{i}=\delta \left({B}_{i}-{A}_{i}\right)$. If the stop condition is satisfied, then $\delta \in \left(1{0}^{-4},1{0}^{-3}\right)$ otherwise end on a paragraph 2.

As a further method, it is also advisable to use a genetic algorithm, but in a narrower field of search. The boundaries of the narrow search region are determined as follows. If $\mathbf{x}=\left({x}_{i}^{\text{'}}\right)$, $i=\overline{1,N}$ – the best individual in the population, the additional border search area is: ${A}_{i}^{\mathrm{\text{'}}}={x}_{i}^{\text{'}}-{\mathrm{\Delta }}_{i}$, ${B}_{i}^{\text{'}}={x}_{i}^{\text{'}}+{\mathrm{\Delta }}_{i}$; ${\mathrm{\Delta }}_{i}=\delta \left({B}_{i}-{A}_{i}\right)$. Test results showed that the amount of $\delta \in \left(1{0}^{-4},1{0}^{-3}\right)$.

To solve optimization problems and function restrictions. As a rule, the problem of conditional minimization reduced to the unconstrained minimization problem through the use of penalty functions, and then find a solution using genetic algorithms and gradient methods. When using penalty functions the problem of determining the weighting factors, and the function itself is often the nature of the ravine. Different objective functions and constraints require careful selection of factors that cannot always be done successfully, and there is a need for a new selection when changing the conditions of the original problem.

Suffice universal are two approaches, based on the selection of operations and the formation of new populations. In one approach  used the idea of parallel populations with acceptable and unacceptable specimens. In another  is also involved in illegal crossing of individuals with selections to dominate. We will apply for the numerical solution of the problem with the restrictions basic genetic algorithm, described in  with an additional selection, described in . Genetic algorithm of  applies to crossing BLX operators, B1, B2 and classical operator Holland. These operators are selected at each crossing procedure at random, which expands their opportunities.

When selecting a tournament selection method is applied to the implementation of the following rules: 1. If the two compared individuals permissible, i.e. satisfying the constraints is selected from the best indicator of the objective function. 2. If one individual is permitted, and the second not, permissible selected. 3. If both individuals invalid, then choose the one with the smaller number of outstanding restrictions. 4. If both individuals are unacceptable and have the same number of violated constraints, the chosen one in which a violation of minimal restrictions.

These rules are implemented algorithmically easy and does not require significant processing of a basic genetic algorithm.

## 3. Computational experiments

To test the efficiency of the method, consider some examples that are used for testing optimization techniques. For all the tasks carried out to minimize the objective functions.

Objective 1.

Rosenbrock objective function:

10
$F\left(\mathbf{x}\right)=\sum _{i=1}^{N-1}100{\left({x}_{i+1}-{x}_{i}^{2}\right)}^{2}+{\left(1-{x}_{i}\right)}^{2},\mathrm{}\mathrm{}\mathrm{}\mathrm{}{x}_{i}\in \left[-5,5\right],\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}i=\overline{1,N.}$

The global minimum without restrictions: ${x}_{i}^{opt}=1$, $i=\overline{1,N}$; $F\left({\mathbf{x}}^{opt}\right)=0.$

As-equality constraints used by the system of equations that define the circle of radius $R$ for each pair of adjacent variables:

${x}_{i}^{2}+{x}_{i+1}^{2}={R}^{2},\mathrm{}\mathrm{}\mathrm{}\mathrm{}i=\overline{1,N-1}.$

As constraints-inequalities favor a system of inequalities that define the multi-dimensional ring with an inner radius and an outer:

11
${R}_{1}^{2}\le {x}_{i}^{2}+{x}_{i+1}^{2}\le {R}_{2}^{2},\mathrm{}\mathrm{}\mathrm{}\mathrm{}i=\overline{1,N-1}.$

For $n=\text{100}$ if is inside the ring, then the best solution is for the 400 iterations. When ${R}_{1}=\text{2}$, ${R}_{2}=\text{4}$ a decision ${x}_{i}\in$ [1.4141-1.4143], $F=\mathrm{}$3414.227 is reached for 2000 iterations. When the equality constraints, defined in the form ${R}_{1}=$ 1.999, ${R}_{2}=$ 2.001, the same solution was obtained at a significantly greater number of iterations 32000.

Objective 2.

12
$F\left(\mathbf{x}\right)={\sum }_{i=1}^{N}10\left(1-\mathrm{c}\mathrm{o}\mathrm{s}\left(2\pi {x}_{i}\right)\right)+{x}_{i}^{2},\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}{x}_{i}\in \left[-5,5\right],\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}i=\overline{1,N}.$

The global minimum without restrictions: ${x}_{i}^{opt}=0$, $i=\overline{1,N}$; $F\left({\mathbf{x}}^{opt}\right)=0$.

Restrictions are the same as in the problem 1.

${\mathbf{x}}^{opt}$ a large number of extrema of this function can be seen even on the chart for two variables.

When ${R}_{1}=$ 0, ${R}_{2}=\text{1}$, decision achieved by 250 iterations.

When ${R}_{1}=$ 0.9999, ${R}_{2}=\mathrm{}$1.0001 received the decision: even numbers of variables ${x}_{i}=$ –0.9999, odd ${x}_{i}=\text{0}$, $F=$ 49.9901 when the number of iterations 2300.

Objective 3 (Welded beam design) .

Mathematical record of work tasks .

${f}_{w}\left(\stackrel{\to }{x}\right)=1.10471{h}^{2}l+0.04811tb\left(14.0+l\right);$
${g}_{1}\left(\stackrel{\to }{x}\right)\equiv 13.600-\tau \left(\stackrel{\to }{x}\right)\ge 0,\mathrm{}\mathrm{}\mathrm{}{g}_{2}\mathrm{}\left(\stackrel{\to }{x}\right)\equiv 30.000-\sigma \left(\stackrel{\to }{x}\right)\ge 0,\mathrm{}\mathrm{}\mathrm{}$
${g}_{3}\left(\stackrel{\to }{x}\right)\equiv b-h\ge 0,\mathrm{}\mathrm{}\mathrm{}\mathrm{}{g}_{4}\left(\stackrel{\to }{x}\right)\equiv {P}_{c}\left(\stackrel{\to }{x}\right)-6.000\ge 0,$
${g}_{5}\left(\stackrel{\to }{x}\right)\equiv 0.25-\delta \left(\stackrel{\to }{x}\right)\ge 0,\mathrm{}\mathrm{}\mathrm{}\mathrm{}0.125\le h\le 10,\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}0.1\le l,t,b\le 10,$
$\tau \left(\stackrel{\to }{x}\right)=\sqrt{\left(\tau \mathrm{\text{'}}\left(\stackrel{\to }{x}\right){\right)}^{2}+\left(\tau \mathrm{\text{'}}\mathrm{\text{'}}\left(\stackrel{\to }{x}\right){\right)}^{2}+l\tau \mathrm{\text{'}}\left(\stackrel{\to }{x}\right)\tau \mathrm{\text{'}}\mathrm{\text{'}}\left(\stackrel{\to }{x}\right)/\sqrt{0.25\left({l}^{2}+\left(h+t{\right)}^{2}\right)}},$
$\sigma \left(\stackrel{\to }{x}\right)=504000/\left({t}^{2}b\right),\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}{P}_{c}\left(\stackrel{\to }{x}\right)=64746.022\left(1-0.0282346t\right)t{b}^{3},$
$\delta \left(\stackrel{\to }{x}\right)=\frac{2.1952}{{t}^{3}b},\mathrm{}\mathrm{}\mathrm{}\mathrm{}{\tau }^{\mathrm{\text{'}}}\left(\stackrel{\to }{x}\right)=\frac{6000}{\sqrt{2}hl},\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}\tau \mathrm{\text{'}}\mathrm{\text{'}}\left(\stackrel{\to }{x}\right)=\frac{6000\left(14+0.5l\right)\sqrt{0.25\left({l}^{2}+\left(h+t{\right)}^{2}\right)}}{2\left\{0.707hl\left({l}^{2}/12+0.25\left(h+t{\right)}^{2}\right)\right\}}.$

The optimal solution, known in the literature: $h=\mathrm{}$0.2444; $l=\mathrm{}$6.2187; $t=\mathrm{}$8.2915; $b=\mathrm{}$0.2444; $F=\mathrm{}$2.3816.

We received: $h=\mathrm{}$0.244369; $l=$ 6.2186069; $t=$ 8.2914718; $b=$ 0.244369; $F=$ 2.3811304 for 1200 iterations.

Objective 4  (38 restrictions).

${f}_{2}\left(\stackrel{\to }{x}\right)=-0.1365-5.843\left(1{0}^{-7}\right){y}_{17}+1.17\left(1{0}^{-4}\right){y}_{14}+2.358\left(1{0}^{-5}\right){y}_{13}$
$\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}+1.502\left(1{0}^{-6}\right){y}_{16}+0.0321{y}_{12}+0.004324{y}_{5}+1.0\left(1{0}^{-4}\right){c}_{15}/{c}_{16}+37.48{y}_{2}/{c}_{12},$
${g}_{1}\left(\stackrel{\to }{x}\right)\equiv 1.5{x}_{2}-{x}_{3}\ge 0,\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}{g}_{2}\left(\stackrel{\to }{x}\right)\equiv {y}_{1}\left(\stackrel{\to }{x}\right)-213.1\ge 0,\mathrm{}\mathrm{}\mathrm{}\mathrm{}{g}_{3}\left(\stackrel{\to }{x}\right)\equiv 405.23-{y}_{1}\left(\stackrel{\to }{x}\right)\ge 0,$
${g}_{j+2}\left(\stackrel{\to }{x}\right)\equiv {y}_{j}\left(\stackrel{\to }{x}\right)-{a}_{j}\ge 0,\mathrm{}\mathrm{}\mathrm{}\mathrm{}{g}_{j+18}\left(\stackrel{\to }{x}\right)\equiv {b}_{j}\left(\stackrel{\to }{x}\right)-{y}_{j}\left(\stackrel{\to }{x}\right)\ge 0,\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}j=2,...,17,$
${g}_{36}\left(\stackrel{\to }{x}\right)\equiv {y}_{4}\left(\stackrel{\to }{x}\right)-0.28/0.72{y}_{5}\left(\stackrel{\to }{x}\right)\ge 0,\mathrm{}\mathrm{}\mathrm{}\mathrm{}{g}_{37}\left(\stackrel{\to }{x}\right)\equiv 21-3496.0{y}_{2}\left(\stackrel{\to }{x}\right)/{c}_{12}\left(\stackrel{\to }{x}\right)\ge 0,$
${g}_{38}\left(\stackrel{\to }{x}\right)\equiv 62212.0/{c}_{17}\left(\stackrel{\to }{x}\right)-110.6-{y}_{1}\left(\stackrel{\to }{x}\right)\ge 0,$
$704.4148\le {x}_{1}\le 906.3855,\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}68.6\le {x}_{2}\le 288.88,\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}0\le {x}_{3}\le 134.75,\mathrm{}\mathrm{}$
$193\le {x}_{4}\le 287.0966,\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}25\le {x}_{5}\le 84.1988,$
${y}_{1}\left(\stackrel{\to }{x}\right)={x}_{1}+{x}_{2}+41.6,\mathrm{}\mathrm{}\mathrm{}\mathrm{}{c}_{1}\left(\stackrel{\to }{x}\right)=0.024{x}_{4}-4.62,\mathrm{}\mathrm{}\mathrm{}\mathrm{}{y}_{2}\left(\stackrel{\to }{x}\right)=12.5/{c}_{1}\left(\stackrel{\to }{x}\right)+12.0,$
${c}_{2}\left(\stackrel{\to }{x}\right)=0.0003535{x}_{1}{x}_{1}+0.5311{x}_{1}+0.08705{y}_{2}\left(\stackrel{\to }{x}\right){x}_{1},$
${c}_{3}\left(\stackrel{\to }{x}\right)=0.052{x}_{1}+78.0+0.002377{y}_{2}\left(\stackrel{\to }{x}\right){x}_{1},$
${y}_{3}\left(\stackrel{\to }{x}\right)={c}_{2}\left(\stackrel{\to }{x}\right)/{c}_{3}\left(\stackrel{\to }{x}\right),{y}_{4}\left(\stackrel{\to }{x}\right)=19.0{y}_{3}\left(\stackrel{\to }{x}\right),$
${c}_{4}\left(\stackrel{\to }{x}\right)=0.04782\left({x}_{1}-{y}_{3}\left(\stackrel{\to }{x}\right)\right)+0.1956\left({x}_{1}-{y}_{3}\left(\stackrel{\to }{x}\right){\right)}^{2}/{x}_{2}+0.6376{y}_{4}\left(\stackrel{\to }{x}\right)+1.594{y}_{3}\left(\stackrel{\to }{x}\right),$
${c}_{5}\left(\stackrel{\to }{x}\right)=100.0{x}_{2},{c}_{6}\left(\stackrel{\to }{x}\right)={x}_{1}-{y}_{3}\left(\stackrel{\to }{x}\right)-{y}_{4}\left(\stackrel{\to }{x}\right),\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}{c}_{7}\left(\stackrel{\to }{x}\right)=0.95-{c}_{4}\left(\stackrel{\to }{x}\right)/{c}_{5}\left(\stackrel{\to }{x}\right),$
${y}_{5}\left(\stackrel{\to }{x}\right)={c}_{6}\left(\stackrel{\to }{x}\right){c}_{7}\left(\stackrel{\to }{x}\right),\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}{y}_{6}\left(\stackrel{\to }{x}\right)={x}_{1}-{y}_{5}\left(\stackrel{\to }{x}\right)-{y}_{4}\left(\stackrel{\to }{x}\right)-{y}_{3}\left(\stackrel{\to }{x}\right),$
${c}_{8}\left(\stackrel{\to }{x}\right)=0.995\left({y}_{4}\left(\stackrel{\to }{x}\right)+{y}_{5}\left(\stackrel{\to }{x}\right)\right),\mathrm{}\mathrm{}\mathrm{}\mathrm{}{y}_{7}\left(\stackrel{\to }{x}\right)={c}_{8}\left(\stackrel{\to }{x}\right)/{y}_{1}\left(\stackrel{\to }{x}\right),$
${y}_{8}\left(\stackrel{\to }{x}\right)={c}_{8}\left(\stackrel{\to }{x}\right)/3798.0,\mathrm{}\mathrm{}\mathrm{}\mathrm{}{c}_{9}\left(\stackrel{\to }{x}\right)={y}_{7}\left(\stackrel{\to }{x}\right)-0.0663{y}_{7}\left(\stackrel{\to }{x}\right)/{y}_{8}\left(\stackrel{\to }{x}\right)-0.3153,$
${y}_{9}\left(\stackrel{\to }{x}\right)=98.82/{c}_{9}\left(\stackrel{\to }{x}\right)+0.321{y}_{1}\left(\stackrel{\to }{x}\right),$
${y}_{10}\left(\stackrel{\to }{x}\right)=1.29{y}_{5}\left(\stackrel{\to }{x}\right)+1.258{y}_{4}\left(\stackrel{\to }{x}\right)+2.29{y}_{3}\left(\stackrel{\to }{x}\right)+1.71{y}_{6}\left(\stackrel{\to }{x}\right),$
${y}_{11}\left(\stackrel{\to }{x}\right)=1.71{x}_{1}-0.452{y}_{4}\left(\stackrel{\to }{x}\right)+0.58{y}_{3}\left(\stackrel{\to }{x}\right),\mathrm{}\mathrm{}\mathrm{}\mathrm{}{c}_{10}\left(\stackrel{\to }{x}\right)=12.3/752.3,$
${c}_{11}\left(\stackrel{\to }{x}\right)=1.75{y}_{2}\left(\stackrel{\to }{x}\right)0.995{x}_{1},\mathrm{}\mathrm{}\mathrm{}\mathrm{}{c}_{12}\left(\stackrel{\to }{x}\right)=0.995{y}_{10}\left(\stackrel{\to }{x}\right)+1998.0,$
${y}_{12}\left(\stackrel{\to }{x}\right)={c}_{10}\left(\stackrel{\to }{x}\right){x}_{1}+{c}_{11}\left(\stackrel{\to }{x}\right)/{c}_{12}\left(\stackrel{\to }{x}\right),\mathrm{}\mathrm{}\mathrm{}\mathrm{}{y}_{13}\left(\stackrel{\to }{x}\right)={c}_{12}\left(\stackrel{\to }{x}\right)-1.75{y}_{2}\left(\stackrel{\to }{x}\right),$
${y}_{14}\left(\stackrel{\to }{x}\right)=3623.0+64.4{x}_{2}+58.4{x}_{3}+146312.0/\left({y}_{9}\left(\stackrel{\to }{x}\right)+{x}_{5}\right),$
${c}_{13}\left(\stackrel{\to }{x}\right)=0.995{y}_{10}\left(\stackrel{\to }{x}\right)+60.8{x}_{2}+48.0{x}_{4}-0.1121{y}_{14}\left(\stackrel{\to }{x}\right)-5095.0,$
${y}_{15}\left(\stackrel{\to }{x}\right)={y}_{13}\left(\stackrel{\to }{x}\right)/{c}_{13}\left(\stackrel{\to }{x}\right),$
${y}_{16}\left(\stackrel{\to }{x}\right)=148000.0-331000.0{y}_{15}\left(\stackrel{\to }{x}\right)+40{y}_{13}\left(\stackrel{\to }{x}\right)-61.0{y}_{15}\left(\stackrel{\to }{x}\right){y}_{13}\left(\stackrel{\to }{x}\right),$
${c}_{14}\left(\stackrel{\to }{x}\right)=2324.0{y}_{10}\left(\stackrel{\to }{x}\right)-28740000.0{y}_{2}\left(\stackrel{\to }{x}\right),\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}{c}_{15}\left(\stackrel{\to }{x}\right)={y}_{13}\left(\stackrel{\to }{x}\right)/{y}_{15}\left(\stackrel{\to }{x}\right)-{y}_{13}\left(\stackrel{\to }{x}\right)/0.52,$
${y}_{17}\left(\stackrel{\to }{x}\right)=14130000.0-1328.0{y}_{10}\left(\stackrel{\to }{x}\right)-531.0{y}_{11}\left(\stackrel{\to }{x}\right)+{c}_{14}\left(\stackrel{\to }{x}\right)/{c}_{12}\left(\stackrel{\to }{x}\right),$
${c}_{16}\left(\stackrel{\to }{x}\right)=1.104-0.72{y}_{15}\left(\stackrel{\to }{x}\right),\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}{c}_{17}\left(\stackrel{\to }{x}\right)={y}_{9}\left(\stackrel{\to }{x}\right)+{x}_{5},$
$a\left[i\right]=\left\{0.0,\mathrm{}17.505,\mathrm{}11.275,\mathrm{}214.228,\mathrm{}7.458,\mathrm{}0.961,\mathrm{}1.612,\mathrm{}0.146,\mathrm{}107.99,\mathrm{}922.693,$
$\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}926.832,\mathrm{}18.766,\mathrm{}1072.163,\mathrm{}8961.448,\mathrm{}0.063,\mathrm{}71084.33,\mathrm{}2802713.0\right\};$
$b\left[i\right]=\left\{0.0,\mathrm{}1053.6667,\mathrm{}35.03,\mathrm{}665.585,\mathrm{}584.463,\mathrm{}265.916,\mathrm{}7.046,\mathrm{}0.222,\mathrm{}273.366,$
$\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}\mathrm{}1286.105,\mathrm{}1444.046,\mathrm{}537.141,\mathrm{}3247.039,\mathrm{}26844.086,\mathrm{}0.386,\mathrm{}140000.0,\mathrm{}12146108.0\right\},$
${\stackrel{\to }{x}}^{\mathrm{*}}=\left(705.1803,\mathrm{}68.60005,\mathrm{}102.90001,\mathrm{}282.324999,\mathrm{}37.5850413\right),$
${f}^{\mathrm{*}}=-1.90513.$

${\mathbf{x}}^{opt}=\left(705.17454;68.6;102.9;282.3249;37.5841\right)$, $F=\mathrm{}$–1.905155. Active restrictions: 1, 2, 34, 37, 38. Fig. 2 shows the proportion of the population of feasible solutions in volume 1000.

Fig. 1Rastrigin function, n=2 Fig. 2The proportion of feasible solutions ## 4. Conclusions

The results of solving test problems show that the proposed algorithm can handle all the tasks discussed in [8, 9] for arbitrary restrictions and objective functions. This algorithm is applied to solve further problems for the optimal operation of oil wells.
{"ft_lang_label":"__label__en","ft_lang_prob":0.8779513,"math_prob":0.9999887,"size":13078,"snap":"2023-40-2023-50","text_gpt3_token_len":2737,"char_repetition_ratio":0.14662689,"word_repetition_ratio":0.006839277,"special_character_ratio":0.21784677,"punctuation_ratio":0.16458853,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.999908,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,1,null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-12-07T17:08:13Z\",\"WARC-Record-ID\":\"<urn:uuid:2054a9f3-ab39-4192-9dde-97fac6464ddc>\",\"Content-Length\":\"185265\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:24f54577-1d3d-42ae-a123-126c0843139b>\",\"WARC-Concurrent-To\":\"<urn:uuid:00d39a93-9918-425e-90f0-f6409bc4ec27>\",\"WARC-IP-Address\":\"20.50.64.3\",\"WARC-Target-URI\":\"https://www.extrica.com/article/17531\",\"WARC-Payload-Digest\":\"sha1:FRWM22BEZG4O7XCVF22P5W6DJQPX3POT\",\"WARC-Block-Digest\":\"sha1:ZQHE4PWYIZUQ5L5726NWBZDCU7RT4I6J\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-50/CC-MAIN-2023-50_segments_1700679100677.45_warc_CC-MAIN-20231207153748-20231207183748-00147.warc.gz\"}"}