genetic algorithm - not running - reg

2 次查看(过去 30 天)
I converted a GAMS model (mip) file into cplexmps format using PAVER web server. I read this file into MATLAB R2015b using mpsread command.
Then i got the following output.
problem = mpsread('cplex(1).mps')
problem =
f: [1925x1 double]
Aineq: [216x1925 double]
bineq: [216x1 double]
Aeq: [773x1925 double]
beq: [773x1 double]
lb: [1925x1 double]
ub: [1925x1 double]
intcon: [0x1 double]
solver: 'linprog'
options: [1x1 optim.options.Linprog]
Then i made slight modifications as follows to use the problem with genetic algorithm solver.
c =(problem.f)';
A=problem.Aineq;
b=problem.bineq;
Aeq=problem.Aeq;
beq=problem.beq;
lb=problem.lb;
ub=problem.ub;
A = full(A);
Aeq=full(Aeq);
fun = @(x) sum(c.*x);
A=[A;Aeq;-Aeq];
b=[b;beq;-beq];
options = gaoptimset('PlotFcn',@gaplotbestf)
when i wanted to run ga with the following commands, it is showing 'busy' symbol for an abnormal time. how can i get the output.
[x,fval]=ga(fun,1925,A,b,[],[],lb,ub,[],options)
  2 个评论
KSSV
KSSV 2017-11-16
May be the data is huge......for your computer spec. YOu first try with a down sampled/ less data.
Kallam Haranadha Reddy
sir,
if the data is huge can i reduce the data using principal component analysis. i.e., can i reduce the size of Aineq, Aeq of my above problem using principal component analysis.

请先登录,再进行评论。

回答(1 个)

Walter Roberson
Walter Roberson 2017-11-16
ga() uses random searching that wanders around local minima hoping to find a good location, with no certainty at all that it will ever find the best conformation. The number of combinations to try rises exponentially.
linprog() uses linear programming techniques that know how to split the problem domain according to constraints and then run a minimizer on each subdomain that is certain to find the minima over that subdomain; it goes through all of the subdomains and picks the one that does the best. It can take a while to create all of the subdomains implied by the constraints, but because each sub-problem is linear, it is certain to be able to optimize it -- the optimum is always at one of the corners of each linear sub-domain.
  1 个评论
Kallam Haranadha Reddy
sir,
if the data is huge can i reduce the size of the data using principal component analysis. i.e., can i reduce the size of Aineq, Aeq of my above problem using principal component analysis.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Genetic Algorithm 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by