Skip to content

Commit

Permalink
Drop LD_LBFGS_NOCEDAL
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Nov 10, 2024
1 parent 258ea60 commit f4e74eb
Show file tree
Hide file tree
Showing 42 changed files with 48 additions and 63 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

* New `NLOPT_LUKSAN` cmake option to build without Luksan LGPL code ([#569]).

* Dropped unused LD_LBFGS_NOCEDAL enum value.

* Various minor bugfixes ([#566], [#564], [#571], [#465], [#563], [#504], [#187])

## NLopt 2.8
Expand Down
2 changes: 0 additions & 2 deletions src/api/general.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ static const char nlopt_algorithm_names[NLOPT_NUM_ALGORITHMS][256] = {
"StoGO (NOT COMPILED)",
"StoGO randomized (NOT COMPILED)",
#endif
"original L-BFGS code by Nocedal et al. (NOT COMPILED)",
"Limited-memory BFGS (L-BFGS) (local, derivative-based)",
"Principal-axis, praxis (local, no-derivative)",
"Limited-memory variable-metric, rank 1 (local, derivative-based)",
Expand Down Expand Up @@ -114,7 +113,6 @@ const char *nlopt_algorithm_to_string(nlopt_algorithm algorithm)
case NLOPT_GN_ORIG_DIRECT_L: return "GN_ORIG_DIRECT_L";
case NLOPT_GD_STOGO: return "GD_STOGO";
case NLOPT_GD_STOGO_RAND: return "GD_STOGO_RAND";
case NLOPT_LD_LBFGS_NOCEDAL: return "LD_LBFGS_NOCEDAL";
case NLOPT_LD_LBFGS: return "LD_LBFGS";
case NLOPT_LN_PRAXIS: return "LN_PRAXIS";
case NLOPT_LD_VAR1: return "LD_VAR1";
Expand Down
2 changes: 0 additions & 2 deletions src/api/nlopt.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ typedef enum {
NLOPT_GD_STOGO,
NLOPT_GD_STOGO_RAND,

NLOPT_LD_LBFGS_NOCEDAL,

NLOPT_LD_LBFGS,

NLOPT_LN_PRAXIS,
Expand Down
2 changes: 1 addition & 1 deletion src/octave/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set (MFILES NLOPT_GN_DIRECT.m NLOPT_GN_DIRECT_L.m NLOPT_GN_DIRECT_L_RAND.m NLOPT_GN_DIRECT_NOSCAL.m NLOPT_GN_DIRECT_L_NOSCAL.m NLOPT_GN_DIRECT_L_RAND_NOSCAL.m NLOPT_GN_ORIG_DIRECT.m NLOPT_GN_ORIG_DIRECT_L.m NLOPT_GD_STOGO.m NLOPT_GD_STOGO_RAND.m NLOPT_LD_LBFGS_NOCEDAL.m NLOPT_LD_LBFGS.m NLOPT_LN_PRAXIS.m NLOPT_LD_VAR1.m NLOPT_LD_VAR2.m NLOPT_LD_TNEWTON.m NLOPT_LD_TNEWTON_RESTART.m NLOPT_LD_TNEWTON_PRECOND.m NLOPT_LD_TNEWTON_PRECOND_RESTART.m NLOPT_GN_CRS2_LM.m NLOPT_GN_MLSL.m NLOPT_GD_MLSL.m NLOPT_GN_MLSL_LDS.m NLOPT_GD_MLSL_LDS.m NLOPT_LD_MMA.m NLOPT_LN_COBYLA.m NLOPT_LN_NEWUOA.m NLOPT_LN_NEWUOA_BOUND.m NLOPT_LN_NELDERMEAD.m NLOPT_LN_SBPLX.m NLOPT_LN_AUGLAG.m NLOPT_LD_AUGLAG.m NLOPT_LN_AUGLAG_EQ.m NLOPT_LD_AUGLAG_EQ.m NLOPT_LN_BOBYQA.m NLOPT_GN_ISRES.m NLOPT_AUGLAG.m NLOPT_AUGLAG_EQ.m NLOPT_G_MLSL.m NLOPT_G_MLSL_LDS.m NLOPT_LD_SLSQP.m NLOPT_LD_CCSAQ.m NLOPT_GN_ESCH.m NLOPT_GN_AGS.m)
set (MFILES NLOPT_GN_DIRECT.m NLOPT_GN_DIRECT_L.m NLOPT_GN_DIRECT_L_RAND.m NLOPT_GN_DIRECT_NOSCAL.m NLOPT_GN_DIRECT_L_NOSCAL.m NLOPT_GN_DIRECT_L_RAND_NOSCAL.m NLOPT_GN_ORIG_DIRECT.m NLOPT_GN_ORIG_DIRECT_L.m NLOPT_GD_STOGO.m NLOPT_GD_STOGO_RAND.m NLOPT_LD_LBFGS.m NLOPT_LN_PRAXIS.m NLOPT_LD_VAR1.m NLOPT_LD_VAR2.m NLOPT_LD_TNEWTON.m NLOPT_LD_TNEWTON_RESTART.m NLOPT_LD_TNEWTON_PRECOND.m NLOPT_LD_TNEWTON_PRECOND_RESTART.m NLOPT_GN_CRS2_LM.m NLOPT_GN_MLSL.m NLOPT_GD_MLSL.m NLOPT_GN_MLSL_LDS.m NLOPT_GD_MLSL_LDS.m NLOPT_LD_MMA.m NLOPT_LN_COBYLA.m NLOPT_LN_NEWUOA.m NLOPT_LN_NEWUOA_BOUND.m NLOPT_LN_NELDERMEAD.m NLOPT_LN_SBPLX.m NLOPT_LN_AUGLAG.m NLOPT_LD_AUGLAG.m NLOPT_LN_AUGLAG_EQ.m NLOPT_LD_AUGLAG_EQ.m NLOPT_LN_BOBYQA.m NLOPT_GN_ISRES.m NLOPT_AUGLAG.m NLOPT_AUGLAG_EQ.m NLOPT_G_MLSL.m NLOPT_G_MLSL_LDS.m NLOPT_LD_SLSQP.m NLOPT_LD_CCSAQ.m NLOPT_GN_ESCH.m NLOPT_GN_AGS.m)
set (M_DATA ${MFILES} nlopt_minimize.m nlopt_minimize_constrained.m)


Expand Down
2 changes: 1 addition & 1 deletion src/octave/NLOPT_AUGLAG.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_AUGLAG
val = 36;
val = 35;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_AUGLAG_EQ.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_AUGLAG_EQ
val = 37;
val = 36;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_GD_MLSL.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_GD_MLSL
val = 21;
val = 20;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_GD_MLSL_LDS.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_GD_MLSL_LDS
val = 23;
val = 22;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_GN_AGS.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_GN_AGS
val = 43;
val = 42;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_GN_CRS2_LM.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_GN_CRS2_LM
val = 19;
val = 18;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_GN_ESCH.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_GN_ESCH
val = 42;
val = 41;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_GN_ISRES.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_GN_ISRES
val = 35;
val = 34;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_GN_MLSL.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_GN_MLSL
val = 20;
val = 19;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_GN_MLSL_LDS.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_GN_MLSL_LDS
val = 22;
val = 21;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_G_MLSL.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_G_MLSL
val = 38;
val = 37;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_G_MLSL_LDS.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_G_MLSL_LDS
val = 39;
val = 38;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_LD_AUGLAG.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_AUGLAG
val = 31;
val = 30;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_LD_AUGLAG_EQ.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_AUGLAG_EQ
val = 33;
val = 32;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_LD_CCSAQ.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_CCSAQ
val = 41;
val = 40;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_LD_LBFGS.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_LBFGS
val = 11;
val = 10;
5 changes: 0 additions & 5 deletions src/octave/NLOPT_LD_LBFGS_NOCEDAL.m

This file was deleted.

2 changes: 1 addition & 1 deletion src/octave/NLOPT_LD_MMA.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_MMA
val = 24;
val = 23;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_LD_SLSQP.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_SLSQP
val = 40;
val = 39;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_LD_TNEWTON.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_TNEWTON
val = 15;
val = 14;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_LD_TNEWTON_PRECOND.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_TNEWTON_PRECOND
val = 17;
val = 16;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_LD_TNEWTON_PRECOND_RESTART.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_TNEWTON_PRECOND_RESTART
val = 18;
val = 17;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_LD_TNEWTON_RESTART.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_TNEWTON_RESTART
val = 16;
val = 15;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_LD_VAR1.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_VAR1
val = 13;
val = 12;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_LD_VAR2.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_LD_VAR2
val = 14;
val = 13;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_LN_AUGLAG.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_LN_AUGLAG
val = 30;
val = 29;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_LN_AUGLAG_EQ.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_LN_AUGLAG_EQ
val = 32;
val = 31;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_LN_BOBYQA.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_LN_BOBYQA
val = 34;
val = 33;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_LN_COBYLA.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_LN_COBYLA
val = 25;
val = 24;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_LN_NELDERMEAD.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_LN_NELDERMEAD
val = 28;
val = 27;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_LN_NEWUOA.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_LN_NEWUOA
val = 26;
val = 25;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_LN_NEWUOA_BOUND.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_LN_NEWUOA_BOUND
val = 27;
val = 26;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_LN_PRAXIS.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_LN_PRAXIS
val = 12;
val = 11;
2 changes: 1 addition & 1 deletion src/octave/NLOPT_LN_SBPLX.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
%
% See nlopt_minimize for more information.
function val = NLOPT_LN_SBPLX
val = 29;
val = 28;
2 changes: 1 addition & 1 deletion src/octave/nlopt_minimize.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
% NLOPT_GN_DIRECT_L_RAND, NLOPT_GN_DIRECT_L_RAND_NOSCAL, NLOPT_GN_DIRECT,
% NLOPT_GN_DIRECT_NOSCAL, NLOPT_GN_ISRES, NLOPT_GN_MLSL_LDS, NLOPT_GN_MLSL,
% NLOPT_GN_ORIG_DIRECT_L, NLOPT_GN_ORIG_DIRECT, NLOPT_LD_AUGLAG_EQ,
% NLOPT_LD_AUGLAG, NLOPT_LD_LBFGS, NLOPT_LD_LBFGS_NOCEDAL, NLOPT_LD_MMA,
% NLOPT_LD_AUGLAG, NLOPT_LD_LBFGS, NLOPT_LD_MMA,
% NLOPT_LD_TNEWTON, NLOPT_LD_TNEWTON_PRECOND,
% NLOPT_LD_TNEWTON_PRECOND_RESTART, NLOPT_LD_TNEWTON_RESTART,
% NLOPT_LD_VAR1, NLOPT_LD_VAR2, NLOPT_LN_AUGLAG_EQ, NLOPT_LN_AUGLAG,
Expand Down
2 changes: 1 addition & 1 deletion src/octave/nlopt_minimize_constrained.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
% NLOPT_GN_DIRECT_L_RAND, NLOPT_GN_DIRECT_L_RAND_NOSCAL, NLOPT_GN_DIRECT,
% NLOPT_GN_DIRECT_NOSCAL, NLOPT_GN_ISRES, NLOPT_GN_MLSL_LDS, NLOPT_GN_MLSL,
% NLOPT_GN_ORIG_DIRECT_L, NLOPT_GN_ORIG_DIRECT, NLOPT_LD_AUGLAG_EQ,
% NLOPT_LD_AUGLAG, NLOPT_LD_LBFGS, NLOPT_LD_LBFGS_NOCEDAL, NLOPT_LD_MMA,
% NLOPT_LD_AUGLAG, NLOPT_LD_LBFGS, NLOPT_LD_MMA,
% NLOPT_LD_TNEWTON, NLOPT_LD_TNEWTON_PRECOND,
% NLOPT_LD_TNEWTON_PRECOND_RESTART, NLOPT_LD_TNEWTON_RESTART,
% NLOPT_LD_VAR1, NLOPT_LD_VAR2, NLOPT_LN_AUGLAG_EQ, NLOPT_LN_AUGLAG,
Expand Down
2 changes: 1 addition & 1 deletion src/octave/nlopt_optimize.m
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
% NLOPT_GN_DIRECT_L_RAND, NLOPT_GN_DIRECT_L_RAND_NOSCAL, NLOPT_GN_DIRECT,
% NLOPT_GN_DIRECT_NOSCAL, NLOPT_GN_ISRES, NLOPT_GN_MLSL_LDS, NLOPT_GN_MLSL,
% NLOPT_GN_ORIG_DIRECT_L, NLOPT_GN_ORIG_DIRECT, NLOPT_LD_AUGLAG_EQ,
% NLOPT_LD_AUGLAG, NLOPT_LD_LBFGS, NLOPT_LD_LBFGS_NOCEDAL, NLOPT_LD_MMA,
% NLOPT_LD_AUGLAG, NLOPT_LD_LBFGS, NLOPT_LD_MMA,
% NLOPT_LD_TNEWTON, NLOPT_LD_TNEWTON_PRECOND,
% NLOPT_LD_TNEWTON_PRECOND_RESTART, NLOPT_LD_TNEWTON_RESTART,
% NLOPT_LD_VAR1, NLOPT_LD_VAR2, NLOPT_LN_AUGLAG_EQ, NLOPT_LN_AUGLAG,
Expand Down
26 changes: 9 additions & 17 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ macro(NLOPT_add_cpp_test test_name)
endforeach()
endmacro()

NLOPT_add_cpp_test(t_tutorial 24 25 31 40)
NLOPT_add_cpp_test(t_tutorial 23 24 30 39)
NLOPT_add_cpp_test(cpp_functor)

NLOPT_add_cpp_test(t_bounded 0 1 2 3 4 5 6 7 8 19 35 42 43)
NLOPT_add_cpp_test(t_bounded 0 1 2 3 4 5 6 7 8 18 34 41 42)
if (NOT NLOPT_CXX)
set_tests_properties (check_t_bounded_8 check_t_bounded_43 PROPERTIES DISABLED TRUE)
set_tests_properties (check_t_bounded_8 check_t_bounded_42 PROPERTIES DISABLED TRUE)
endif ()

# have to add timer.c and mt19937ar.c as symbols are declared extern
Expand All @@ -36,31 +36,23 @@ if (NLOPT_CXX)
set_target_properties(testopt PROPERTIES LINKER_LANGUAGE CXX)
endif ()

foreach (algo_index RANGE 29)# 43
foreach (obj_index RANGE 1)# 21
foreach (algo_index RANGE 28) # 42
foreach (obj_index RANGE 1) # 21
set (enable_ TRUE)
# cxx stogo
# cxx ags/stogo
if (NOT NLOPT_CXX)
if (algo_index STREQUAL 8 OR algo_index STREQUAL 9)
if (algo_index STREQUAL 8 OR algo_index STREQUAL 9 OR algo_index STREQUAL 42)
set (enable_ FALSE)
endif ()
endif ()
# cxx ags
if (NOT NLOPT_CXX AND algo_index STREQUAL 43)
set (enable_ FALSE)
endif ()
# L-BFGS
if (algo_index STREQUAL 10)
set (enable_ FALSE)
endif ()
if (enable_)
add_test (NAME testopt_algo${algo_index}_obj${obj_index} COMMAND testopt -r 0 -a ${algo_index} -o ${obj_index})
if (CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
set_tests_properties (testopt_algo${algo_index}_obj${obj_index} PROPERTIES ENVIRONMENT "PATH=${PROJECT_BINARY_DIR}\\${CMAKE_BUILD_TYPE};$ENV{PATH}") # to load dll
endif ()
# Check if LUKSAN targets are available.
if (NOT NLOPT_LUKSAN)
set (list_of_algorithms_requiring_luksan 11 12 13 14 15 16 17 18)
set (list_of_algorithms_requiring_luksan 10 11 12 13 14 15 16 17)
if (algo_index IN_LIST list_of_algorithms_requiring_luksan)
set_tests_properties (testopt_algo${algo_index}_obj${obj_index} PROPERTIES DISABLED TRUE)
endif()
Expand All @@ -74,7 +66,7 @@ if (Python_FOUND AND NUMPY_FOUND AND (SWIG_FOUND OR (EXISTS ${PROJECT_SOURCE_DIR
"PYTHONPATH=${PROJECT_BINARY_DIR}/src/swig"
)

foreach (algo_index 24 25 31 40)
foreach (algo_index 23 24 30 39)
add_test (NAME test_python${algo_index} COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/t_python.py ${algo_index})
set_tests_properties (test_python${algo_index} PROPERTIES ENVIRONMENT "${PYINSTALLCHECK_ENVIRONMENT}")
endforeach()
Expand Down

0 comments on commit f4e74eb

Please sign in to comment.