variables in array form for ga optimization

I have a problem with 2 parts and 3 machines assignment..each part as 2 routings.say P1 1st row is for route 1 and 2nd row is route 2.. columns represent the machines
P1=[3 0 2;2 2 1];
P2=[4 1 0;1 2 2];
My objective function is
f(x)=min((P1*[7;8;10]+P2*[7;8;10])*0.1);
I an trying to do integer programming with GA but I cant understand the formulation of variables for ga.. they can be x(1) [either row one or row two representing P1] and x(2) [either row 1 or 2 representing P2] What I understnad is I can define 2 array of 1x3 size. what can be the possible formulation?

6 Comments

You define f(x) with a formula that does not contain f.
Are P1 and P2 the parameters to be optimized? Or is something calculated based upon them to be optimized?
F(P) you can say..where P1 can either be a row 1 or row 2 of given P1
This is a small instance..if we have 12 P then making combination of each row of P is very large in computation..so I want to use optimization in which I can assign each P a row vector
I have solved this using combinatorial method in which each row of P1 and P2 are grouped giving 4 combinations but in bigger problems it cant be solved like this
So P1 and P2 might each have multiple rows, and you want to minimize (P1(SomeRow,:)*[7;8;10]+P2(SomeOtherRow,:)*[7;8;10])*0.1 ? Which is something that could be separated into
minimum row of P1*[7;8;10]
plus 0.1 times minimum row of P2*[7;8,10]
since the minimum of a sum over all possible combinations of rows is the same as the minimum over the each of the parts
yes something like that. If epressed in x form then it coudld be that x is cell array of [1x2] where x1 is [1x3] and x2 is [1x3] and x(1)= either row 1 of P1 or row 2. and x(2) =row 2 of P2 or row 2. this is to be selected by the solver which row of P1 and P2 minimizes the funcion

Sign in to comment.

Answers (0)

Asked:

on 23 Sep 2018

Commented:

on 23 Sep 2018

Community Treasure Hunt

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

Start Hunting!