A pessimistic bilevel stochastic problem for elastic shape optimization

We consider pessimistic bilevel stochastic programs in which the follower maximizes over a fixed compact convex set a strictly convex quadratic function, whose Hessian depends on the leader’s decision. This results in a random upper level outcome which is evaluated by a convex risk measure. Under assumptions including real analyticity of the lower-level goal function, we prove the existence of optimal solutions. We discuss an alternate model, where the leader hedges against optimal lower-level solutions, and show that solvability can be guaranteed under weaker conditions in both, a deterministic and a stochastic setting. The approach is applied to a mechanical shape optimization problem in which the leader decides on an optimal material distribution to minimize a tracking-type cost functional, whereas the follower chooses forces from an admissible set to maximize a compliance objective. The material distribution is considered to be stochastically perturbed in the actual construction phase. Computational results illustrate the bilevel optimization concept and demonstrate the interplay of follower and leader in shape design and testing.


Introduction
Bilevel programs arise from the interplay of two decision makers on different levels of a hierarchy: The leader decides first and passes the upper-level decision to the follower.Incorporating the leader's decision as a parameter, the follower then returns an optimal solution of the lower-level problem.The leader's outcome depends on both, their decision and the solution that is picked by the follower.While the first formulation of a bilevel problem dates back to a monograph on duopoly market models published in 1934 (cf.[37]), these problems have not received extensive attention until the 1970s (for more details, we refer to [11]).
In this paper, we study a class of pessimistic bilevel stochastic programs, where the lower level problem has a strictly convex quadratic objective function and a fixed feasible set.As an application, we study a mechanical shape optimization problem in which the leader (the designer) minimizes a tracking functional over the set of feasible material distributions, whereas the follower (the test engineer) chooses forces from an admissible set to maximize a compliance objective.The safety of the construction is then evaluated pessimistically with the choice of the worst possible response.Randomness comes into play via manufacturing errors that stochastically perturb the material parameters in the actual construction phase.
In what follows, let us briefly review related work.Bilevel programs are nonconvex, nondifferentiable and NP-hard (non-deterministic polynomial-time-hard) [1].Moreover, conceptual difficulties arise if the lower level problem has more than a single optimal solution.In this setting, one typically considers the so-called optimistic formulation, where cooperation of the follower is assumed, or takes a pessimistic stance and hedges against the worst possible outcome [23].It is well-known that pessimistic bilevel programs have weaker analytical properties than their optimistic counterparts.In general, the existence of optimal solutions to a pessimistic bilevel program can only be assured under restrictive conditions including weak analyticity for the lower level objective function and strong assumptions on the structure of the lower level feasible set (cf. [28,Theorem 4.1]).These difficulties can be overcome by considering a modified setting, where the leader hedges against solutions that are almost optimal for the lower level problem.Sufficient conditions for convergence of the modified optimal values to the original one have been established in [26].A systematic analysis of more inner regularization techniques has been recently provided by Lignola and Morgan in [24,25].
A bilevel stochastic program arises if the problem depends on an additional random parameter, that only the follower can observe before making their decision.In contrast, the leader has to decide nonanticipatorily, but is aware of the underlying probability distribution.In this setting, the upper level objective function can be understood as a random variable, which allows the leader to base their decision on some statistical functional.The expected value is for instance considered in the very first paper on bilevel stochastic optimization [32].In a linear setting, more general models incorporating a variety of convex risk measures have been recently studied in [2].The control of a vibrating string with stochastic data has been investigated in [12] for the case of the excess-probability as a goal function.A level-set based approach for solving risk-averse structural topology optimization problems with random field loading and material uncertainty is given in [29].
Already in 2001, Christiansen et al. [5] studied a stochastic bilevel programming perspective in shape optimization.They assume that the lower level deals with the deformation of the structure for a given shape and given forces subject to different constraints, while on the upper level the shape is decided based on an optimization of weight or a global stiffness measure.Assuming that the lower level is uniquely solvable, the authors provide sufficient conditions for the existence of optimal solutions and discuss algorithmic aspects.Herskovits et al. [21] reformulated an elastic shape optimization problem with constraints as a bilevel optimization problem.They investigate a contact problem with non-penetration constraints on the lower level and stress constraints on the upper level.In [39], Zuo investigated shape optimization of thin shells in car design as an optimistic bilevel optimization problem, where on the lower level the mass distribution along the body frame of the vehicle and on the upper level the shape of shell segments of the hull of the vehicle are optimized.Sinha et al. [36] recently presented a general overview on bilevel optimization also covering optimal design problems.In this context, they considered weight or cost optimization of a structure on the upper level and, on the lower level, the computation of displacements and stresses via minimization of the governing physical variational problem.To the best of our knowledge, pessimistic hierarchical optimization in shape optimization with an objective functional differing from the physical energy of the system on the upper two levels has not been investigated so far.
The approach presented here is based on our previous work in [8,9,10], which grew out of the aspiration to mobilize methodology from mainly economy-driven decision making under (stochastic) uncertainty in order to study PDE-constrained optimization with an emphasis on engineering-related topics such as shape optimization.The risk-neutral models and models with risk aversion in the objective or the constraints were treated with the classical expectation, with risk measures, or by invoking comparisons using stochastic dominance relations.In the spirit of this experience, the present paper is heading for models with the above bilevel features coming to the fore in the presence of uncertainty.
The present work is organized as follows: In Section 2, we introduce a bilevel programming formulation, and in Section 3, the extension to a bilevel problem under stochastic uncertainty, which will be placed in the context of elastic shape optimization later in the paper.Based on this, we analyze both problem formulations and investigate their solvability.The application to a mechanical shape optimization problem via discrete shells is considered in Section 4 as well as its numerical optimization and the results of our numerical analysis.Finally, in Section 5, we draw conclusions and discuss possible future extensions of our work.

Bilevel Problem Formulation
Before formally introducing the bilevel problem, we briefly present the key objects.At the lowest level, y[u, f ] is the elastic displacement of the discrete shell which depends nonlinearly on the material parameters u and linearly on the applied forces f .The lower-level optimal solution set Ψ[u], depending on the material parameter u, is the set of values of f which maximize a quadratic functional in y.In the upper-level of our pessimistic bilevel problem, we finally minimize the worst-case cost J of the lower-level optimization with respect to the material parameters u.
In detail, this pessimistic bilevel problem reads as where U ⊆ (0, ∞) n is a nonempty closed set, and J : U × R N → R denotes the cost functional of the leader, which we assume to be continuous.In our application, this will be a tracking-type objective for a discrete shell with thickness/stiffness parameters u in an admissible set U and applied forces f .Moreover, we let the lower level optimal solution set mapping Ψ : U ⇒ R N be given by with a nonempty, low-dimensional, convex and compact set of admissible forces F ⊂ R N , a function H : R n → R N ×N such that the the restriction H| U is continuous and takes values in the cone of symmetric positive definite matrices S N ++ .Throughout the paper, the notation g : X ⇒ Y is used for a multifunction g that maps the elements of some set X to subsets of some set Y .The displacement y depends on a vector u of thickness/stiffness parameters and the forces f .In fact, the mapping y : for some fixed matrix M ∈ S N ++ , where uniqueness follows from H[u] ∈ S N ++ .In our application, we consider a discrete shell with n triangular facets subject to a force distribution f in a set of admissible forces in R N , with N being three times the number of vertices.For this case, the elastic displacement y[u, f ] is given as the minimizer of the total free energy of a linearized elasticity model with H[u] denoting the Hessian of an originally nonlinear elastic energy and M the mass matrix for the discrete reference shell.
The above hierarchical problem (1)-( 3) can also be understood as a three-level program.However, as H[u] ∈ R N ×N is symmetric and positive definite for any admissible material parameter u ∈ U, the third-level problem in (3) is uniquely solvable.Invoking first-order optimality conditions, we obtain the explicit representation Plugging this solution into the lower level problem yields a bilevel problem.Moreover, (4) leads to a simple expression for the lower level optimal value function ψ : U → R, and to the reformulation of the definition of Ψ in (2) as Lemma 1.The lower level optimal value function ψ defined by (5) is well-defined and continuous.In addition, the multifunction Ψ is closed.
Proof.For fixed u, the argument in ( 5) is quadratic in f , and in particular continuous.Since F is nonempty and compact, the maximum exists.
For any f ∈ F, the argument in ( 5) is a continuous function of u.Moreover, ψ is the pointwise supremum of a familiy of continuous functions and thus lower semicontinuous by [34,Proposition 1.26(a)].
We assume that ψ is not upper semicontinuous, which yields u * ∈ U and a sequence u j → u * such that lim j→∞ ψ[u j ] > ψ[u * ].For any j, we choose f j ∈ F such that ψ[u j ] = f j M H[u j ] −1 M f j .Passing to a subsequence, we can assume that f j converges to some a contradiction.Hence ψ is continuous.
Then the graph of the solution set mapping is the intersection of the closed set U × F and the level set of a continuous function and thus closed.
Proposition 1.The mapping Φ : U → R defined by is well-defined and upper semicontinuous.Moreover, Φ is continuous at any u ∈ U for which Ψ[u] is a singleton.
Proof.For any fixed u ∈ U, by (6) and Lemma 1 the lower-level set solution mapping Ψ[u] is a nonempty, closed subset of the compact set F, and hence compact.Thus, Φ is well-defined by continuity of the upper-level cost functional J on U × R N .Consider any sequence {u k } k∈N ⊆ U that converges to u ∈ U.By the previous considerations, there exists a sequence holds for any k ∈ N. As F is compact, we may assume without loss of generality that {f k } k∈N converges to some f ∈ F. By Lemma 1, we have [u, f ] ∈ gph Ψ and thus Hence, Φ is upper semicontinuous.If Ψ[u] is a singleton, we also have which completes the proof.
Remark 1.To understand the significance of Proposition 1 it is useful to compute these quantities explicitly in a simple low-dimensional example.Assume Maximizing this quantity as in (5) we see that only the two points {±1, 1} of F are relevant, and in particular ψ[u] = 2 + 2|u − 1|.Further, from (2) (or, equivalently, (6)) we obtain the set of extremal forces Choosing for example J[u, f ] = uf 1 one obtains In particular, it is clear that on {u = 1} the set-valued function Ψ is a singleton and Φ is continuous, whereas Ψ [1] contains two elements and Φ is not continuous, and not lower semicontinuous, at u = 1.
As this example shows, Φ arises as the objective function of a pessimistic bilevel program, where the lower level problem may have more than a single optimal solution and can thus not be expected to be lower semicontinuous in general, a fact that was already observed in [11, example on pages [30][31].Note that this may prevent the bilevel program (1) from having an optimal solution even if U is compact.
To overcome the difficulties detailed above, we consider a model where the leader also hedges against η-optimal lower level solutions (cf.[24]).Specifically, we replace Ψ with the mapping Ψ η : for some positive constant η.This results in the modified upper level problem As Ψ[u] ⊆ Ψ η [u] holds for any η > 0 and u ∈ U, the optimal value in (7) yields an upper bound for the optimal value in (1).
Proposition 2. The mapping Φ η : U → R defined by is well-defined and lower semicontinuous for any η > 0. In particular, (7) is solvable whenever U is nonempty and compact.
Proof.First, note that Φ η is well-defined and real-valued as, by continuity of J, for any u ∈ U To prove semicontinuity, we consider a sequence {u k } k∈N ⊆ U converging to some u * ∈ U. We select a sequence Since j was arbitrary, taking the limit j → ∞ we conclude Remark 2. In [26], the alternate model Under the present assumptions it can be shown that However, the function is not lower semicontinuous in general, which is why we rather use formulation (7).

Stochastic Model
A bilevel stochastic program arises if a random vector enters the upper or lower levels as a parameter, with the information constraint that only the follower can observe the realization of the randomness before making their decision.In contrast, the leader has to decide nonanticipatorily, but is aware of the distribution of the randomness, which is independent of the leader's decision.
In the following, we shall study a setting where the leader's decision u is subject to a random perturbation.To become more specific, let Υ : Ω → R n be a random vector (i.e., a B-Borel measurable function) on some probability space (Ω, B, P).We obtain the following pattern of decision and observation: In our model, the randomness results from manufacturing errors and has the following effect: Throughout (1)-( 3), the leader's decision u is replaced with the perturbed material vector u υ, where denotes the componentwise multiplication and υ is the realization of Υ.In this setting, the leader seeks to ensure that the resulting material parameters are feasible regardless of the realization of the randomness.In order for the perturbed material vector to be almost-surely admissible, the leader has to choose the design parameter u in the induced feasible set where µ Υ := P • Υ −1 is the induced Borel probability measure on R n .Note that the set U Υ is closed as the intersection of closed sets.Typically, we think of a situation where supp µ Υ ⊆ [a, b] n holds for some 0 < a < b, possibly both close to 1.
We will consider the stochastic extension of the classical pessimistic bilevel program ( 1)-( 3) as well as the modified version (7).In both situations, we will assume the following assumption: (A1) The support of µ Υ is bounded.
In the classical setting, we will need the following additional assumptions: (A2) F is a nonempty, bounded polyhedron, i.e. the convex hull of its nonempty and finite set of extreme points P ⊆ F.
(A3) µ Υ is absolutely continuous with respect to the Lebesgue measure L n .
(A4) There exists an open and connected set Ũ ⊆ R n , such that U ⊆ Ũ, H| Ũ is real analytical, and it takes values in a closed subset of S N ++ .
From the leader's point of view, the material vector that will be passed down to the lower level after the stochastic perturbation has occurred can be understood as a random vector u Υ : U Ω → R n which is parameterized by the decision u.Similarly, the upper level outcome is a random variable Φ[u Υ] ∈ L 0 (Ω, B, P) for any fixed u by Proposition 1.Here and in the subsequent analysis, we denote the associated classical L p -spaces with p ∈ [1, ∞] by L p (Ω, B, P) and use L 0 (Ω, B, P) for the space of real-valued measurable functions.
is well-defined and continuous with respect to any L p -norm with p ∈ [1, ∞).
The proof of Theorem 1 requires some preliminary work.
Lemma 2. Assume (A2) and (A4), then the set of discontinuities of Φ is a Lebesgue null set.
Proof.As the lower level goal function is strictly convex, we have Ψ[u] ⊆ P for any u ∈ U.By (A4), for any pair (f, f ) ∈ P × P the function G (f, f ) : Ũ → R defined by is well-defined and real analytic.Consequently, the set of parameters for which f and f are optimal for the lower level problem is a Lebesgue null set, or we have which is a Lebesgue null set by the previous considerations.
To take care of the general case, let us consider the following relation on P × P: It is easy to verify that ∼ defines an equivalence relation and that the equivalence class of any extreme point f ∈ P is given by Let P ⊆ P contain exactly one element from each equivalence class, then Φ admits the representation As P is finite, for any f ∈ P the mapping is continuous.By the same argument as in the proof of Proposition 1, Φ is continuous on each set of parameters for which f is the only representative that is optimal for the lower level problem.Thus, the set of discontinuities of Φ is contained in the set which is a Lebesgue null set by construction of P. For later reference we remark that we obtained and that the sets N B and S[ f ] for f ∈ P in the right-hand side of ( 8) are pairwise disjoint.
Throughout the subsequent analysis, we will use the notation introduced in the proof of Lemma 2.
Proof of Theorem 1.Let u ∈ U Υ .As any upper semicontinuous function is Borel measurable, F[u] ∈ L 0 (Ω, B, P) follows directly from Proposition 1.Moreover, we have by continuity of J, (A1) and (A2).Consider any sequence {u k } k∈N ⊆ U Υ that converges to some u ∈ U Υ .We write The set {u}∪{u k | k ∈ N} is compact, so that by continuity of J and ( 9) we obtain a uniform bound on the integrand.With (A1) and dominated convergence we see that it suffices to prove pointwise convergence almost everywhere.Let N B be as in the proof above, and consider the set By the change-of-variables formula we obtain 0 = L n (N B ) = n i=1 u i L n ( NB ) and, since u i > 0 for all i, L n ( NB ) = 0.By (A3), µ Υ ( NB ) = 0.
Fix some υ ∈ U Υ \ NB .Then by (8) we have u υ ∈ S[ f ] for some f ∈ P, so that in particular Φ is continuous at u υ.From u k → u with k → ∞ we obtain u k υ → u υ and therefore Φ[u k υ] − Φ[u υ] → 0. This proves pointwise convergence almost everywhere and concludes the proof.
Remark 3. The assertion of Theorem 1 does not hold for p = ∞.To see this, we consider the example of Remark 1 and extend it to the stochastic setting taking Ω = [ 9 10 , 11  10 ], P proportional to the Lebesgue measure restricted to Ω, and Υ to be the identity, so that supp µ Υ = Ω.Then F[u](v) = Φ[uv] = ±uv, with the positive sign if and only if uv ≥ 1.For the sequence u As a generic first choice, the leader might assess the random upper level cost based on its expected value, i.e. consider the risk neutral bilevel stochastic program which is well-defined by Theorem 1.More in general, to allow for varying degrees of risk aversion, we take into account a mapping R : and consider the bilevel stochastic program R will typically be a monetary risk measure in the sense of [15,Definition 4.1] meaning it satisfies the following conditions: Moreover, we will assume the following: ) is convex and nondecreasing as defined above.
Remark 4. (A5) holds for any convex risk measure in the sense of [13] and [14], i.e. for any monetary risk measure that is convex.In particular, this includes the expectation, the mean-upper semideviation of any order and the Conditional Value-at-Risk.However, as we do not assume translation equivariance, the assumption is also fulfilled for the expected excess of arbitrary order (cf.[35,Chapter 6]).
The following result is well-known in the literature, see for example [4,Theorem 4.1].For the convenience of the reader, we provide a short self-contained proof.It suffices to prove that R is continuous in 0, and we can assume that R(0) = 0 (otherwise we replace R by R(f ) := R(g * + f ) − R(g * )).If R is not continuous, there is δ > 0 such that for any j there is Using first monotonicity and then convexity, we obtain R(f * ) ≥ R(2 j |f j |) ≥ 2 j R(|f j |) ≥ 2 j δ for any j, which contradicts the boundedness of R(f * ).
is continuous.In particular, the bilevel stochastic problem (11) has an optimal solution whenever the induced feasible set U Υ is nonempty and compact.
Proof.As R is continuous by Lemma 3, the result follows from Theorem 1.
Let us now consider the stochastic version of the modified problem (7), where the leader hedges against all η-optimal lower level solutions.For this, we will use the notion of law-invariant risk measure: i.e. for all Y 1 , Y 2 which induce the same Borel probability measure.The following existence result is obtained for law-invariant, convex risk measures under weaker assumptions, where we no longer restrict the analysis to polyhedral F and real analytic H.
Theorem 3. Assume (A1) and (A5) and let R be translation equivariant as well as law-invariant.Then the mapping Q R,η : is well-defined and lower semicontinuous.In particular, the bilevel stochastic program is solvable, whenever U Υ is nonempty and compact.

Application: Discrete Shells
In this section, we will apply bilevel optimization to a mechanical shape optimization problem.Our aim is to determine the optimal elastic design of curved roof-type constructions.The leader in this setup is the construction engineer who aims at minimizing a tracking-type functional via optimizing the distribution of material on a prescribed roof geometry.Due to production errors, the material distribution is considered to be stochastically perturbed in the actual construction phase.The follower is a test engineer, who is performing a worst-case analysis and considers within a given set of possible forces-for example wind and roof load-those that maximize the compliance functional.

General Setting and Problem Formulation
Our model problem is taken from the literature on geometric design [38], but our mechanical perspective is not self-supporting structures but instead architectural structures composed of discrete thin shells.Indeed, we model the mechanical properties of a roof construction using an adaptation of the discrete elastic shell model by Grinspun et al. [17], in which the geometry is a triangular surface and each triangle is considered as a construction panel, with joints at the edges.The membrane distortion deforms the individual panels, whereas the bending distortion leads to a change of the dihedral angle between pairs of panels that share an edge.Let us emphasize that the discrete shell approach is a design tool and does not act as a computational tool for the full elastostatic modeling in a later planning stage.In fact, we consider the discrete shell model mainly as a testbed for the proposed bilevel optimization approach.We underline this by reporting all physical quantities without units.
Comparing with the notation in the previous section, the design parameter u will represent the thickness of the shell, f the applied forces, and y the resulting displacement of the shell.The minimization in equation ( 3) then corresponds to the solution of a linear elasticity problem in (13), with H[u] representing the elastic energy.The problem in (2) corresponds to the follower optimizing compliance.The leader's cost functional J in (1) measures the deviation from the prescribed shape and is defined in ( 14) below.
We consider the simplicial mesh of a discrete shell S h = (V, E, T ) consisting of sets of vertices V, edges E ⊂ V × V and triangular faces T ⊂ V × V × V.In what follows, we use maps defined on the different elements of such a mesh instead of vectors used in the theoretical considerations above.For example, a map w : V → R k assigning each vertex a value in this section corresponds to a vector R k|V| from the previous sections and similarly for functions defined on edges and faces.We denote evaluations w(v) of such a map also via indexing to simplify notation, i.e.
The geometry of a discrete shell is given by a map x : V → R 3 subject to the constraint that for each face there is no straight line in R 3 containing all three vertices, i.e. no triangle degenerates to a line.Thus, each triangle t ∈ T with vertices v 0 , v 1 , v 2 can be parametrized over the reference triangle in R 2 with vertices (0, 0), (1, 0) and (0, 1) via the affine map x t interpolating x(v 0 ), x(v 1 ), x(v 2 ).We denote by Dx t the differential of this affine map for face t, so that the associated metric tensor in the same face is We denote by x : V → R 3 the fixed stress-free reference configuration of the discrete shell, and parametrize the deformed configuration x = x + y in terms of the elastic displacement of the vertices y : V → R 3 .We denote by l e the length of an edge e ∈ E and by a t the area of a face t ∈ T in the reference configuration.Then, a e := 1 3 (a t + a t ) is a corresponding edge-associated area, where t and t are the two faces adjacent to the interior edge e ∈ E; correspondingly a v := 1 3 t∈Tv a t a vertex-associated area for the ring of faces T v around a vertex v ∈ V.
The design variable is the material thickness parameter, which is assumed to be constant on each of the triangles and is denoted by u : T → (0, ∞).In order to evaluate the bending contribution to the energy, see (12) below, we shall use on an interior edge e the averaged thickness u e := 1 2 (u t + u t ) of the two triangles t and t sharing the edge e.
Variational Formulation of Discrete Shells.In the modeling of thin shells, the elastic stored energy is typically the sum of two terms: the stored energy caused by in-plane membrane distortion and the stored energy reflecting bending distortion [7,27].The two terms scale linearly and cubically, respectively, in the thickness of the shell.
For a displacement y, the Cauchy-Green strain tensor measuring the change of lengths, and consequently area, of a face t is given by Then, the membrane energy depends on this tensor and is defined as where we use the neo-Hookean energy density The linearization of this energy coincides with the planar, isotropic, linearized elasticity model with Lamé-Navier coefficients µ and λ [6,27].In the following, we use µ = λ = 1.
For the bending energy, we follow [19] and use an adaptation of the discrete shell bending energy introduced in [17].It measures the change of the dihedral angles between a pair of neighboring triangles t and t due to the displacement y in the configuration x.The angle is computed as θ e (x) := arccos(n t (x) n t (x)), where n t (x) and n t (x) are the unit normals generated by the deformation x, and the energy takes the form for some constant γ > 0, which in continuum models can be expressed in terms of λ and µ.We use γ = 1.
The stored elastic energy W[u, y] is the sum of these two energies, so that the total free energy in the presence of external forces f : V → R 3 reads as where M is a diagonal mass matrix in R 3|V|×3|V| with entries a v at positions (i, i) with i = 3j − k for j = 1, . . ., |V| and k = 0, 1, 2. The elastic displacements resulting from applying the forces to the reference configuration are the minimizers of this energy.
In what follows, we restrict ourselves to the linearization of this model.We denote by H[u] := ∂ 2 yy W[u, 0] the Hessian of the stored elastic energy, and obtain the linearized stored elastic energy as well as the linearized total free energy whose minimization corresponds to the innermost problem introduced in (3).Prescribing suitable boundary data y v = 0 on a set of at least three vertices v ∈ V, which do not lie on a line, one can deduce (cf.[19]) that H[u] is a positive-definite matrix.As written above expression (4), for every u and f the energy The Optimization Problem.To complete our practical optimization problem, we need to specify the admissible set of material parameters U, the admissible set of force parameters F, and the cost functional of the leader J.The objective of the lower level optimal value function ψ is already completely defined in (5) and equals the compliance functional evaluated for the displacement y[u, f ], i.e.
The admissible set of force parameters F is assumed to consist of linear combinations of a small number of different load scenarios.We assume that the forces are of the type f = BF , where F ∈ R d for some d 3|V| are the coefficients, and the columns B j of the matrix B ∈ R 3|V|×d are the basis of the d-dimensional subspace of forces.Therefore, each B j ∈ R 3|V| represents a force distribution on the reference configuration x which is then scaled with F j ∈ R, for j = 1, . . ., d.The components of these basis vectors could be determined, for example, from the location of the vertex or the inclination of the triangular faces sharing a vertex.Furthermore, we consider different constraints on the values of the scale factors F j , i.e. we assume that the set F is given by for some smooth functions Q F k for k = 1, . . ., K. For example, if F consists of the forces which fulfill |F | ≤ µ then one might choose d = 3|V|, B = Id, K = 1, and for iterates of the Newton-type method for the follower problem in the first upper level descent step and the initial material distribution.
In the problem of the leader, we constrain the material thickness parameter u elementwise from below and from above, and we assume that the total volume of material, determined via the discrete integral of u, is below some fixed positive parameter.
Lastly, the upper level cost functional is considered to be of tracking-type and measures the squared discrete L 2 -norm of the displacement on a predefined tracking subset of the whole shell, Here χ : V → {0, 1} is a discrete characteristic function with value 1 at vertices in the tracking set and 0 elsewhere.
In the stochastic setting, we restrict ourselves to the expected value E [F[u]] as the risk measure for the optimization (cf.(10)).Furthermore, the stochastic perturbation of the distribution of the thickness parameter u is given by i.i.d.normal distributions for each parameter, i.e. we consider the perturbed material u Υ for Υ ∼ T N (1, σ 2 , υ min , υ max ) |T | , where T N (1, σ 2 , υ min , υ max ) is the truncated normal distribution with average 1 and standard deviation σ, truncated to the interval [υ min , υ max ].In practice, we take σ ≤ 0.2, υ min = 10 −2 and υ max = 2, so that the truncation has little effect and σ is almost identical to the standard deviation of Υ.
We further fix constants 0 < u − < u + and V + > 0 and define implicitly U by the condition

Numerical Optimization
To numerically solve the bilevel problem (1) in the presented setting, it is convenient to replace the restriction of u and f to admissible sets U Υ and F by smooth approximations and then to deal with a differentiable problem.In our implementation, we achieve this by using logarithmic barrier functions, as commonly used in interior point methods (see e.g.textbook [31]).Hence, with the structural assumptions on the set of admissible forces introduced above, we define the smoothed follower problem by where α F > 0 is an appropriate scaling factor for the barrier terms.
To compute the minimizers in (15), we do not aim at a global minimization approach but rather use an ascent method (see below) to compute isolated local minimizers.Thus, we assume in the numerical optimization of the leader problem, that the solution of the follower problem is of such type.This allows us to apply conventional nonlinear optimization algorithms.In this framework, the maximizer and the set Ψ α be interchangeable.In the examples considered below, this assumption is justified by the use of asymmetric triangulations, and additionally by the symmetry-breaking random perturbations of the material thickness.Thus, the logarithmic barrier formulation of the expected value optimization problem for the leader is min for scaling factors α u , α V > 0 as before.This regular reformulation of the optimization problem can be solved numerically using a stochastic gradient method.For PDE-constrained shape optimization problems under uncertainty, this method is analyzed in [16].In our case, the smoothed follower problem is a deterministic and smooth optimization problem, and computing its first and second derivatives is straightforward.Thus, we use a Newtontype method with Armijo backtracking line search (cf.[31,Algorithm 3.2]) to compute its optimizers.The gradients of the smoothed bilevel problem can be computed via the general procedure of shape optimization calculus and thus, we employ stochastic gradient descent [33] to solve it.To this end, in each iteration of the descent algorithm, we draw finitely many samples υ 1 , . . ., υ K from the distribution of the material perturbation.In the experiments, we always chose K = 128.Using these samples, we approximate the expected value by the empirical risk Ĵ[u] : Then a new iterate is computed by taking a step in the direction of the negative gradient of the combination of the empirical risk and the logarithmic barrier terms.Figure 1 depicts the decrease of the upper level cost functional over the iterations of the stochastic descent algorithm and the increase of the lower level compliance cost when solving the follower problem for the initial material distribution.Latter solves of the follower problem typically require 10 to 30 iterations of the Newton-type method per outer iteration.
We have implemented our method in C++ with the Geometric Optimization And Simulation Toolbox (GOAST) [20], where we use the Eigen library [18] for numerical linear algebra and CHOLMOD [3] from the SuiteSparse collection as direct linear solver.The code is available under https://gitlab.com/numod/bilevel-shape-optimization.

Numerical Results
We applied the bilevel shape optimization method in a proof-of-concept study of discrete shells representing curved roofs.We fix an orientation so that the negative Z-axis is in the direction of gravity and the supporting ground is in the XY -plane.For each geometry, we fix a set of Dirichlet vertices near the ground plane, representing the points on which the structure is supported, and also fix the material thickness of the corresponding triangles.This removes these variables from the optimization.
The construction is exposed to two types of forces.First, there are forces emulating wind hitting the structure.For a given wind direction and strength, the force on each part of the roof depends on the local orientation.We assume that the magnitude of the force on a vertex is proportional to the absolute value of the scalar product between the vertex normal (given as the average of the normals of the triangles adjacent to the vertex) and the wind direction.For simplicity, we only consider a two-dimensional subset of possible forces, spanned by the basis vectors B 1 and B 2 which represent wind along the positive Xand Y -axis, respectively.The direction and magnitude of the wind are then controlled by the scale factors F 1 and F 2 .We fix a maximal magnitude of wind-type force F max,xy and use the constraint function (15).An example of these two basis vectors demonstrating the dependence on the orientation of the normal is shown in the second and third panels of Figure 2. Second, we consider a vertical force, which could emulate the weight of snow or water overlay on the roof.The magnitude of the corresponding basis vector B 3 on each vertex is the absolute value of the scalar product between the vertex normal and the Z-axis and is shown in Figure 2 on the far right.The magnitude of gravitational load is controlled by the scale factor F 3 , we ensure that it is pointing downward via Q F 2 (F ) := F 3 and limit its magnitude via Q F 3 (F ) := F max,z − F 3 , where F max,z is the maximal magnitude of the gravitational force.Therefore the admissible set F is a cylinder with radius F max,xy and height F max,z .
We performed most of our investigations on the simple roof geometry shown in Figure 2.For this problem, the basic parameters, which are used in the examples if not indicated otherwise, are as follows.The roof geometry is almost filling a box of 20 × 20 × 10, the maximal horizontal load is F max,xy = 0.0015 and the vertical one F max,z = 2F max,xy .The elementwise bounds on the material thickness are u − = 0.01 and u + = 0.2.The volume of the material is bounded by V + = 60 and the strength of the stochastic For the leader, we consider a tracking set restricted to the central region of the roof plateau as shown in the first panel of Figure 2.
In Figure 3, we show the deformed configuration, the optimized distribution of the material thickness, and the magnitude of displacements in case of the leader minimizing a tracking functional once with global support (top row) using χ ≡ 1 and once restricted to the region of the roof plateau (bottom row).As for all examples presented here, in the follower problem, the maximal compliance is attained for a force F representing an extremal point of the cylinder of admissible forces.For the tracking cost domain centered on the roof plateau, one observes a concentration of mass in the central region accompanied by a significant reduction of the thickness close to the four corners where Dirichlet boundary conditions apply.The concentration and corresponding reduction break the symmetry of the configuration w.r.t. the diagonal from the upper left to the lower right.Due to the asymmetric reduction, the follower chooses a force pointing to the upper right and one observes a kink line connecting the two arcs in the front at approximately half of the total height.This is accompanied by large displacements, which are however outside of the tracking region on the plateau.In contrast, for the tracking with global support, no such kink with strong displacements occurs, however, the deformation exhibits a larger displacement in the central region.Finally, beyond the mass concentration in the middle, one also observes the onset of curved "beam" like structures connecting the middle region and the four arcs of the roof.In the example with localized tracking, and most of the following ones, the elementwise bounds u + and u − are nearly attained for at least some triangles.
Figure 4 shows for the same geometry the impact of the upper bound on the total material volume.As the total permitted mass is increased, the elongated curved "beams" connecting the tracking region in the center with the four arcs become thicker.Once the maximal thickness is reached in the central region and along these "beams", further mass is invested to reinforce the regions close to the Dirichlet boundaries.The curved carrier "beams" and the central region are again designed asymmetrically w.r.t. the diagonal from the upper left to the lower right leading the follower to push towards the upper right.
We next investigate the effect of the parameters characterizing the strength of the forces, F max,z and F max,xy , while keeping the total amount of material constant.By scaling invariance, it is natural to focus on the ratio Fmax,z Fmax,xy .In Figure 5, we show that with increasing strength of the vertical force, the "beams" become thinner and instead more material is concentrated in the central region.Interestingly, for small values of the ratio between the two forces the material distribution is nearly symmetrical w.r.t. the diagonal from the upper left to the lower right, while it is asymmetric for mid-range ratios and then becomes more symmetric again for large ratios.
Figure 6 shows the impact of the strength of the stochastic perturbation of the material thickness, as measured by the standard deviation, again for the tracking region on the roof plateau.With increasing strength of the stochastic perturbation, the optimal structure becomes more diffuse.Indeed, in a deterministic setting, the leader could aim for a finely-structured design, but very imprecise manufacturing is likely to render it ineffective.In order to understand this effect, we describe an idealized situation: If the leader concentrates mass on a single row of k elements, then a large negative fluctuation in the thickness of any single one of them is sufficient to destroy the strength of the construction.If instead, the leader distributes the mass on k 2 elements filling a square, then at least a number of order k of those (with a specific geometry, for example, a column) must have a large negative fluctuation before the structure loses significantly in strength.
Lastly, in Figure 7, we show two more complex examples of architectural designs of roof structures, inspired by [38].In the top row, we use a closed hall as the reference geometry for our bilevel optimization problem, which fills a box of approximately 20×20×5.We limit the horizontal load with F max,xy = 0.005 and the vertical load with F max,z = 2F max,xy .The elementwise bounds on the material thickness are u − = 0.01 and u + = 0.2.The volume of the material is bounded by V + = 50 and the stochastic variation is σ = 0.05.The weights of the barrier terms are α F = 10 −4 , α u = 1, and α V = 10 −3 .In the bottom row, we use a reference geometry resembling a double torus cut in half, which fills a box of approximately 70 × 50 × 15.Again, we limit the horizontal load with F max,xy = 0.005 and the vertical load with F max,z = 2F max,xy .The elementwise bounds on the material thickness are again u − = 0.01 and u + = 0.2.The volume of the material is bounded by V + = 330 and the stochastic variation is σ = 0.05.The weights of the barrier terms are α F = 10 −4 , α u = 1, and α V = 10 −1 .In both cases, we use the full domain as tracking set.The main weakness of both structures is the concavity in the central part, which can be easily deformed by the vertical force.Hence, in both optimized solutions, the material is redistributed to prevent this.In the first case, this is done by building a stabilized ledge around the center, while in the second case beam-like structures from the two "holes" and another beam from the curve in the bottom emerge.Furthermore, in the second one, also the "entrance" is stabilized by adding material at the ends of its arch.

Discussion
The findings in this article draw a line from curved roof-type constructions via modeling and shape optimization of discrete thin shells to pessimistic formulations of bilevel stochastic programs.The challenge is that even in the deterministic case, it is well-known that standard compactness assumptions fail to Figure 4: A comparison of the material distribution when varying the maximal allowed material volume V + while keeping the other parameters fixed.The allowed volume was V + = 40, 50, 60, 70, 80 from left to right.Material thickness is shown using the color map 0 0.2.On the far right, we show the direction of the horizontal forces, which was the same for all parameters, while the vertical force was always chosen maximal.Assuming that the support of the underlying probability measure is compact, we have considered stochastic parameters and assessed the random upper-level outcome based on some (law-invariant) convex risk measure.For the pessimistic model, we have shown continuity of the resulting risk functional if the random perturbation admits a Lebesgue density, the set of potential forces is a polyhedron and the lower level goal function is real analytic.Alternatively, we have investigated a regularized model where the leader also hedges against lower level solutions that are close to optimality.The risk functionals emerging from this regularized problem are automatically lower semicontinuous.In both situations, the existence of optimal solutions can be guaranteed under a compactness condition.We have developed a proof-ofconcept numerical implementation that applies a pessimistic bilevel strategy to a mechanical optimal design problem, using a stochastic gradient descent approach to compute locally optimal solutions of the pessimistic model.
In closing, we would like to point out several possible directions for future research.In the numerical optimization, it would be interesting to consider interior point methods to solve the "original" leader's and follower's problem which incorporate hard constraints instead of the regularization used here.From the point of view of elasticity, it would be interesting to study the nonlinear model ( 13) instead of its linearized equivalent and investigate the associated nonuniqueness issue in the lower level problem.In fact, this would lead to a proper trilevel problem and bring new challenges for theoretical and numerical investigations.Furthermore, it would be worthwhile to investigate the infinite-dimensional variational problem of thin shell or volume elasticity with appropriate function spaces and from the perspective of optimization with continuous PDE constraints.In the present paper, "risky" decisions can be penalized in the objective function, but the leader ensures that the perturbed material parameters are feasible regardless of the realization, via a restriction of the design variable to the set U Υ .Models, where this robust constraint is replaced with a system of chance or stochastic dominance constraints, can be expected to produce less conservative solutions, which improve the values of the leader's cost functional at the cost of some residual risk.In both cases, we used tracking on the entire domain.On the left, we show the deformed configuration as a gray surface with the undeformed surfaces as a translucent overlay.Furthermore, we visualize the direction of the force leading to the maximal deformation in the cylinder.In the middle, we see the resulting material distributions using the color map 0 0.2.Boundary triangles for which all vertices are Dirichlet nodes are shown in gray.On the right, the magnitude of the deformation y is displayed using the color map 0 0.7.Additionally, on the far right, we show the 2D direction of the horizontal forces.

Lemma 3 .
Assume (A5), then the mapping R is continuous.Proof.For f ∈ L p (Ω, B, P) we denote by |f | ∈ L p (Ω, B, P) the function obtained taking the pointwise absolute value, so that f ≤ |f |, −f ≤ |f | P-almost everywhere.
hold for any u ∈ U Υ by Proposition 2 and (A1).Thus, Q R,η is well-defined.Let R * denote the convex conjugate of R (cf.[22, Theorem 2.1]), then R admits a robust representation asR[Y] = sup P ∈Env {E P [Y] − R * [P ]} ∀ Y ∈ L p (Ω,B, P), where the risk envelope Env is a subset of the normed positive part of the dual space of L p (Ω, B, P) by [22, Corollary 2.3, Theorem 2.4].Fix any P ∈ Env.We shall show that the mapping u → E P [Φ η [u Υ]] is lower semicontinuous.The result then follows because the pointwise supremum of lower semicontinuous functions is lower semicontinuous (cf.Lemma 1 and [34, Proposition 1.26 (a)]).Consider any sequence {u k } k∈N ⊆ U Υ that converges to some u ∈ U Υ .Without loss of generality, we assume that u k ∈ B 1 (u) ∩ U Υ holds for any k ∈ N, where B 1 (u) denotes the open Euclidean unit ball around u (We denote its closure by B 1 (u)).By definition, Φ η [u k Υ] ≥ min υ∈suppµΥ min u∈B1(u)∩UΥ min f ∈F J [u υ, f ] =: J holds for any k ∈ N. As J is continuous and supp µ Υ , B 1 (u) ∩ U Υ , and F are nonempty and compact, we have J ∈ R. Thus, Fatou's Lemma yields lim inf k→∞ has a unique minimizer, which is also the unique solution of the associated Euler-Lagrange equation 0 = ∂ y I lin [u, f, y] = H[u]y − M f.

Figure 1 :
Figure 1: Left: upper level relative cost values Ĵ[u i ]/ Ĵ[u 0 ] for the iterates of the stochastic gradient descent method in the example shown in the bottom row of Figure 3. Right: corresponding lower level compliance cost y[u,BF j ] H[u] y[u,BF j ] y[u,BF 0 ] H[u] y[u,BF 0 ]for iterates of the Newton-type method for the follower problem in the first upper level descent step and the initial material distribution.

Figure 2 :
Figure 2: The first panel shows the geometry of the roof structure, with the tracking set on the roof plateau marked with dots.The Dirichlet nodes are the vertices on the horizontal plane at the corners.The other three panels show the three basis force fields B 1 (horizontal wind in the X direction), B 2 (horizontal wind in the Y direction) and B 3 (vertical gravitational force caused by an overlay on the roof).The scale of the force arrows is arbitrary.

Figure 3 :
Figure 3: Comparison of results for full vertex tracking set (top) and plateau tracking set (bottom) on the simple roof-type geometry already shown in Figure 2. On the left, we show the deformed configurations as gray surfaces, while the undeformed surfaces are shown as translucent surfaces overlayed with red edges.Next to the surfaces, we visualize the direction of the force (F 1 , F 2 , F 3 ) chosen by the follower in the cylinder of admissible values.In the middle, we show the resulting material distributions with color map 0 0.2, where boundary triangles with all three vertices subject to Dirichlet boundary conditions are shown in gray.On the right, we show the magnitude of the deformation y using the color map 0 ≥ 1.5.Additionally, on the far right, we show the direction of the horizontal forces (F 1 , F 2 ).

Figure 5 :
Figure 5: A comparison of the material distribution when varying the ratio of vertical to horizontal force Fmax,z Fmax,xy , i.e. the shape of the cylinder, while keeping the other parameters, especially the maximal magnitude of horizontal force, fixed.The ratio of vertical to horizontal force was Fmax,z Fmax,xy = 1 2 , 1, 2, 4, 8 from left to right.The material thickness is shown using the color map 0 0.2.On the right of each material distribution, we show the force in the cylinder of admissible values.

Figure 6 :
Figure 6: Comparison of material distribution when varying the standard deviation σ of the material perturbation while keeping the other parameters fixed.The standard deviation was σ = 5 100 , 1 10 , 2 10 from left to right.Material thickness is shown using the color map 0 0.2.

Figure 7 :
Figure 7: Results for two geometrically more complex examples.In both cases, we used tracking on the entire domain.On the left, we show the deformed configuration as a gray surface with the undeformed surfaces as a translucent overlay.Furthermore, we visualize the direction of the force leading to the maximal deformation in the cylinder.In the middle, we see the resulting material distributions using the color map 0 0.2.Boundary triangles for which all vertices are Dirichlet nodes are shown in gray.On the right, the magnitude of the deformation y is displayed using the color map 0 0.7.Additionally, on the far right, we show the 2D direction of the horizontal forces.