Evolution of a System of Pipes

The goal is to optimize the positions of the inner nodes of a given pipe-system in such a way, that the total volume of the system, the pressure at the final nodes and the pressure differences over all final nodes become minimal.
This problem is quite difficult as we have opposing goals. The pressure in a pipe with fixed diameter would become less if the pipe would be longer(friction), while the volume would become less if the pipe would be shorter!
This example comes with an editor, written by
Clemens Bertram (up to now only for the ES-version)!
You may set main-node, branching-nodes and final-nodes via mouse-click and position the branching-nodes via drag&drop. To delete a node simply select it with a right mouse-button click (subbranches will also be deleted).

evolving a PrismLens using evolution strategy

  • ES - interface help
  • Evolution Strategy Theory should be an applet here

    evolving a PrismLens using genetic algorithms

  • GA - interface help
  • Genetic Algorithms Theory should be an applet here

    Evolution of a Prism Lens - Problem Info

    The goal is to optimize the positions of the inner nodes of a given pipe-system in such a way, that the total volume of the system, the pressure at the final nodes and the pressure differences over all final nodes become minimal.

    chromosome (genotype representation)

  • evolution strategy

    The pipe-system is endcoded using 5 double values per node. Thus each chromosome consists of 5*n double values, if n is the total number of nodes (inner nodes and final nodes) of the system. We only considered pipe-systems with a binary-tree topology, however one could easily overcome this restriction by extending the tree encoding. In case of the binary-tree let (x,y,d,ln,rn) be the 5 double values used to encode a single node, where (x,y) is the nodes position, d its diameter, ln the number of its left successor (possibly -1, if there is none) and rn the the number of its right successor (possibly -1, if there is none), then the example below shows how the full tree is encoded.

      // full tree encoding: for each node ( x,y,r,e1,e2 );
      // x,y:    postions of node
      // r    :    radius of pipe at node
      // e1,e2: outgoing edges (-1 if no edge)  
      double oopars[]= { 125,140, 8.00,  1, -1, // node 0: main node
                         125,139, 8.00,  2,  9, // node 1: inner node -> node 2 and node 9 
                         123,138, 4.00,  3,  6, // node 2: inner node -> node 3 and node 6
                         121,139, 3.18,  4,  5, // node 3: inner node -> node 4 and node 5
                          20,120, 2.52, -1, -1, // node 4: final node
                          25,100, 2.52, -1, -1, // node 5: final node
                         121,137, 3.18,  7,  8, // node 6: inner node -> node 7 and node 8
                          30, 80, 2.52, -1, -1, // node 7: final node
                          40, 70, 2.52, -1, -1, // ...
                         127,138, 6.34, 10, 21,
                         125,136, 5.04, 11, 18,
                         123,135, 4.00, 12, 15,
                         121,133, 3.18, 13, 14,
                          60, 50, 2.52, -1, -1,
                          75, 35, 2.52, -1, -1,
                         127,133, 3.18, 16, 17,
                          95, 25, 2.52, -1, -1,
                         115, 30, 2.52, -1, -1,
                         128,132, 3.18, 19, 20,
                         140, 32, 2.52, -1, -1,
                         155, 25, 2.52, -1, -1,
                         130,136, 4.00, 22, 25,
                         130,134, 3.18, 23, 24,
                         175, 35, 2.52, -1, -1,
                         190, 40, 2.52, -1, -1,
                         132,136, 4.00, 26, 29,
                         132,133, 3.18, 27, 28,
                         215, 55, 2.52, -1, -1,
                         225, 65, 2.52, -1, -1,
                         134,135, 3.18, 30, 31,
                         240, 80, 2.52, -1, -1,
                         240,100, 2.52, -1, -1 }; 
    
       double ospars[]= { 0,0,0,0,0,  1,1,0,0,0,  1,1,0,0,0,  1,1,0,0,0,
                          0,0,0,0,0,  0,0,0,0,0,  1,1,0,0,0,  0,0,0,0,0,
                          0,0,0,0,0,  1,1,0,0,0,  1,1,0,0,0,  1,1,0,0,0,
                          1,1,0,0,0,  0,0,0,0,0,  0,0,0,0,0,  1,1,0,0,0,
                          0,0,0,0,0,  0,0,0,0,0,  1,1,0,0,0,  0,0,0,0,0,
                          0,0,0,0,0,  1,1,0,0,0,  1,1,0,0,0,  0,0,0,0,0,
                          0,0,0,0,0,  1,1,0,0,0,  1,1,0,0,0,  0,0,0,0,0, 
                          0,0,0,0,0,  1,1,0,0,0,  0,0,0,0,0,  0,0,0,0,0 };
    
    The strategy parameters are unequal 0 only for the positions of inner nodes, as we
    only want to optimize these positions.
    The optimal diameter grading for the pipes is given by di+1= di^(3/2) [Zerbst, "Bionik", p.138]. 
    
  • genetic algorithms
    For each inner node the offset-coordinates dx and dy to its parent-node are stored in the chromosome. The offsets are BCD encoded and the highest bit (here bit 5) serves as sign.
       [[011010][110111] //'position node 1' = 'position node 0' + ( 26,-23) 
        [001101][011110] //'position node 2' = 'position node 1' + ( 13, 30)
        [000101][011000] //'position node 3' = 'position node 2' + (  5, 24)
        [101110][001010] //'position node 6' = 'position node 2' + (-14, 10) 
        [010011][010110] //'position node 9' = 'position node 1' + ( 19, 21)
        [000110][111011] //'position node 10'= 'position node 9' + (  5,-27)
        [110010][111001] //...
        [110000][111100]
        [011011][011111]
        [111100][111000]
        [111111][011110]
        [001011][111101]
        [000000][101111]
        [011101][000010]
        [100010][001001]]
    
    
  • drawing the chromsome (phenotype representation)

    This is quite easy using the encoding above. For each node in the chromosome simply draw a circle at (x,y) with radius d and then draw lines to its successors ln and rn( no line is drawn if ln,rn is(are) -1).

    quality function

    The total volume, the pressure differences at the final nodes and the pressure at the final nodes is to become minimal.

    Pi is the pressure at the i.th final node;
    PM is the mean pressure for the final nodes;
    Vtot is the total volume of the pipe-system;
    a,b,c are constants;