Algorithmadvanced
Bidirectional evolutionary structural optimization
Also called BESO, evolutionary structural optimization.
Ranks elements by strain energy density and lowers the volume step by step, removing the weakest solid elements and adding back void ones, so the design stays 0/1 at every iteration.
- Solves
- Topology optimization
- Time
- O(k (s + n log n)) worst
- Space
- O(n) extra
- Where
- k = number of iterations; n = number of elements; s = time of one finite element solve
- Model
- Real RAM
- Properties
- deterministicnot exactiterative
- Evidence
- Proof sketchCode in 1 languages
- Origin
- Osvaldo M. Querin, Grant P. Steven, Yi Min Xie, Xiaodong Huang, 1998
Bidirectional evolutionary structural optimization (BESO) is a method for topology optimization that keeps every element either solid or void. It starts from the full design domain and lowers the volume by a small ratio at each iteration. After each finite element solve, it gives every element a sensitivity number, the strain energy per unit volume, and keeps the elements with the highest numbers up to the current target volume. Solid elements with low numbers are removed, and void elements with high numbers come back, which is the "bidirectional" part. The older method of Xie and Steven (1993) only removed elements. Querin, Steven and Xie (1998) added the reverse step, and Huang and Xie (2007) added a filter and an average with the previous iteration, which make the results stable on fine meshes. BESO is simple and gives crisp designs, but it has no general proof of convergence or of optimality. This page proves what holds for a network of bars: the sensitivity is the derivative of the compliance, the method is optimal for parallel bars with equal areas, and it is a greedy knapsack rule, worse than the optimum by any factor, when the areas differ.
In plain words
Start with a solid block. Push on it and see which small pieces work hard and which hardly work at all. Remove a few of the lazy pieces, so the block gets a little lighter. Push again. Some pieces that were removed may now be needed, so put the most useful of them back.
Repeat until the block has the target weight and stops changing. What is left is a frame of members that carry the load. At every step each piece is either fully there or fully gone, so the result needs no rounding at the end.
The problem
The design domain is divided into elements, and element has the volume and the variable . The stiffness of the structure is , where is the element matrix of the solid material and . A void element keeps the small stiffness , which is the soft-kill form, so the solve is always defined. The goal is
The sensitivity number. As on the SIMP page, . BESO uses
For a solid element this is its strain energy per unit volume. For a void element it is times that of the solid element with the same displacements. With and the factor is . A void element ranks high only when its displacements are very large, which is what happens when the remaining solid parts lose their connection.
The algorithm
BESO(mesh, f, V*, ER, p, x_min, AR_max, τ, N)- 1
x_e ← 1 for every element; V ← Σ v_e - 2
for k = 1 to maxit do - 3
solve K(x) u = f; C_k ← fᵀu - 4
if V = V* and k > 2N and |Σ_{last N} C − Σ_{previous N} C| ≤ τ Σ_{last N} C then stop - 5
α_e ← ½ x_e^(p−1) u_eᵀ k_e u_e / v_e ▷ filtered on a continuum mesh - 6
if k > 1 then α_e ← (α_e + α_e^prev) / 2; α^prev ← α - 7
V ← max(V*, V (1 − ER)) - 8
S ← the longest prefix of the elements sorted by decreasing α with Σ_{e∈S} v_e ≤ V - 9
if more than AR_max·n elements of S are void then keep the best AR_max·n of those voids, then fill with solid elements by α up to V- 10
x_e ← 1 for e in S and x_min for the other elements - 11
return x
Line L7 is the volume schedule: the target falls by the evolutionary ratio ER (often 1% to 2%) per iteration until it reaches . Line L8 is the threshold of Huang and Xie: the solid set is the elements whose sensitivity is above a level, chosen so that the volume meets the target. Line L9 is the admission limit: when too many voids would turn solid at once, only the best of them do, which keeps the design from jumping. Line L6 averages each number with its value from the previous iteration. Huang and Xie (2007) found that this stops the design from oscillating between two states. On a continuum mesh, line L5 also smooths the numbers over a radius , with the cone weights of the sensitivity filter of the SIMP page. The filter also gives void elements a number from their solid neighbors, so material grows next to stressed regions. Line L4 stops when the compliance over the last iterations (often 5) differs from the before by a relative amount of at most .
Example
The test structure is a set of parallel bars between a wall and a rigid plate, with a unit load on the plate and . Every bar stretches by the same , so by line L5 a solid bar has , whatever its area.
Equal areas. Six bars of area 1 have the lengths 1 to 6, so the total volume is 21. Take , ER , and . The shorter a bar, the higher its number, so line L8 keeps the shortest bars that fit:
| iteration | target | solid bars (lengths) | volume | compliance |
|---|---|---|---|---|
| 0 | 21 | 1, 2, 3, 4, 5, 6 | 21 | 0.4082 |
| 1 | 18.9 | 1, 2, 3, 4, 5 | 15 | 0.4380 |
| 2, 3 | 17.01, 15.31 | 1, 2, 3, 4, 5 | 15 | 0.4380 |
| 4 to 7 | 13.78 down to 10.04 | 1, 2, 3, 4 | 10 | 0.4800 |
| 8 to 13 | 10 | 1, 2, 3, 4 | 10 | 0.4800 |
The compliance of the full design is , and that of the final design is , plus a term of order from the void bars. The run stops after 14 solves, when the compliance has not changed over two windows of 5. The volume falls in jumps, not smoothly, because a bar is either in or out: at iteration 1 the target is 18.9 but the design has volume 15. Brute force over all designs confirms that is the best design with volume at most 10.
Unequal areas. Two bars: bar 1 with , (stiffness 1, volume 1), and bar 2 with , (stiffness , volume 11). The target is and ER . Bar 1 has the higher number, against . At the first target, 11.76, both bars together have volume 12, so line L8 keeps bar 1 alone. Bar 2 is now void, its number is a factor smaller, and it never returns. BESO ends with compliance about 1.0. The best design is bar 2 alone, with compliance . BESO is 9.09 times softer than the optimum.
Random networks. On 100 random networks of 4 nodes on a line (the wall at the first node, a unit load at the last, a chain of 3 bars of area 1 and 4 to 7 more bars between random node pairs with areas 1 to 3, seed 3, half the total volume), BESO matched the brute force optimum within on 28 networks and came within 10% on 43. The median ratio was 1.17 and the worst 3.0. These are measurements on small discrete examples, where the jumps of the volume are large, and they say nothing about fine continuum meshes.
Correctness
What is proved for the method as stated: every design after the first meets the current target volume, the targets reach after iterations, and the loop stops after maxit iterations. The sensitivity is times the derivative of the compliance, by differentiating . So line L8 ranks the elements by the first order gain per unit volume.
For parallel bars with equal areas and distinct lengths, the method is optimal. By induction the solid set is always a prefix of the bars sorted by length, and a removed bar never fits again, because the targets only fall. So BESO ends at the longest prefix that fits in . Any feasible set with bars has at least the total length of the shortest bars, so is at most the length of that prefix, and its stiffness is at most that of the prefix. With unequal areas the problem is a 0/1 knapsack with value and weight , and BESO takes the bars in the order of value per weight. That rule is optimal for the fractional knapsack, not for the 0/1 one, and the two bar example shows a gap that grows without bound as the second area grows.
What is not proved. BESO has no general proof of convergence. The averaging and the stop rule are measured to work well, but the 0/1 iterates can cycle, and nothing bounds the gap to the optimum. Zhou and Rozvany (2001) gave a small example where the element removal of the earlier ESO method gives a highly nonoptimal design. The full proofs of the statements above are in the correctness proof.
What the tests check. The solver against the closed forms for bars in parallel and in series, the sensitivity against an exact central difference of the compliance, the equal area case and random equal area cases against brute force, the knapsack counterexample, and the volume and feasibility on random networks.
Proof: BESO keeps feasible designs and stops, its sensitivity is the scaled derivative of the compliance, and on parallel bars it is optimal for equal areas and a greedy knapsack rule otherwisefull
Setting. A network of axial bars with Young's modulus . Bar has the length , the area , the volume and the design variable with . Its stiffness matrix is with and . The supports make positive definite on the free nodes whenever every bar has and every node is joined to a support by a path of bars. The compliance is with . Let and .
Claim.
- Every design after the first has solid volume at most the current target , and the targets reach after at most iterations and then stay there. The method stops after at most maxit iterations.
- For every design, , so ranking by is ranking by the derivative of the compliance per unit volume.
- For bars in parallel between a support and a rigid plate with load , the displacement is , the compliance is , and .
- If in addition all areas are equal and the lengths are distinct, the final design of BESO is the longest prefix of the bars sorted by increasing length whose volume is at most , and it has the least compliance among all 0/1 designs with volume at most .
- With unequal areas, the problem is a 0/1 knapsack problem, BESO ranks the solid bars by value per weight, and its result can be worse than the optimum by any factor.
Proof of 1. Line L7 sets , so for all , the sequence does not increase, and . The second value is at most once . Line L8 adds elements in the ranked order only while the volume stays at most . Line L9, when it applies, first takes some voids, at most of them, all of which were in the set of line L8, and then solid elements while the volume stays at most . In both cases the solid volume is at most . The loop of line L2 runs at most maxit times.
Proof of 2. Differentiate with respect to : , so , using and . Line L5 computes , which is divided by . For a solid bar it is the strain energy per unit volume. For a void bar it is times the energy density that the bar would have if it were solid with the same displacements.
Proof of 3. All bars join node 0 (fixed) and node 1 (the plate), so is the matrix , and . Each bar has , so .
Proof of 4. Number the bars by increasing length, , all with area . Write .
BESO keeps a prefix. By induction on the iteration, the solid set is some , and every void bar was removed at an iteration where the target was below . At the start the solid set is . Assume the solid set is . By claim 3, a bar that is solid in this iteration and in the previous one has the averaged , and every void bar has the factor on at least one of the two terms. So every solid bar has a larger than every void bar (all void bars are longer than all solid bars), and among the solid bars decreases with the length. Line L8 takes the solid bars in increasing length while they fit in . If it stops inside , the new solid set is a prefix with . If all of fits, the next element is a void bar . Its volume would bring the total to at least , because , and when bar was removed the target was below this value. The targets do not increase, so does not fit, line L8 stops, and no void bar is added. So line L9 does nothing, and the solid set is again.
The final prefix is the longest one that fits. Once , line L8 keeps the longest prefix of with volume at most . Let be the largest with . While the target is above , the solid set has volume at most the target and all prefixes up to fit in every target, so the solid set always contains . At target the prefix does not fit, so the solid set is exactly .
The prefix is optimal. The compliance is , so the best 0/1 design maximizes plus a term from the void bars that is the same for all sets of the same size only up to the factor . Ignore that term first. Let be any set with and . The shortest bars have total length at most that of , so is feasible and . The largest values of are those of , so . Now include the voids: the stiffness of a design is . The last term does not depend on , and , so the same set maximizes it. So has the least compliance.
Proof of 5. By the last formula, minimizing the compliance with volume at most is maximizing subject to : a 0/1 knapsack problem with values and weights . By claim 3 the solid bars are ranked by , which is value per weight, and line L8 takes a prefix of this order. Two bars with and and give the counterexample. The ranking puts the first bar first (its is larger), the first prefix of volume at most is the first bar alone (adding the second gives 12), and the second bar never returns, as in the proof of claim 4. The optimum is the second bar alone, with stiffness against 1, so BESO is times softer, up to the terms. Scaling the second bar's area and the target makes the factor as large as wanted.
What is not proved. For general structures the history averaging, the filter and the admission limit have no proof of convergence: the 0/1 iterates can cycle, and nothing bounds the gap to the optimum. The stop rule of line L4 measures the change of the compliance over two windows of iterations. It is a test, not a proof that a stationary design was reached.
Complexity
Each iteration does one finite element solve, of time , then computes sensitivity numbers, filters them in time on a 2D grid with filter radius , and sorts them in . With a bisection on the threshold instead of a sort, the selection is per step of the bisection. So iterations take , and the solve is most of the time on real meshes. The space is for the numbers and the design, plus the solver.
The number of iterations is at least to reach the volume, which is 35 for and ER , plus at least to pass the stop test. On the random networks above the runs took 36 to 47 solves. No formula bounds the number of iterations after the target is reached; the code stops at maxit.
Properties
- 0/1 designs. Every iterate is solid or void, so there is no gray material to round at the end.
- Feasible volume. Every design after the first meets the current target.
- First order ranking. The sensitivity number is the derivative of the compliance per unit volume, scaled by a positive constant.
- Heuristic. It has no general proof of convergence and no bound on the gap to the optimum.
- Volume in jumps. On coarse meshes the volume can fall well below the target in one step.
- Deterministic. With a fixed tie rule the result depends only on the input and the parameters.
Variants and improvements
- ESO. The one-way method of Xie and Steven (1993) only removes elements, by a stress or energy criterion. A removed element cannot return, which is the weakness that Zhou and Rozvany (2001) showed.
- Hard kill. Void elements are deleted from the mesh instead of kept at . The solve is smaller, but a void element has no displacement, so its number must come from the filter.
- Soft kill with interpolation. Huang and Xie use and the power as in SIMP, which gives void elements a defined number and lets the method treat several materials.
- Other objectives. Natural frequencies, displacement constraints and several load cases change the sensitivity number, not the selection.
- Filters. The mesh-independency filter is the same as the sensitivity filter of SIMP. See density filtering for the filter on the densities and its properties.
When to use it
Use BESO when a crisp 0/1 design is needed at every iteration, for example when the next step of the work reads the layout directly, or when the analysis code can only switch elements on and off. It is easy to add to an existing finite element code, because it needs only element energies. For problems with several constraints or a need for a certificate of optimality, a gradient method on a relaxed problem, such as SIMP with a general optimizer, is the safer choice.
Pitfalls
- Claiming convergence. The stop rule says that the compliance stopped changing. It does not prove a local optimum.
- An admission limit of zero. A limit of AR_max times , rounded down, is 0 on a small model, and then no void element can ever return. The code of this page uses at least 1.
- No averaging. Without line L6 the design often flips between two states on fine meshes.
- A large ER. Large volume steps remove members that later turn out to be needed, and on coarse meshes the volume jumps far below the target.
- Disconnected designs. If the solid set loses its path from the load to the supports, the soft-kill solve still works, but the compliance is huge. With hard kill the matrix becomes singular.
- Reading the volume as the target. The final volume is at most and can be smaller, as the 6 bar example shows at iteration 1.
Implementations
Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/beso-method/. The authors are listed in prov/0GMFJK.jsonl.
"""Bidirectional evolutionary structural optimization (BESO), soft-kill form.
The structure is a network of axial bars on a line. Bar e joins the nodes
i and j, has the length L_e, the area A_e and the Young's modulus 1. Its design
variable x_e is 1 (solid) or xmin (void), and its stiffness is
x_e^p A_e / L_e. The method minimizes the compliance f^T u for a target
volume, after Huang and Xie (2007, 2009). All arithmetic is exact (Fraction).
"""
from fractions import Fraction as F
class Network:
def __init__(self, nnodes, bars, fixed, loads):
"""bars: list of (i, j, L, A). fixed: node indices. loads: {node: force}."""
self.nnodes = nnodes
self.bars = [(i, j, F(L), F(A)) for i, j, L, A in bars]
self.fixed = set(fixed)
self.loads = {k: F(v) for k, v in loads.items()}
def volume(self, e):
return self.bars[e][2] * self.bars[e][3]
def gauss_solve(a, b):
"""Solve a x = b exactly by Gaussian elimination with row pivoting."""
n = len(b)
m = [row[:] + [b[i]] for i, row in enumerate(a)]
for col in range(n):
piv = next(r for r in range(col, n) if m[r][col] != 0)
m[col], m[piv] = m[piv], m[col]
for r in range(col + 1, n):
if m[r][col] != 0:
t = m[r][col] / m[col][col]
for c in range(col, n + 1):
m[r][c] -= t * m[col][c]
x = [F(0)] * n
for r in range(n - 1, -1, -1):
s = m[r][n] - sum(m[r][c] * x[c] for c in range(r + 1, n))
x[r] = s / m[r][r]
return x
def solve(net, x, p):
"""Displacements of all nodes and the compliance f^T u."""
free = [k for k in range(net.nnodes) if k not in net.fixed]
pos = {k: t for t, k in enumerate(free)}
n = len(free)
k = [[F(0)] * n for _ in range(n)]
for e, (i, j, L, A) in enumerate(net.bars):
s = x[e] ** p * A / L
for a, b, sign in ((i, i, 1), (j, j, 1), (i, j, -1), (j, i, -1)):
if a in pos and b in pos:
k[pos[a]][pos[b]] += sign * s
f = [net.loads.get(node, F(0)) for node in free]
uf = gauss_solve(k, f)
u = [F(0)] * net.nnodes
for node, t in pos.items():
u[node] = uf[t]
c = sum(net.loads.get(node, F(0)) * u[node] for node in range(net.nnodes))
return u, c
def sensitivities(net, x, u, p):
"""alpha_e = (1/2) x_e^(p-1) u_e^T k0 u_e / v_e, the strain energy per
unit volume of the solid bar, scaled by x_e^(p-1) for a void bar."""
out = []
for e, (i, j, L, A) in enumerate(net.bars):
d = u[i] - u[j]
out.append(x[e] ** (p - 1) * (A / L) * d * d / 2 / (A * L))
return out
def update(net, x, alpha, target, ar_max, xmin):
"""Lines L8 to L10: a new 0/1 design of volume at most target.
The elements are ranked by alpha. The solid set is the longest prefix of
the ranking whose volume is at most the target. If more than ar_max of
the elements would turn from void to solid, only the best ar_max of them
are added, and the solid elements fill the rest of the volume.
"""
n = len(x)
order = sorted(range(n), key=lambda e: (-alpha[e], e))
chosen, vol = [], F(0)
for e in order: # @line L8
if vol + net.volume(e) > target:
break
chosen.append(e)
vol += net.volume(e)
added = [e for e in chosen if x[e] != 1]
limit = max(1, int(ar_max * n)) # at least one, so small models can add an element
if len(added) > limit: # @line L9
added = added[:limit]
chosen, vol = list(added), sum((net.volume(e) for e in added), F(0))
for e in order:
if x[e] == 1:
if vol + net.volume(e) > target:
break
chosen.append(e)
vol += net.volume(e)
keep = set(chosen)
return [F(1) if e in keep else xmin for e in range(n)] # @line L10
def beso(net, target_volume, er=F(1, 50), p=3, xmin=F(1, 1000), ar_max=F(1, 50), tau=F(1, 1000), window=5, maxit=200):
"""Run BESO from the full design. Return (x, history), where history is a
list of (target volume, volume, compliance) per iteration."""
n = len(net.bars)
x = [F(1)] * n # @line L1
total = sum(net.volume(e) for e in range(n))
vt = total
prev = None
hist = []
for it in range(maxit): # @line L2
u, c = solve(net, x, p) # @line L3
vol = sum(net.volume(e) for e in range(n) if x[e] == 1)
hist.append((vt, vol, c))
cs = [h[2] for h in hist]
if vt == target_volume and len(cs) >= 2 * window: # @line L4
a, b = sum(cs[-window:]), sum(cs[-2 * window:-window])
if abs(a - b) <= tau * a:
break
alpha = sensitivities(net, x, u, p) # @line L5
if prev is not None:
alpha = [(a + b) / 2 for a, b in zip(alpha, prev)] # @line L6
prev = alpha
vt = max(F(target_volume), vt * (1 - er)) # @line L7
x = update(net, x, alpha, vt, ar_max, xmin)
return x, hist # @line L11
def parallel_bars(lengths, areas, force=1):
"""Bars between a wall (node 0) and a rigid plate. The plate is modeled by
giving every bar the same end node 1, which carries the load."""
bars = [(0, 1, L, A) for L, A in zip(lengths, areas)]
return Network(2, bars, [0], {1: force})
def series_bars(lengths, areas, force=1):
"""A chain of bars from a wall, loaded at the free end."""
bars = [(e, e + 1, L, A) for e, (L, A) in enumerate(zip(lengths, areas))]
return Network(len(bars) + 1, bars, [0], {len(bars): force})
def brute_force(net, target_volume, p=3, xmin=F(1, 1000)):
"""The best 0/1 design with volume at most the target, by enumeration."""
n = len(net.bars)
best = None
for mask in range(1 << n):
vol = sum(net.volume(e) for e in range(n) if mask >> e & 1)
if vol > target_volume:
continue
x = [F(1) if mask >> e & 1 else xmin for e in range(n)]
_, c = solve(net, x, p)
if best is None or c < best[0]:
best = (c, mask)
return best
test_beso_method.py 114 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/beso-method/. The authors are listed in prov/0GMFJK.jsonl.
import random
from fractions import Fraction as F
from beso_method import Network, beso, brute_force, parallel_bars, sensitivities, series_bars, solve
XMIN = F(1, 1000)
def test_parallel_bars_closed_form() -> None:
rng = random.Random(1)
for _ in range(50):
n = rng.randint(1, 6)
lengths = [F(rng.randint(1, 20), rng.randint(1, 4)) for _ in range(n)]
areas = [F(rng.randint(1, 9), rng.randint(1, 3)) for _ in range(n)]
u, c = solve(parallel_bars(lengths, areas, 3), [F(1)] * n, 3)
k = sum(a / L for L, a in zip(lengths, areas))
assert u[1] == 3 / k # delta = F / sum(E A_i / L_i)
assert c == 9 / k # compliance F^2 / sum(E A_i / L_i)
def test_series_bars_closed_form() -> None:
rng = random.Random(2)
for _ in range(50):
n = rng.randint(1, 6)
lengths = [F(rng.randint(1, 20), rng.randint(1, 4)) for _ in range(n)]
areas = [F(rng.randint(1, 9), rng.randint(1, 3)) for _ in range(n)]
_, c = solve(series_bars(lengths, areas, 2), [F(1)] * n, 3)
assert c == 4 * sum(L / a for L, a in zip(lengths, areas)) # springs in series
def test_sensitivity_is_minus_one_over_p_times_the_derivative() -> None:
# alpha_e v_e = -(1/p) dC/dx_e, with dC/dx_e = -p x^(p-1) u_e^T k0 u_e / 2 for C = f^T u / 2.
# Check against a central difference quotient on a small network, exactly in Fraction.
net = Network(3, [(0, 1, 2, 1), (1, 2, 1, 2), (0, 2, 3, 1), (0, 1, 1, 1)], [0], {2: 1})
x = [F(1), F(1, 2), F(3, 4), F(1, 5)]
p = 3
u, _ = solve(net, x, p)
alpha = sensitivities(net, x, u, p)
h = F(1, 10**6)
for e in range(4):
xp, xm = list(x), list(x)
xp[e] += h
xm[e] -= h
dc = (solve(net, xp, p)[1] - solve(net, xm, p)[1]) / (2 * h) # d(f^T u)/dx_e
want = -dc / 2 / p # -(1/p) dC/dx_e with C = f^T u / 2
assert abs(alpha[e] * net.volume(e) - want) < F(1, 10**8)
def test_equal_areas_keep_the_shortest_bars_which_is_optimal() -> None:
net = parallel_bars([1, 2, 3, 4, 5, 6], [1] * 6)
x, hist = beso(net, 10, er=F(1, 10))
assert [int(v == 1) for v in x] == [1, 1, 1, 1, 0, 0]
assert hist[-1][1] == 10
c, mask = brute_force(net, 10)
assert mask == 0b001111 and hist[-1][2] == c
def test_equal_areas_random_lengths() -> None:
rng = random.Random(4)
for _ in range(20):
lengths = [F(rng.randint(1, 30), 3) for _ in range(rng.randint(2, 7))]
net = parallel_bars(lengths, [1] * len(lengths))
target = sum(lengths) * F(rng.randint(2, 8), 10)
x, hist = beso(net, target)
c, mask = brute_force(net, target)
assert hist[-1][2] == c # the shortest-first prefix is optimal
def test_unequal_areas_are_a_knapsack_where_beso_is_worse() -> None:
# bar 1: L = 1, A = 1 (stiffness 1, volume 1); bar 2: L = 11/10, A = 10 (stiffness 100/11, volume 11)
net = parallel_bars([1, F(11, 10)], [1, 10])
x, hist = beso(net, 11)
assert [int(v == 1) for v in x] == [1, 0]
c, mask = brute_force(net, 11)
assert mask == 0b10
assert hist[-1][2] > 9 * c # BESO keeps the bar with the higher energy density, 9 times softer
def random_net(rng):
pos = [0, 2, 4, 6]
bars = []
for _ in range(rng.randint(4, 7)):
i, j = sorted(rng.sample(range(4), 2))
bars.append((i, j, pos[j] - pos[i], rng.randint(1, 3)))
for i in range(3):
bars.append((i, i + 1, 2, 1))
return Network(4, bars, [0], {3: 1})
def test_random_networks_feasible_and_not_better_than_brute_force() -> None:
rng = random.Random(3)
for _ in range(25):
net = random_net(rng)
total = sum(net.volume(e) for e in range(len(net.bars)))
x, hist = beso(net, total / 2)
vol = sum(net.volume(e) for e in range(len(net.bars)) if x[e] == 1)
assert vol <= total / 2
assert solve(net, x, 3)[1] == hist[-1][2]
best, _ = brute_force(net, total / 2)
assert hist[-1][2] >= best
assert hist[-1][2] <= 4 * best # measured: at most 3 times worse on this set
def test_volume_schedule() -> None:
net = parallel_bars([1, 2, 3, 4, 5, 6], [1] * 6)
_, hist = beso(net, 10, er=F(1, 10))
targets = [h[0] for h in hist]
assert targets[:3] == [21, F(189, 10), F(1701, 100)]
assert all(a >= b for a, b in zip(targets, targets[1:]))
assert targets[-1] == 10
assert all(h[1] <= h[0] for h in hist)
History
Xie and Steven (1993) proposed evolutionary structural optimization: remove the least stressed elements, a few at a time, until the design stops changing. Querin, Steven and Xie (1998) made it bidirectional by adding elements near the most stressed regions. Zhou and Rozvany (2001) showed with a small example that the removal rule can give a design far from the optimum, which started a debate on the method. Huang and Xie (2007) gave the form used today: sensitivity numbers from the compliance, a mesh-independency filter, an average with the previous iteration and a stop rule on the compliance. Their 2010 book collects the soft-kill form with material interpolation and many applications.
References
- Y. M. Xie and G. P. Steven, A simple evolutionary procedure for structural optimization, Computers and Structures 49(5), 1993, 885 to 896, the removal of the elements with the lowest stress, step by step, until the design reaches a steady state
- O. M. Querin, G. P. Steven and Y. M. Xie, Evolutionary structural optimisation (ESO) using a bidirectional algorithm, Engineering Computations 15(8), 1998, 1031 to 1048, adding elements next to the most stressed regions as well as removing the least stressed ones
- X. Huang and Y. M. Xie, Convergent and mesh-independent solutions for the bi-directional evolutionary structural optimization method, Finite Elements in Analysis and Design 43(14), 2007, 1039 to 1049, the sensitivity numbers, the mesh-independency filter, the averaging with the previous iteration, the evolutionary volume ratio and the stop rule on the compliance
- Xiaodong Huang and Yi Min Xie, Evolutionary Topology Optimization of Continuum Structures, Methods and Applications, Wiley, 2010, the soft-kill BESO with a material interpolation scheme and the admission ratio (general locator)
- M. Zhou and G. I. N. Rozvany, On the validity of ESO type methods in topology optimization, Structural and Multidisciplinary Optimization 21(1), 2001, 80 to 83, a small example where the element removal of ESO gives a highly nonoptimal design
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H1 sketch |
|
| Lean | L0 no Lean part |
|
| Code (python) | I0 not checked yet |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag 0GMFJK Edit this page History Report an error Markdown