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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4838
 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 [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 functions 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: 20
stk_testfun_hartman3


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1776
 STK_TESTFUN_HARTMAN3 computes the "Hartman3" function

    The Hartman3 function is a test function in dimension 3, which is
    part of the famous Dixon & Szego benchmark [1] in global optimization.

    It is usually minimized over [0, 1]^3.

 HISTORICAL REMARKS

    This function belongs to a general class of test functions
    introduced by Hartman [2], hence the name.

    The particular set of coefficients used in the definition of the
    "Hartman3" function, however, seems to have been introduced by [1].

 GLOBAL MINIMUM

    According to [5], the function has one global minimum at

       x = [0.1, 0.55592003, 0.85218259].

    The corresponding function value is:

       f(x) = -3.862634748621772.

    A slightly lower value is attained [4] at

       x = [0.114614 0.554649 0.852547].

    The corresponding function value is:

       f(x) = -3.862747199255087

    The exact global optimum does not appear to be known.

 REFERENCES

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

  [2] J. K. Hartman (1973).  Some experiments in global optimization.
      Naval Research Logistics Quarterly, 20(3):569-576.

  [3] V. Picheny, T. Wagner & D. Ginsbourger (2013).  A benchmark
      of kriging-based infill criteria for noisy optimization.
      Structural and Multidisciplinary Optimization, 48:607-626.

  [4] S. Surjanovic & D. Bingham.  Virtual Library of Simulation
      Experiments: Test Functions and Datasets.  Retrieved March 3,
      2022, https://www.sfu.ca/~ssurjano/hart4.html.

  [5] O. Roustant, D. Ginsbourger & Y. Deville (2012).
      DiceKriging package, version 1.6.0 from 2021-02-23
      URL: https://cran.r-project.org/web/packages/DiceKriging/index.html



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
 STK_TESTFUN_HARTMAN3 computes the "Hartman3" function



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2153
 STK_TESTFUN_HARTMAN4 computes the "Hartman4" function

 CALL: Y = stk_testfun_hartman4 (X)

    computes the value Y of the Hartman4 function at X.

    The Hartman4 function is a test function in dimension 4,
    which is usually minimized over [0, 1]^4. 

 HISTORICAL REMARKS

    This function belongs to a general class of test functions introduced
    by Hartman [1].  The particular set of coefficients used in the
    Hartman4 function seems to have been introduced by [2].

    Note that the test function used in [2] is a scaled version of the
    one implemented here, which can be recovered as follows:

      y = (1.1 + stk_testfun_hartman4 (x)) / 0.839;

    Picheny & co-authors [2] refer to Dixon & Szego [3] for this test
    function, but it turns out that [3] only contains two sorts of
    "Hartman functions", in dimensions three and six.

    In fact, this function appears to have been obtained by truncating
    the sum at the fourth coordinate in the six-dimensional Hartman
    function of [3].

 GLOBAL MINIMUM

    According to [4], the function has one global minimum at

       x = [0.1873 0.1906 0.5566 0.2647].

    The corresponding function value, with our definition of the test
    function, is:

       f(x) = -3.729722308557300.

    Slightly better function values can be found in the neighborhood of
    this point.  For instance, with

       x = [0.18744768 0.19414868 0.558005333 0.26476409]

    we get

       f(x) = -3.729840440436292.

 REFERENCES

  [1] J. K. Hartman (1973).  Some experiments in global optimization.
      Naval Research Logistics Quarterly, 20(3):569-576.

  [2] V. Picheny, T. Wagner & D. Ginsbourger (2013).  A benchmark
      of kriging-based infill criteria for noisy optimization.
      Structural and Multidisciplinary Optimization, 48:607-626.

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

  [4] V. Picheny, D. Ginsbourger & O. Roustant (2021).  DiceOptim:
      Kriging-Based Optimization for Computer Experiments.  R package
      version 2.1.1.  URL: https://CRAN.R-project.org/package=DiceOptim.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
 STK_TESTFUN_HARTMAN4 computes the "Hartman4" function



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1854
 STK_TESTFUN_HARTMAN6 computes the "Hartman6" function

    The Hartman6 function is a test function in dimension 6, which is
    part of the famous Dixon & Szego benchmark [1] in global optimization.

    It is usually minimized over [0, 1]^6.

 HISTORICAL REMARKS

    This function belongs to a general class of test functions
    introduced by Hartman [2], hence the name.

    The particular set of coefficients used in the definition of the
    "Hartman6" function, however, seems to have been introduced by [1].

 GLOBAL MINIMUM

    According to [4], the function has one global minimum at

       x = [0.20169 0.150011 0.476874 0.275332 0.311652 0.657300].

    The corresponding function value is:

       f(x) = -3.322368011391339

    A slightly lower value is attained [5] at

       x = [0.20168952 0.15001069 0.47687398 ...
            0.27533243 0.31165162 0.65730054]

    The corresponding function value is:

       f(x) = -3.322368011415512

    The exact global optimum does not appear to be known.

 REFERENCES

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

  [2] J. K. Hartman (1973).  Some experiments in global optimization.
      Naval Research Logistics Quarterly, 20(3):569-576.

  [3] V. Picheny, T. Wagner & D. Ginsbourger (2013).  A benchmark
      of kriging-based infill criteria for noisy optimization.
      Structural and Multidisciplinary Optimization, 48:607-626.

  [4] S. Surjanovic & D. Bingham.  Virtual Library of Simulation
      Experiments: Test Functions and Datasets.  Retrieved March 3,
      2022, https://www.sfu.ca/~ssurjano/hart4.html.

  [5] O. Roustant, D. Ginsbourger & Y. Deville (2012).
      DiceKriging package, version 1.6.0 from 2021-02-23
      URL: https://cran.r-project.org/web/packages/DiceKriging/index.html



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
 STK_TESTFUN_HARTMAN6 computes the "Hartman6" function



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 27
stk_testfun_hartman_generic


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1763
 STK_TESTFUN_HARTMAN_GENERIC compute the value of a Hartman function

 CALL: Y = stk_testfun_hartman_generic (X, A, P, C)
 
    computes the value Y of the Hartman function with parameters A, P, C,
    at the points contained in X.

    The size of Y is N x 1, where N is the number of rows of X.

    The parameters A, P and C should have size N x D, N x D and 1 x D
    respectively, where D is the number of columns of X.

 HISTORICAL NOTE

    This class of test functions has been introduced by Hartman [2],
    hence the name.  The particular form of Hartman functions considered
    here, however, seems to have been introduced by [1].

    The only difference between the particular form considered in [1] and
    the general form in [2] is that the weighting matrix for the quadratic
    form in the exponential is assumed to be diagonal.

 REFERENCES

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

  [2] J. K. Hartman (1973).  Some experiments in global optimization.
      Naval Research Logistics Quarterly, 20(3):569-576.

  [3] V. Picheny, T. Wagner & D. Ginsbourger (2013).  A benchmark
      of kriging-based infill criteria for noisy optimization.
      Structural and Multidisciplinary Optimization, 48:607-626.

  [4] MCS: Global Optimization by Multilevel Coordinate Search.
      Version 2.0 from Feb. 8, 2000.  Retrieved on March 10, 2022,
      from https://www.mat.univie.ac.at/~neum/software/mcs/

  [5] S. Surjanovic & D. Bingham.  Virtual Library of Simulation
      Experiments: Test Functions and Datasets.  Retrieved March 3,
      2022, https://www.sfu.ca/~ssurjano/hart4.html.

 See also stk_testfun_hartman3, stk_testfun_hartman4, stk_testfun_hartman6



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
 STK_TESTFUN_HARTMAN_GENERIC compute the value of a Hartman 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





