I cant find GA Optimization in 2018 Matlab

I downloaded the new version of 2018 MATLAB and I cant find GA optimization as before. Would you please help.

5 Comments

In new version the command is:
options = optimoptions('ga','Param1', value1, 'Param2', value2, ...);
Dear Cesar, Thanks for your answer.
I had this before and how is it different now?
if true
options = optimoptions('ga','PlotFcn',@gaplotbestf,'UseParallel',true);
fun = @(x)Portfolio_Function_TOPT(x,Pi,Pa,G,d,lifetime,Demand,BasePrice,HighPrice(i),LowPrice,dis_rate_lamda,Geo,Wells_cost,Wells_rate,DStage,Operating_Fields);
startTime = tic;
[xGA,fval] = ga(fun,nvars,[],[],[],[],lowbond,upbond,[],[],options);
time_ga_parallel = toc(startTime);
end
I get this when I run my code;
Error using optimoptions (line 124) Invalid solver specified. Provide a solver name or handle (such as 'fmincon' or @fminunc). Type DOC OPTIMOPTIONS for a list of solvers.
Please note, it was working with the old version.
What is the result of using the
ver
command?
Run it from a script or in your Command Window.
MATLAB Version: 9.4.0.813654 (R2018a)
MATLAB License Number: ••••••
Operating System: Microsoft Windows 10 Enterprise Version 10.0 (Build 14393)
Java Version: Java 1.8.0_144-b01 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.4 (R2018a)
Simulink Version 9.1 (R2018a)
Control System Toolbox Version 10.4 (R2018a)
DSP System Toolbox Version 9.6 (R2018a)
Data Acquisition Toolbox Version 3.13 (R2018a)
Image Processing Toolbox Version 10.2 (R2018a)
Instrument Control Toolbox Version 3.13 (R2018a)
Neural Network Toolbox Version 11.1 (R2018a)
Optimization Toolbox Version 8.1 (R2018a)
Parallel Computing Toolbox Version 6.12 (R2018a)
Signal Processing Toolbox Version 8.0 (R2018a)
Simulink Control Design Version 5.1 (R2018a)
Statistics and Machine Learning Toolbox Version 11.3 (R2018a)
Symbolic Math Toolbox Version 8.1 (R2018a)

Sign in to comment.

 Accepted Answer

The ga (link) function is part of the Global Optimization Toolbox.
I do not see the Global Optimization Toolbox listed in the result of your ver call.
If you have a license for it, you need to download it and install it.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!