Skip to content

Commit

Permalink
examples/test_functions: Polish copying permission statements
Browse files Browse the repository at this point in the history
* examples/test_functions/stk_testcase_truss3.m: Polish copying
  permission statement.
* examples/test_functions/stk_testfun_hartman3.m: Idem.
* examples/test_functions/stk_testfun_hartman4.m: Idem.
* examples/test_functions/stk_testfun_hartman6.m: Idem.
* examples/test_functions/stk_testfun_hartman_generic.m: Idem.
* examples/test_functions/stk_testfun_sixhumpscamel.m: Idem.
* examples/test_functions/stk_testfun_threehumpscamel.m: Idem.
* examples/test_functions/stk_testfun_truss3_bb.m: Idem.
* examples/test_functions/stk_testfun_truss3_vol.m: Idem.
* examples/test_functions/stk_testfun_twobumps.m: Idem.
* examples/test_functions/stk_testfun_braninhoo.m: Source formatting
  • Loading branch information
jbect committed Oct 29, 2024
1 parent f876eaf commit 0438d3f
Show file tree
Hide file tree
Showing 13 changed files with 131 additions and 103 deletions.
17 changes: 17 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
2024-10-29 Julien Bect <[email protected]>

examples/test_functions: Polish copying permission statements

* examples/test_functions/stk_testcase_truss3.m: Polish copying
permission statement.
* examples/test_functions/stk_testfun_hartman3.m: Idem.
* examples/test_functions/stk_testfun_hartman4.m: Idem.
* examples/test_functions/stk_testfun_hartman6.m: Idem.
* examples/test_functions/stk_testfun_hartman_generic.m: Idem.
* examples/test_functions/stk_testfun_sixhumpscamel.m: Idem.
* examples/test_functions/stk_testfun_threehumpscamel.m: Idem.
* examples/test_functions/stk_testfun_truss3_bb.m: Idem.
* examples/test_functions/stk_testfun_truss3_vol.m: Idem.
* examples/test_functions/stk_testfun_twobumps.m: Idem.
* examples/test_functions/stk_testfun_braninhoo.m: Source formatting

2024-10-27 Julien Bect <[email protected]>

examples/test_functions: Polish doc
Expand Down
19 changes: 10 additions & 9 deletions examples/test_functions/stk_testcase_truss3.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
%
% 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
Expand Down Expand Up @@ -128,17 +128,18 @@
%
% See also: stk_testfun_truss3_vol, stk_testfun_truss3_bb

% Author
%
% Julien Bect <[email protected]>

% Copying Permission Statement (this file)
%
% To the extent possible under law, CentraleSupelec has waived all
% copyright and related or neighboring rights to
% stk_testcase_truss3.m. This work is published from France.
% Written in 2017 by Julien Bect <[email protected]>
%
% License: CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
% To the extent possible under law, CentraleSupelec has dedicated all
% copyright and related and neighboring rights to this software to the
% public domain worldwide. This software is distributed without any
% warranty.
%
% You should have received a copy of the CC0 Public Domain Dedication
% along with this software. If not, see
% <http://creativecommons.org/publicdomain/zero/1.0/>.

% Copyright Notice
%
Expand Down
2 changes: 1 addition & 1 deletion examples/test_functions/stk_testfun_borehole.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
%
% [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.
% http://www.sfu.ca/~ssurjano/borehole.html.

% Copyright Notice
%
Expand Down
17 changes: 9 additions & 8 deletions examples/test_functions/stk_testfun_braninhoo.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,18 @@
% [2] Dixon L.C.W., Szego G.P., Towards Global Optimization 2, North-
% Holland, Amsterdam, The Netherlands (1978)

% Author
%
% Julien Bect <[email protected]>

% Copying Permission Statement (this file)
%
% To the extent possible under law, CentraleSupelec has waived all
% copyright and related or neighboring rights to
% stk_testfun_braninhoo.m. This work is published from France.
% Written in 2012 by Julien Bect <[email protected]>
%
% To the extent possible under law, CentraleSupelec has dedicated all
% copyright and related and neighboring rights to this software to the
% public domain worldwide. This software is distributed without any
% warranty.
%
% License: CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
% You should have received a copy of the CC0 Public Domain Dedication
% along with this software. If not, see
% <http://creativecommons.org/publicdomain/zero/1.0/>.

% Copying Permission Statement (STK toolbox as a whole)
%
Expand Down
17 changes: 9 additions & 8 deletions examples/test_functions/stk_testfun_hartman3.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,18 @@
% DiceKriging package, version 1.6.0 from 2021-02-23
% URL: https://cran.r-project.org/web/packages/DiceKriging/index.html

% Author
%
% Julien Bect <[email protected]>

% Copying Permission Statement (this file)
%
% To the extent possible under law, CentraleSupelec has waived all
% copyright and related or neighboring rights to
% stk_testfun_hartman3.m. This work is published from France.
% Written in 2022 by Julien Bect <[email protected]>
%
% To the extent possible under law, CentraleSupelec has dedicated all
% copyright and related and neighboring rights to this software to the
% public domain worldwide. This software is distributed without any
% warranty.
%
% License: CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
% You should have received a copy of the CC0 Public Domain Dedication
% along with this software. If not, see
% <http://creativecommons.org/publicdomain/zero/1.0/>.

% Copying Permission Statement (STK toolbox as a whole)
%
Expand Down
19 changes: 10 additions & 9 deletions examples/test_functions/stk_testfun_hartman4.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
% 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.
% which is usually minimized over [0, 1]^4.
%
% HISTORICAL REMARKS
%
Expand Down Expand Up @@ -62,17 +62,18 @@
% Kriging-Based Optimization for Computer Experiments. R package
% version 2.1.1. URL: https://CRAN.R-project.org/package=DiceOptim.

% Author
%
% Julien Bect <[email protected]>

% Copying Permission Statement (this file)
%
% To the extent possible under law, CentraleSupelec has waived all
% copyright and related or neighboring rights to
% stk_testfun_hartman4.m. This work is published from France.
% Written in 2022 by Julien Bect <[email protected]>
%
% To the extent possible under law, CentraleSupelec has dedicated all
% copyright and related and neighboring rights to this software to the
% public domain worldwide. This software is distributed without any
% warranty.
%
% License: CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
% You should have received a copy of the CC0 Public Domain Dedication
% along with this software. If not, see
% <http://creativecommons.org/publicdomain/zero/1.0/>.

% Copying Permission Statement (STK toolbox as a whole)
%
Expand Down
17 changes: 9 additions & 8 deletions examples/test_functions/stk_testfun_hartman6.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,18 @@
% DiceKriging package, version 1.6.0 from 2021-02-23
% URL: https://cran.r-project.org/web/packages/DiceKriging/index.html

% Author
%
% Julien Bect <[email protected]>

% Copying Permission Statement (this file)
%
% To the extent possible under law, CentraleSupelec has waived all
% copyright and related or neighboring rights to
% stk_testfun_hartman6.m. This work is published from France.
% Written in 2022 by Julien Bect <[email protected]>
%
% To the extent possible under law, CentraleSupelec has dedicated all
% copyright and related and neighboring rights to this software to the
% public domain worldwide. This software is distributed without any
% warranty.
%
% License: CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
% You should have received a copy of the CC0 Public Domain Dedication
% along with this software. If not, see
% <http://creativecommons.org/publicdomain/zero/1.0/>.

% Copying Permission Statement (STK toolbox as a whole)
%
Expand Down
19 changes: 10 additions & 9 deletions examples/test_functions/stk_testfun_hartman_generic.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
% 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.
%
Expand Down Expand Up @@ -42,10 +42,6 @@
%
% See also stk_testfun_hartman3, stk_testfun_hartman4, stk_testfun_hartman6

% Author
%
% Julien Bect <[email protected]>

% IMPLEMENTATION
%
% This implementation has been written from scratch using [1, 3] as
Expand All @@ -55,11 +51,16 @@

% Copying Permission Statement (this file)
%
% To the extent possible under law, CentraleSupelec has waived all
% copyright and related or neighboring rights to
% stk_testfun_hartman_generic.m. This work is published from France.
% Written in 2022 by Julien Bect <[email protected]>
%
% To the extent possible under law, CentraleSupelec has dedicated all
% copyright and related and neighboring rights to this software to the
% public domain worldwide. This software is distributed without any
% warranty.
%
% License: CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
% You should have received a copy of the CC0 Public Domain Dedication
% along with this software. If not, see
% <http://creativecommons.org/publicdomain/zero/1.0/>.

% Copying Permission Statement (STK toolbox as a whole)
%
Expand Down
17 changes: 9 additions & 8 deletions examples/test_functions/stk_testfun_sixhumpscamel.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,19 @@
% Modelling and Numerical Optimisation, Vol. 4, No. 2, pp. 150–194
% (2013).

% Author
% Copying Permission Statement (this file)
%
% Written in 2024 by Romain Ait Abdelmalek-Lomenech
% <[email protected]>

% Copying Permission Statement (this file)
% <[email protected]>
%
% To the extent possible under law, CentraleSupelec has waived all
% copyright and related or neighboring rights to
% stk_testfun_sixhumpscamel.m. This work is published from France.
% To the extent possible under law, CentraleSupelec has dedicated all
% copyright and related and neighboring rights to this software to the
% public domain worldwide. This software is distributed without any
% warranty.
%
% License: CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
% You should have received a copy of the CC0 Public Domain Dedication
% along with this software. If not, see
% <http://creativecommons.org/publicdomain/zero/1.0/>.

% Copying Permission Statement (STK toolbox as a whole)
%
Expand Down
17 changes: 9 additions & 8 deletions examples/test_functions/stk_testfun_threehumpscamel.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,19 @@
% Modelling and Numerical Optimisation, Vol. 4, No. 2, pp. 150–194
% (2013).

% Author
% Copying Permission Statement (this file)
%
% Written in 2024 by Romain Ait Abdelmalek-Lomenech
% <[email protected]>

% Copying Permission Statement (this file)
% <[email protected]>
%
% To the extent possible under law, CentraleSupelec has waived all
% copyright and related or neighboring rights to
% stk_testfun_threehumpscamel.m. This work is published from France.
% To the extent possible under law, CentraleSupelec has dedicated all
% copyright and related and neighboring rights to this software to the
% public domain worldwide. This software is distributed without any
% warranty.
%
% License: CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
% You should have received a copy of the CC0 Public Domain Dedication
% along with this software. If not, see
% <http://creativecommons.org/publicdomain/zero/1.0/>.

% Copying Permission Statement (STK toolbox as a whole)
%
Expand Down
37 changes: 19 additions & 18 deletions examples/test_functions/stk_testfun_truss3_bb.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@
%
% See also: stk_testcase_truss3, stk_testfun_truss3_vol

% Author
%
% Julien Bect <[email protected]>

% Copying Permission Statement (this file)
%
% To the extent possible under law, CentraleSupelec has waived all
% copyright and related or neighboring rights to
% stk_testfun_truss3_bb.m. This work is published from France.
% Written in 2017 by Julien Bect <[email protected]>
%
% License: CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
% To the extent possible under law, CentraleSupelec has dedicated all
% copyright and related and neighboring rights to this software to the
% public domain worldwide. This software is distributed without any
% warranty.
%
% You should have received a copy of the CC0 Public Domain Dedication
% along with this software. If not, see
% <http://creativecommons.org/publicdomain/zero/1.0/>.

% Copying Permission Statement (STK toolbox as a whole)
%
Expand Down Expand Up @@ -45,20 +46,20 @@
% Check input size
[n, dim] = size (x_);
switch dim

case 4
% Use nominal loads
F = zeros (n, 2);
F(:, 1) = const.F1_mean;
F(:, 2) = const.F2_mean;
x_ = [x_ F];

case 6
% Loads have been provided as well

otherwise
error ('Incorrect number of variables.');

end

% Extract variables
Expand Down Expand Up @@ -96,23 +97,23 @@
y = zeros (n, 2); % Displacement of node P
s = zeros (n, 3); % Tensile stress in the bars
for i = 1:n

% Rectangular matrix A for Equ. 9.1 in Das (1997) p.65, gives the
% equilibrium relation between tensile forces and loads (small displacements)
A = [cos_theta(i) sin_theta(i); 0 1; -cos_alpha(i) sin_alpha(i)];

% Stiffness matrix
K = A' * (diag (C(i, :))) * A;

% Compute the displacement of node P
y(i, :) = F(i, :) / K;

% Bar elongations
delta = y(i, :) * A';

% Tensile stresses (Hooke's law)
s(i, :) = E * delta ./ LL(i, :);

end

% Output: return displacement of node P and tensile stresses (five outputs)
Expand Down
17 changes: 9 additions & 8 deletions examples/test_functions/stk_testfun_truss3_vol.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@
%
% See also: stk_testcase_truss3, stk_testfun_truss3_bb

% Author
%
% Julien Bect <[email protected]>

% Copying Permission Statement (this file)
%
% To the extent possible under law, CentraleSupelec has waived all
% copyright and related or neighboring rights to
% stk_testfun_truss3_vol.m. This work is published from France.
% Written in 2017 by Julien Bect <[email protected]>
%
% To the extent possible under law, CentraleSupelec has dedicated all
% copyright and related and neighboring rights to this software to the
% public domain worldwide. This software is distributed without any
% warranty.
%
% License: CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
% You should have received a copy of the CC0 Public Domain Dedication
% along with this software. If not, see
% <http://creativecommons.org/publicdomain/zero/1.0/>.

% Copying Permission Statement (STK toolbox as a whole)
%
Expand Down
Loading

0 comments on commit 0438d3f

Please sign in to comment.