From 5308106ebd63f1d995408db2bc6de29ca2925d49 Mon Sep 17 00:00:00 2001 From: ZaellixA <axilleaz@protonmail.com> Date: Wed, 22 Jan 2025 11:17:57 +0000 Subject: [PATCH] Fix a bug where the locSearchMethod could not be an array of characters --- Optimisation/Memetic Algorithm/MATLAB/Functions/memAlg.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Optimisation/Memetic Algorithm/MATLAB/Functions/memAlg.m b/Optimisation/Memetic Algorithm/MATLAB/Functions/memAlg.m index ee29280..969dad2 100644 --- a/Optimisation/Memetic Algorithm/MATLAB/Functions/memAlg.m +++ b/Optimisation/Memetic Algorithm/MATLAB/Functions/memAlg.m @@ -3,7 +3,7 @@ % Author: Achilles Kappis % e-mail: axilleaz@protonmail.com % -% Date: 09/02/2024 (DD/MM/YYYY) +% Date: 22/01/2025 (DD/MM/YYYY) % % Copyright: MIT % -------------------------------------------------- @@ -540,7 +540,7 @@ function [bestSol, bestFitVal] = memAlg(fitFunc, constrFunc, divFunc, ... % Func locSearchOpts.locSearchSel (1, 1) string {mustBeTextScalar, mustBeMember(locSearchOpts.locSearchSel, {'Random', 'Roulette', 'RankSpace', 'FitAndDiv', 'Best'}), mustBeNonempty} = "Best"; locSearchOpts.locSearchRankSpace (1, 1) {mustBeNumeric, mustBeScalarOrEmpty, mustBeNonnegative, mustBeNonNan, mustBeFinite, mustBeReal, mustBeNonempty} = 10; locSearchOpts.locSearchFreq (1, 1) {mustBeNumeric, mustBeScalarOrEmpty, mustBeNonnegative, mustBeNonnegative, mustBeNonNan, mustBeNonempty, mustBeReal, mustBeInteger, mustBeFinite} = 10; - locSearchOpts.locSearchMeth (1, 1) {mustBeTextScalar, mustBeMember(locSearchOpts.locSearchMeth, {'Full', 'Greedy'}), mustBeNonempty} = "Full"; + locSearchOpts.locSearchMeth (1, 1) string {mustBeTextScalar, mustBeMember(locSearchOpts.locSearchMeth, {'Full', 'Greedy'}), mustBeNonempty} = "Full"; locSearchOpts.nNeighbourPts (1, 1) {mustBeScalarOrEmpty, mustBeNumeric, mustBeNonNan, mustBeReal, mustBeInteger, mustBeNonempty, mustBePositive, mustBeFinite} = 100; locSearchOpts.nIters (1, 1) {mustBeScalarOrEmpty, mustBeNumeric, mustBeFinite, mustBeNonNan, mustBeInteger, mustBeReal, mustBeNonempty, mustBePositive} = 100; locSearchOpts.stepSize {mustBeNumeric, mustBeNonNan, mustBeFinite, mustBeNonempty} = 0.1; -- GitLab