# doc-cache created by Octave 6.4.0
# name: cache
# type: cell
# rows: 3
# columns: 7
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
stk_testcase_truss3


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4853
 STK_TESTCASE_TRUSS3 provides information about the 'truss3' test case

 CALL: TC = stk_testcase_truss3 ()

    returns a structure TC that describes the 'truss3' test case, borrowed
    from [1, chapter 9].  This structure contains two fields:

     * .constants: all the numerical constants for this problem,

     * .search_domain: an stk_hrect object that specifies the search domain
       of the optimization problem.

 TEST CASE OVERVIEW

    The system considered in this test case is the following 3-bar truss:

                 <---------  D  ----------->
                 <--- w --->
           ------A==========B==============C------
                  \_        |           __/    ^
                    \_      | (2)    __/       |
                      \_    |     __/          L
                   (1)  \_  |  __/   (3)       |
                          \_P_/                v

    Nodes A, B and C are fixed (pin joints).  Node P is submitted to both an
    horizontal load F1 (e.g., wind) and a vertical load F2 (suspended load).

    The design variables are the cross-sections a1, a2 and a3 of the three
    bars, and the horizontal position w of the vertical bar.  The quantities
    of interest are the total volume of the structure, the mechanical
    (tensile) stress in the bars, and the displacement of P.  Various
    formulations of optimization problems can be considered, depending on
    which quantities are selected as contraints and objectives, and whether
    or not uncertainties are taken into account (robust formulations).

 NUMERICAL CONSTANTS

    The numerical values borrowed from [1] have been converted to SI
    units.  The fields of TC.constants are:

     *       .D: truss width [m],
     *       .L: length of the vertical bar [m],
     *       .E: Young's modulus [Pa],

     *   .a_min: minimal cross-section [m^2],
     *   .a_max: maximal cross-section [m^2],
     *   .w_min: minimal value of the position of the vertical bar [m],
     *   .w_max: maximal value of the position of the vertical bar [m],

     * .F1_mean: mean (nominal) value of the horizontal load [N],
     *  .F1_std: standard deviation of the horizontal load [N],
     * .F2_mean: mean (nominal) value of the vertical load [N]
     *  .F2_std: standard deviation of the vertical load [N].

    The standard deviations .F1_std and .F2_std are used in the formulation
    of robust optimization problems related to this test case [see 1, chap 11].
    
 NUMERICAL FUNCTIONS

    Two numerical functions are provided to compute the quantities of interest
    of this test case:

     * stk_testfun_truss3_vol: computes the total volume of the structure,

     * stk_testfun_truss3_bb: computes the tensile stress in the bars and the
       displacement of P.

    Both functions have the same syntax:

       V = stk_testfun_truss3_vol (X, CONST)

       Z = stk_testfun_truss3_bb (X, CONST)

    where CONST is a structure containing the necessary numerical constants.
    To use the constants from [1], pass TC.constants as second input argument.

    Both function accept as first input argument an N x D matrix (or data
    frame) where D is either 4 or 6:

     * columns 1--3: cross-section a1, a2 and a3,

     * column 4: position w of the horizontal bar,

     * column 5-6 (optional): horizontal and vertical loads F1, F2.

    The second function is named 'bb' for 'black box', as it plays the role of
    a (supposedly expensive to evaluate) black box computer model for this
    test case.  The output Z has five columns, corresponding to:

     * columns 1--2: horizontal and vertical displacement y1, y2 of P,

     * columns 3--5: tensile stress sigma_j in bars j = 1, 2 and 3.

 EXAMPLE

     tc = stk_testcase_truss3 ();  n = 5;

     % Draw 5 points uniformly in the 4D input domain ("design space")
     xd = stk_sampling_randunif (n, [], tc.search_domain)

     % Compute the volumes
     v = stk_testfun_truss3_vol (xd, tc.constants)

     % Compute displacements and stresses for nominal loads
     z = stk_testfun_truss3_bb (xd, tc.constants)

     % Draw loads from normal distributions
     F = stk_dataframe (zeros (n, 2), {'F1' 'F2'});
     F(:, 1) = tc.constants.F1_mean + tc.constants.F1_std * randn (n, 1);
     F(:, 2) = tc.constants.F2_mean + tc.constants.F2_std * randn (n, 1);

     % Compute displacements and stresses for the random loads
     x = [xd F]
     z = stk_testfun_truss3_bb (x, tc.constants)

 REFERENCE

  [1] Indraneel Das,  Nonlinear Multicriteria Optimization and Robust
      Optimality.  PhD thesis,  Rice University,  1997.

  [2] Juhani Koski,   Defectiveness of weighting method in multicriterion
      optimization of structures.  Int. J. for Numerical Methods in
      Biomedical Engineering,  1(6):333-337,  1985.

 See also: stk_testfun_truss3_vol, stk_testfun_truss3_bb



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 70
 STK_TESTCASE_TRUSS3 provides information about the 'truss3' test case



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
stk_testfun_borehole


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1837
 STK_TESTFUN_BOREHOLE computes the "borehole model" response function

 CALL: Y = stk_testfun_borehole (X)

    computes the responses Y(i, :) of the "borehole model" [1-3] for the
    input vectors X(i, :).

    The output Y is the water flow rate through the borehole (m3/yr).

    The input variables (columns of X) are:

       X(:, 1) = rw   radius of borehole (m),
       X(:, 2) = r    radius of influence (m),
       X(:, 3) = Tu   transmissivity of upper aquifer (m2/yr),
       X(:, 4) = Hu   potentiometric head of upper aquifer (m),
       X(:, 5) = Tl   transmissivity of lower aquifer (m2/yr),
       X(:, 6) = Hl   potentiometric head of lower aquifer (m),
       X(:, 7) = L    length of borehole (m),
       X(:, 8) = Kw   hydraulic conductivity of borehole (m/yr),

    and their usual domain of variation is:

       input_domain = stk_hrect ([                                  ...
           0.05    100   63070    990   63.1    700  1120   9855;   ...
           0.15  50000  115600   1110  116.0    820  1680  12045],  ...
          {'rw',  'r',    'Tu',  'Hu',  'Tl',  'Hl',  'L',  'Kw'})

 REFERENCES

  [1] Harper, W. V. & Gupta, S. K. (1983).  Sensitivity/uncertainty analysis
      of a borehole scenario comparing Latin Hypercube Sampling and determinis-
      tic sensitivity approaches.  Technical report BMI/ONWI-516,  Battelle
      Memorial Inst., Office of Nuclear Waste Isolation, Columbus, OH (USA).

  [2] Morris, M. D., Mitchell, T. J. & Ylvisaker, D. (1993).  Bayesian design
      and analysis of computer experiments: use of derivatives in surface
      prediction.  Technometrics, 35(3):243-255.

  [3] Surjanovic, S. & Bingham, D.  Virtual Library of Simulation Experiments:
      Test Functions and Datasets.  Retrieved February 1, 2016, from
      http://www.sfu.ca/~ssurjano/borehole.html. 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
 STK_TESTFUN_BOREHOLE computes the "borehole model" response function



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
stk_testfun_braninhoo


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 681
 STK_TESTFUN_BRANINHOO computes the Branin-Hoo function.

    The Branin-Hoo function (Branin and Hoo, 1972) is a classical test
    function for global optimization algorithms, which belongs to the
    well-known Dixon-Szego test set (Dixon and Szego, 1978). It is usually
    minimized over [-5; 10] x [0; 15].

 REFERENCES

  [1] Branin, F. H. and Hoo, S. K. (1972), A Method for Finding Multiple
      Extrema of a Function of n Variables, in Numerical methods of
      Nonlinear Optimization (F. A. Lootsma, editor, Academic Press,
      London), 231-237.

  [2] Dixon L.C.W., Szego G.P., Towards Global Optimization 2, North-
      Holland, Amsterdam, The Netherlands (1978)



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
 STK_TESTFUN_BRANINHOO computes the Branin-Hoo function.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
stk_testfun_goldsteinprice


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 631
 STK_TESTFUN_GOLDSTEINPRICE computes the Goldstein-Price function

    The Goldstein-Price function [1] is a classical test function for
    global optimization algorithms, which belongs to the well-known
    Dixon-Szego test set [2].

    It is usually minimized over [-2; 2] x [-2; 2]. It has a unique
    global minimum at x = [0, -1] with f(x) = 3, and several local minima.

 REFERENCES

  [1] Goldstein, A.A. and Price, I.F. (1971), On descent from local
      minima. Mathematics of Computation, 25(115).

  [2] Dixon L.C.W., Szego G.P. (1978), Towards Global Optimization 2,
      North-Holland, Amsterdam, The Netherlands



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
 STK_TESTFUN_GOLDSTEINPRICE computes the Goldstein-Price function



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
stk_testfun_truss3_bb


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 173
 STK_TESTFUN_TRUSS3_BB computes displacements and stresses for 'truss3'

 CALL: Z = stk_testfun_truss3_bb (X, CONST)

 See also: stk_testcase_truss3, stk_testfun_truss3_vol



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 71
 STK_TESTFUN_TRUSS3_BB computes displacements and stresses for 'truss3'



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
stk_testfun_truss3_vol


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 171
 STK_TESTFUN_TRUSS3_VOL computes the volume of the 'truss3' structure

 CALL: V = stk_testfun_truss3_vol (X, CONST)

 See also: stk_testcase_truss3, stk_testfun_truss3_bb



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
 STK_TESTFUN_TRUSS3_VOL computes the volume of the 'truss3' structure



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
stk_testfun_twobumps


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 288
 STK_TESTFUN_TWOBUMPS computes the TwoBumps response function

 CALL: Z = stk_testfun_twobumps (X)

    computes the response Z of the TwoBumps function at X.

    The TwoBumps function is defined as:

       TwoBumps(x) = - (0.7x + sin(5x + 1) + 0.1 sin(10x))

    for x in [-1.0; 1.0].



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
 STK_TESTFUN_TWOBUMPS computes the TwoBumps response function





