1 Introduction
Fig.2 Constrained adaptive sampling: starting from the results of flowsheet simulations, additional constraints can be imposed. Training ML models using the information how strong the constraints are violated allows to suggest new sampling points which are expected to fulfil the constraints. Subsequently, these new points xnew are evaluated by solving the system of equations of the flowsheet simulation. |
2 Outline of the algorithm
2.1 Unconstrained adaptive sampling
Algorithm 1 Outline of the unconstrained adaptive sampling algorithm from ref. [14]. |
1. | function EXPLORATION | ||
2. | |||
3. | |||
4. | while do | ||
5. | SUGGESTIONUNCONSTRAINED | ||
6. | SIMULATION | ||
7. | |||
8. | end while | ||
9. | return | ||
10. | end function | ||
11. | |||
12. | function SUGGESTIONUNCONSTRAINED | ||
13 | TRAINCLASSIFIER | ||
14. | TRAINREGRESSOR | ||
15. | function UTILITY | ||
16. | |||
17. | return | ||
18. | end function | ||
19. | return UTILITY | ||
20. | end function |
2.2 Constrained adaptive sampling
Algorithm 2 Outline of our proposed constrained adaptive sampling algorithm. The new function SUGGESTIONCONSTRAINED replaces SUGGESTIONUNCONSTRAINED in Line 5 of Algorithm 1. |
1: | function SUGGESTIONCONSTRAINED | ||
2: | TRAINCLASSIFIER | ||
3: | TRAINREGRESSOR | ||
4: | function UTILITY | ||
5: | | ||
6: | return | ||
7: | end function | ||
8: | return UTILITY | ||
9: | end function |
3 Application to a toy example
3.1 Definition of the toy example
3.2 Two-dimensional adaptive sampling
Fig.4 An illustration of the behavior of the algorithm for the n = 2 toy example. As initial state Dinit, we use 15 randomly generated points in the lower left quadrant. Each column of the above matrix of plots corresponds to one run of the sampling algorithm. The column titles show the chosen weights The different rows show the generated points at different stages, the total number of sampled points (including the 15 initial points) being shown on the very left of the figure. The three different types of points are plotted as red triangles (divergent), blue squares (convergent but infeasible) and green circles (convergent and feasible), respectively. The black dashed lines show the boundaries of the regions. |
Fig.5 The number of divergent (red), convergent feasible (green) and convergent infeasible (blue) points as a function of the total number of sampled points for the n = 2 toy example. For a fixed we perform 50 runs of algorithm 2 with different random initial configurations Dinit consisting of 15 points each. The lines are the averages of the 50 runs and the shaded regions are the 1σ-error bands. The results for and are shown in plots (a), (b) and (c), respectively. |
3.3 Higher-dimensional adaptive sampling
Tab.1 The regions from which the initial configurations Dinit for the tests of the n-dimensional toy example are drawn randomly |
Toy example | n = 2 | n = 3 | n = 5 | n = 10 | n = 20 |
---|---|---|---|---|---|
χinit | [–2,2]2 | [–1.5,1.5]3 | [–0.8,0.8]5 | [–0.6,0.6]10 | [–0.4,0.4]20 |
Fig.6 Mean number of non-divergent (feasible+ infeasible) points with 1σ-error bands for the dimensions n = 2, n = 10 and n = 20 of the toy example. The subsets of the design variable space from which the initial configurations are drawn randomly (see Table 1) are chosen in such a way that a comparable number of non-divergent points in is achieved for all dimensions n (The curves for n = 3 and n = 5 are not shown for the sake of clarity. They run between those for n = 2 and n = 10, as expected). |
Fig.7 Mean number of feasible points with 1σ-error bands for the dimensions n = 2, n = 10 and n = 20 of the toy example. The subsets of the design variable space from which the initial configurations are drawn randomly (see Table 1) are chosen in such a way that a comparable number of non-divergent points in is achieved for all dimensions n (The curves for n = 3 and n = 5 run between those for n = 2 and n = 10 and are not shown for the sake of clarity). |
Fig.8 Mean number of feasible points for the analysis with nonzero constraint weight with 1σ-error bands for the dimensions n = 2, n = 10 and n = 20 of the toy example. The subsets of the design variable space from which the initial configurations are drawn randomly (see Table 1) are chosen in such a way that a comparable number of non-divergent points in is achieved for all dimensions n. The curves for n = 3 and n = 5 are very similar to the one for n = 2 and are therefore not shown for the sake of clarity. |
4 Application to a pressure swing distillation
4.1 The pressure swing distillation
Fig.9 Simplified flowsheet for the pressure swing distillation of a mixture of chloroform and acetone. A mixture containing 86 mass percent chloroform and 14 mass percent acetone is fed into the column C1 operating at 1 bar. Since the feed contains more chloroform than the azeotropic point at 1 bar, chloroform will enrich in the top (distillate) stream. The bottom liquid (sump) stream of C1 is fed into column C2 operating at 10 bar. The distillate stream of C2 is rich in acetone. The bottom liquid stream of C2 is recycled by combining it with the input mixture stream. |
4.2 Simulation of the pressure swing distillation
4.3 Adaptive sampling of the flowsheet simulation
Fig.10 An illustration of the behavior of the algorithm for the chloroform/acetone pressure swing distillation. As initial state Dinit we use 10 randomly generated points in the four-dimensional design space χ. The plots themselves show projections into the -plane. Each column of the above matrix of plots corresponds to one run of the sampling algorithm. The column title shows the chosen weights . The different rows show the generated points at different stages, the total number of sampled points (including the 10 initial points) being shown on the very left of the figure. The three different types of points are plotted as red triangles (divergent), blue squares (convergent but infeasible) and green circles (convergent and feasible), respectively. |
Fig.11 The number of divergent (red), convergent feasible (green) and convergent infeasible (blue) points as a function of the total number of sampled points for the pressure swing distillation example. For a fixed 50 runs of algorithm 2 with different random initial configurations Dinit consisting of 10 points each. The lines are the averages of the 50 runs and the shaded regions represent the 1σ-error bands. The results for and are shown in plots (a), (b) and (c), respectively. |
Fig.12 Comparison of the results of algorithm 2 (lines with 1σ-error bands) to mere random sampling (lines without error bands; for the sake of clarity, the error bars for the random sampling results are not shown) for the pressure swing distillation example. For a fixed we perform 50 runs with different random initial configurations Dinit consisting of 10 points each. The results for and are shown in plots (a), (b) and (c), respectively. |