diff --git a/resources/MatlabInterface/@JEInterface/JEInterface.m b/resources/MatlabInterface/@JEInterface/JEInterface.m index d647155a..ec96fcb7 100644 --- a/resources/MatlabInterface/@JEInterface/JEInterface.m +++ b/resources/MatlabInterface/@JEInterface/JEInterface.m @@ -1,5 +1,5 @@ function int = JEInterface(interfaceName, fhandle, range, varargin) -% JavaEva Interface for Matlab +% EvA2 Interface for Matlab % JEInterface(interfaceName, fhandle, range [, optset, defaultargs]) % arguments: % interfaceName: a JEInterface instance needs to know its own @@ -9,7 +9,7 @@ function int = JEInterface(interfaceName, fhandle, range, varargin) % upper bounds. % optset: (optional) an optimset struct defining optimization parameters, % especially tolerance and maximum function calls. Defaults to the -% JavaEvA default values. +% EvA2 default values. % defaultArgs: (optional) additional constant argument to the target % function, empty by default. % Recognized options are: @@ -26,7 +26,7 @@ function int = JEInterface(interfaceName, fhandle, range, varargin) % any case, set TolX=TolFun=0 and MaxFunEvals=10^5. int.args = []; -int.opts = optimset('MaxFunEvals', javaeva.OptimizerFactory.getDefaultFitCalls, 'TolX', 1e-4, 'TolFun', 1e-4); +int.opts = optimset('MaxFunEvals', eva2.OptimizerFactory.getDefaultFitCalls, 'TolX', 1e-4, 'TolFun', 1e-4); int.finished = 1; int.result = []; int.resultArr = []; @@ -80,7 +80,7 @@ switch nargin end % finally create the java object -int.mp = javaeva.server.go.problems.MatlabProblem(int.callback, int.dim, int.range); +int.mp = eva2.server.go.problems.MatlabProblem(int.callback, int.dim, int.range); diff --git a/resources/MatlabInterface/@JEInterface/getDesc.m b/resources/MatlabInterface/@JEInterface/getDesc.m index 4cff8225..7f16c9cf 100644 --- a/resources/MatlabInterface/@JEInterface/getDesc.m +++ b/resources/MatlabInterface/@JEInterface/getDesc.m @@ -2,9 +2,9 @@ function desc = getDesc(int, ID) % Return the String description of an indicated optimizer % with member descriptions. -import javaeva.gui.BeanInspector; -import javaeva.server.modules.GOParameters; -import javaeva.OptimizerFactory; +import eva2.gui.BeanInspector; +import eva2.server.modules.GOParameters; +import eva2.OptimizerFactory; params = OptimizerFactory.getParams(ID, int.mp); desc = BeanInspector.getDescription(params.getOptimizer, false); diff --git a/resources/MatlabInterface/@JEInterface/getMessage.m b/resources/MatlabInterface/@JEInterface/getMessage.m index 8a395228..13480432 100644 --- a/resources/MatlabInterface/@JEInterface/getMessage.m +++ b/resources/MatlabInterface/@JEInterface/getMessage.m @@ -1,4 +1,4 @@ function str = getMessage(int) -% Get information string received from JavaEvA. +% Get information string received from EvA2. str = int.msg; diff --git a/resources/MatlabInterface/@JEInterface/getMultipleResults.m b/resources/MatlabInterface/@JEInterface/getMultipleResults.m index 444ead28..2e4bf2e2 100644 --- a/resources/MatlabInterface/@JEInterface/getMultipleResults.m +++ b/resources/MatlabInterface/@JEInterface/getMultipleResults.m @@ -1,6 +1,7 @@ function [sols, fits] = getMultipleResults(int) -% Returns a set of optimization solutions if the run has been finished, or -% a singel intermediate solution if the run has not finished yet or an +% If a post processing step was performed: return a set of +% optimization solutions if the run has been finished, or +% a single intermediate solution if the run has not finished yet or an % empty array if there is no intermediate solution yet. if (isFinished(int)) diff --git a/resources/MatlabInterface/@JEInterface/optimize.m b/resources/MatlabInterface/@JEInterface/optimize.m index f6e59dc9..b5d812a9 100644 --- a/resources/MatlabInterface/@JEInterface/optimize.m +++ b/resources/MatlabInterface/@JEInterface/optimize.m @@ -1,5 +1,5 @@ function retInt = optimize(int, optType, varargin) -% Start a JavaEvA optimization run. +% Start a EvA2 optimization run. % optimize(interface, optType, [, outputFilePrefix ] ) % where % interface: instance of JEInterface @@ -28,11 +28,11 @@ if ((nargin == 2) || (nargin == 3)) maxEvals = int.opts.MaxFunEvals; fTol = int.opts.TolFun; - import javaeva.server.go.operators.terminators.PhenotypeConvergenceTerminator; - import javaeva.server.go.operators.terminators.FitnessConvergenceTerminator; - import javaeva.server.go.operators.terminators.CombinedTerminator; - import javaeva.server.go.operators.terminators.EvaluationTerminator; - import javaeva.OptimizerFactory; + import eva2.server.go.operators.terminators.PhenotypeConvergenceTerminator; + import eva2.server.go.operators.terminators.FitnessConvergenceTerminator; + import eva2.server.go.operators.terminators.CombinedTerminator; + import eva2.server.go.operators.terminators.EvaluationTerminator; + import eva2.OptimizerFactory; % set some default values if theyre not given % fminsearch, for example, always uses TolX and TolFun with default @@ -61,13 +61,13 @@ if ((nargin == 2) || (nargin == 3)) % maxEvals = OptimizerFactory.getDefaultFitCalls; end convTerm = EvaluationTerminator(maxEvals); - javaeva.OptimizerFactory.setTerminator(convTerm); + eva2.OptimizerFactory.setTerminator(convTerm); else % there is a convergence terminator - javaeva.OptimizerFactory.setTerminator(convTerm); % so set it + eva2.OptimizerFactory.setTerminator(convTerm); % so set it if (~isempty(maxEvals) && (maxEvals > 0)) % if TolX/TolFun plus MaxFunEvals is defined additionally, combine an % EvaluationTerminator in disjunction, as Matlab does. - javaeva.OptimizerFactory.addTerminator(EvaluationTerminator(maxEvals), 0); + eva2.OptimizerFactory.addTerminator(EvaluationTerminator(maxEvals), 0); end end diff --git a/resources/MatlabInterface/@JEInterface/optimizeWith.m b/resources/MatlabInterface/@JEInterface/optimizeWith.m index 80b015f2..2f64df12 100644 --- a/resources/MatlabInterface/@JEInterface/optimizeWith.m +++ b/resources/MatlabInterface/@JEInterface/optimizeWith.m @@ -1,5 +1,5 @@ function retInt = optimizeWith(int, optType, varargin) -% Start a JavaEvA optimization run with specific optimizer parameter settings. +% Start a EvA2 optimization run with specific optimizer parameter settings. % optimize(interface, optType, [, outputFilePrefix ] [, memName, memVal]* ) % where % interface: instance of JEInterface @@ -54,4 +54,4 @@ else retInt = optimize(int, optType, output); int.optParams = []; int.optParamValues = []; -end \ No newline at end of file +end diff --git a/resources/MatlabInterface/@JEInterface/runEvalLoopJE.m b/resources/MatlabInterface/@JEInterface/runEvalLoopJE.m index cee8dc85..f29b3b12 100644 --- a/resources/MatlabInterface/@JEInterface/runEvalLoopJE.m +++ b/resources/MatlabInterface/@JEInterface/runEvalLoopJE.m @@ -1,5 +1,5 @@ function int=runEvalLoopJE(int, optOrPostProc, optType, outputFilePrefix, steps, sigmaClust, nBest) -% Internal method starting a JavaEvA optimization loop. +% Internal method starting a EvA2 optimization loop. % Calling this directly may interfere with optimization. % This function handles the communciation between JE and Matlab, main @@ -21,16 +21,16 @@ if ~isempty(int.mediator) end % set up a mediator and inform JE -int.mediator = javaeva.server.go.problems.MatlabEvalMediator; +int.mediator = eva2.server.go.problems.MatlabEvalMediator; int.mp.setMediator(int.mediator); JEMediator=int.mediator; % start the JE thread if (optOrPostProc == 1) - stopText='Stop JavaEvA optimization'; + stopText='Stop EvA2 optimization'; int.mp.optimize(optType, outputFilePrefix, int.optParams, int.optParamValues); else % post processing - stopText='Stop JavaEvA post processing'; + stopText='Stop EvA2 post processing'; int.mp.requestPostProcessing(steps, sigmaClust, nBest); end @@ -44,7 +44,7 @@ if isempty(stopOptimization), stopOptimization = 0; % create a cancel button box (case without SBtoolbox) - boxHandle=figure('Position',[100 600 250 80], 'MenuBar', 'none', 'Name', 'JavaEvA optimization running...', 'NumberTitle','off'); + boxHandle=figure('Position',[100 600 250 80], 'MenuBar', 'none', 'Name', 'EvA2 optimization running...', 'NumberTitle','off'); uicontrol(boxHandle,'Style', 'pushbutton', 'String', 'Cancel', 'Position', [25 25 60 30], 'Callback', 'global stopOptimization; stopOptimization=1;'); uicontrol(boxHandle,'Style', 'text', 'String', stopText, 'Position', [100 25 120 30]); drawnow; diff --git a/resources/MatlabInterface/@JEInterface/setResultArrayJE.m b/resources/MatlabInterface/@JEInterface/setResultArrayJE.m index ab4e2d4a..2c8373e4 100644 --- a/resources/MatlabInterface/@JEInterface/setResultArrayJE.m +++ b/resources/MatlabInterface/@JEInterface/setResultArrayJE.m @@ -1,9 +1,9 @@ function int = setResultArrayJE(int, arrData) -% Interface function to be called by JavaEvA 2. +% Interface function to be called by EvA2. % Write back a whole solution set int.finished = 1; int.msg=int.mp.getInfoString; int.funCalls=int.mp.getFunctionCalls; -int.resultArr = arrData; \ No newline at end of file +int.resultArr = arrData; diff --git a/resources/MatlabInterface/@JEInterface/setResultJE.m b/resources/MatlabInterface/@JEInterface/setResultJE.m index 8e8f808e..6a5edead 100644 --- a/resources/MatlabInterface/@JEInterface/setResultJE.m +++ b/resources/MatlabInterface/@JEInterface/setResultJE.m @@ -1,5 +1,5 @@ function int = setJEResult(int, result) -% Interface function to be called by JavaEvA 2. +% Interface function to be called by EvA2. % Write back the solution and retrieve some additional data. diff --git a/resources/MatlabInterface/@JEInterface/showOptimizers.m b/resources/MatlabInterface/@JEInterface/showOptimizers.m index 5c03fb36..40f10031 100644 --- a/resources/MatlabInterface/@JEInterface/showOptimizers.m +++ b/resources/MatlabInterface/@JEInterface/showOptimizers.m @@ -1,5 +1,5 @@ function showOptimizers(int) -% Show a list of JavaEvA optimizers accessible through the JEInterface +% Show a list of EvA2 optimizers accessible through the JEInterface % and their access ID numbers. -javaeva.OptimizerFactory.showOptimizers +eva2.OptimizerFactory.showOptimizers