diff --git a/API/controlsClass.m b/API/controlsClass.m index 620d09259..192ed0ffe 100644 --- a/API/controlsClass.m +++ b/API/controlsClass.m @@ -38,7 +38,7 @@ % resampleNPoints : whole number, default: 50 % The number of initial points to use for resampling. % display : displayOptions, default: displayOptions.Iter - % How much RAT should print to the terminal. Can be 'off', 'iter', 'notify', or 'final'. + % How much RAT should print to the terminal. Can be 'off', 'iter', or 'final'. % updateFreq : whole number, default: 1 % [SIMPLEX, DE] Number of iterations between printing progress updates to the terminal. % updatePlotFreq : whole number, default: 20 diff --git a/API/enums/displayOptions.m b/API/enums/displayOptions.m index 7ae064489..19b64d72b 100644 --- a/API/enums/displayOptions.m +++ b/API/enums/displayOptions.m @@ -17,7 +17,6 @@ enumeration Off ('off') Iter ('iter') - Notify ('notify') Final ('final') end end diff --git a/minimisers/simplex/fMinSearch.m b/minimisers/simplex/fMinSearch.m index d843d86c2..d304a12fa 100644 --- a/minimisers/simplex/fMinSearch.m +++ b/minimisers/simplex/fMinSearch.m @@ -44,7 +44,7 @@ % msg = 'ok'; -defaultopt = struct('Display','notify','MaxIter','200*numberOfVariables',... +defaultopt = struct('Display','iter','MaxIter','200*numberOfVariables',... 'MaxFunEvals','200*numberOfVariables','TolX',1e-4,'TolFun',1e-4, ... 'FunValCheck','off','OutputFcn',[],'PlotFcns',[]); @@ -65,8 +65,6 @@ maxiter = optimget(options,'MaxIter',defaultopt,'fast'); switch dis % Changed from TMW fminsearch - case {'notify','notify-detailed'} - prnt = 1; case {'none','off'} prnt = 0; case {'iter','iter-detailed'} diff --git a/minimisers/simplex/runSimplex.m b/minimisers/simplex/runSimplex.m index c002543bd..bb15f6dd3 100644 --- a/minimisers/simplex/runSimplex.m +++ b/minimisers/simplex/runSimplex.m @@ -27,8 +27,6 @@ dis = 'none'; case coderEnums.displayOptions.Iter dis = 'iter'; - case coderEnums.displayOptions.Notify - dis = 'notify'; case coderEnums.displayOptions.Final dis = 'final'; otherwise diff --git a/tests/testControlsClass.m b/tests/testControlsClass.m index 18d8cc009..426e3d76b 100644 --- a/tests/testControlsClass.m +++ b/tests/testControlsClass.m @@ -51,8 +51,6 @@ function testDisplay(testCase) testCase.verifyEqual(testCase.controls.display, displayOptions.Off.value, 'set.display method is not working') testCase.controls.display = displayOptions.Iter.value; testCase.verifyEqual(testCase.controls.display, displayOptions.Iter.value, 'set.display method is not working') - testCase.controls.display = displayOptions.Notify; - testCase.verifyEqual(testCase.controls.display, displayOptions.Notify.value, 'set.display method is not working') testCase.verifyError(@setDisplay, exceptions.invalidOption.errorID); % bad display option function setDisplay testCase.controls.display = 'any'; @@ -424,7 +422,7 @@ function testSetProcedureWithDream(testCase) 'numSimulationPoints', 1000,... 'resampleMinAngle', 0.1,... 'resampleNPoints', 10,... - 'display', displayOptions.Notify.value); + 'display', displayOptions.Final.value); testCase.verifyEqual(testCase.controls.procedure, procedures.Dream.value, 'setProcedure method is not working'); testCase.verifyEqual(testCase.controls.nSamples, 70000, 'setProcedure method is not working'); testCase.verifyEqual(testCase.controls.nChains, 15, 'setProcedure method is not working'); @@ -436,7 +434,7 @@ function testSetProcedureWithDream(testCase) testCase.verifyEqual(testCase.controls.numSimulationPoints, 1000, 'setProcedure method is not working'); testCase.verifyEqual(testCase.controls.resampleMinAngle, 0.1, 'setProcedure method is not working'); testCase.verifyEqual(testCase.controls.resampleNPoints, 10, 'setProcedure method is not working'); - testCase.verifyEqual(testCase.controls.display, displayOptions.Notify.value, 'setProcedure method is not working'); + testCase.verifyEqual(testCase.controls.display, displayOptions.Final.value, 'setProcedure method is not working'); % Test passing invalid parameter values for dream procedure testCase.verifyError(@() testCase.controls.setProcedure(procedures.Dream.value, 'boundHandling', 'invalid'), exceptions.invalidOption.errorID); @@ -472,7 +470,7 @@ function testSetProcedureWithNS(testCase) 'numSimulationPoints', 1000,... 'resampleMinAngle', 0.1,... 'resampleNPoints', 10,... - 'display', displayOptions.Notify.value); + 'display', displayOptions.Final.value); testCase.verifyEqual(testCase.controls.procedure, procedures.NS.value, 'setProcedure method is not working'); testCase.verifyEqual(testCase.controls.nLive, 700, 'setProcedure method is not working'); testCase.verifyEqual(testCase.controls.nMCMC, 5, 'setProcedure method is not working'); @@ -482,7 +480,7 @@ function testSetProcedureWithNS(testCase) testCase.verifyEqual(testCase.controls.numSimulationPoints, 1000, 'setProcedure method is not working'); testCase.verifyEqual(testCase.controls.resampleMinAngle, 0.1, 'setProcedure method is not working'); testCase.verifyEqual(testCase.controls.resampleNPoints, 10, 'setProcedure method is not working'); - testCase.verifyEqual(testCase.controls.display, displayOptions.Notify.value, 'setProcedure method is not working'); + testCase.verifyEqual(testCase.controls.display, displayOptions.Final.value, 'setProcedure method is not working'); % Test passing wrong parameter for NS procedure testCase.verifyError(@() testCase.controls.setProcedure(procedures.NS.value, 'funcTolerance', 1e-6), exceptions.invalidOption.errorID); % Simplex Parameter @@ -521,7 +519,7 @@ function testSetProcedureWithDE(testCase) 'numSimulationPoints', 1000,... 'resampleMinAngle', 0.1,... 'resampleNPoints', 10,... - 'display', displayOptions.Notify.value,... + 'display', displayOptions.Final.value,... 'updateFreq', 1,... 'updatePlotFreq', 4); testCase.verifyEqual(testCase.controls.procedure, procedures.DE.value, 'setProcedure method is not working'); @@ -535,7 +533,7 @@ function testSetProcedureWithDE(testCase) testCase.verifyEqual(testCase.controls.numSimulationPoints, 1000, 'setProcedure method is not working'); testCase.verifyEqual(testCase.controls.resampleMinAngle, 0.1, 'setProcedure method is not working'); testCase.verifyEqual(testCase.controls.resampleNPoints, 10, 'setProcedure method is not working'); - testCase.verifyEqual(testCase.controls.display, displayOptions.Notify.value, 'setProcedure method is not working'); + testCase.verifyEqual(testCase.controls.display, displayOptions.Final.value, 'setProcedure method is not working'); testCase.verifyEqual(testCase.controls.updateFreq, 1, 'setProcedure method is not working'); testCase.verifyEqual(testCase.controls.updatePlotFreq, 4, 'setProcedure method is not working'); @@ -574,7 +572,7 @@ function testSetProcedureWithSimplex(testCase) 'numSimulationPoints', 1000,... 'resampleMinAngle', 0.1,... 'resampleNPoints', 10,... - 'display', displayOptions.Notify.value); + 'display', displayOptions.Final.value); testCase.verifyEqual(testCase.controls.procedure, procedures.Simplex.value, 'setProcedure method is not working'); testCase.verifyEqual(testCase.controls.xTolerance, 3e-6, 'setProcedure method is not working'); testCase.verifyEqual(testCase.controls.funcTolerance, 4e-6, 'setProcedure method is not working'); @@ -586,7 +584,7 @@ function testSetProcedureWithSimplex(testCase) testCase.verifyEqual(testCase.controls.numSimulationPoints, 1000, 'setProcedure method is not working'); testCase.verifyEqual(testCase.controls.resampleMinAngle, 0.1, 'setProcedure method is not working'); testCase.verifyEqual(testCase.controls.resampleNPoints, 10, 'setProcedure method is not working'); - testCase.verifyEqual(testCase.controls.display, displayOptions.Notify.value, 'setProcedure method is not working'); + testCase.verifyEqual(testCase.controls.display, displayOptions.Final.value, 'setProcedure method is not working'); % Test passing wrong parameter for Simplex procedure testCase.verifyError(@() testCase.controls.setProcedure(procedures.Simplex.value, 'crossoverProbability', 0.7), exceptions.invalidOption.errorID); % DE Parameter @@ -611,13 +609,13 @@ function testSetProcedureWithCalculate(testCase) 'numSimulationPoints', 1000,... 'resampleMinAngle', 0.1,... 'resampleNPoints', 10,... - 'display', displayOptions.Notify.value); + 'display', displayOptions.Final.value); testCase.verifyEqual(testCase.controls.procedure, procedures.Calculate.value, 'setProcedure method is not working'); testCase.verifyEqual(testCase.controls.parallel, parallelOptions.Contrasts.value, 'setProcedure method is not working'); testCase.verifyEqual(testCase.controls.numSimulationPoints, 1000, 'setProcedure method is not working'); testCase.verifyEqual(testCase.controls.resampleMinAngle, 0.1, 'setProcedure method is not working'); testCase.verifyEqual(testCase.controls.resampleNPoints, 10, 'setProcedure method is not working'); - testCase.verifyEqual(testCase.controls.display, displayOptions.Notify.value, 'setProcedure method is not working'); + testCase.verifyEqual(testCase.controls.display, displayOptions.Final.value, 'setProcedure method is not working'); % Test passing wrong parameter for Calculate procedure testCase.verifyError(@() testCase.controls.setProcedure(procedures.Calculate.value, 'maxIterations', 100), exceptions.invalidOption.errorID); % Simplex Parameter