creating a function handle for GA the following code written for MILP with default settings
3 views (last 30 days)
Show older comments
tcost=[81 92 101 130 115;117 77 108 98 100;102 105 95 119 111;115 125 90 59 74;142 100 103 105 71;81 92 101 130 115;117 77 108 98 100;102 105 95 119 111;115 125 90 59 74;142 100 103 105 71];
fixedcost=[6000,4500,6500,4100,4000,9000,6750,9750,6150,6000];
S=10;
M=5;
obj1 = zeros(1,S);
obj2=zeros(S,M);
for ii = 1:S
obj1(ii) = fixedcost(ii);
end
for ii = 1:S
for jj = 1:M
obj2(ii,jj) = tcost(ii,jj);
end
end
obj=[obj1(:);obj2(:)];
5 Comments
Walter Roberson
on 1 Dec 2016
Does the Min() apply only to the sum of f(i).*y(i), with the double sum being outside of the Min()? Or does the Min() apply to the entire rest of the line?
I am confused about what the inputs are to be evaluated over? Is it the n by m array x of non-negative values, together with a vector y of length n of binary values?
Answers (0)
See Also
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
