How can i implement a second decision variable which is not in the objective function?
1 次查看(过去 30 天)
显示 更早的评论
hello everyone,
I am working on an optimization problem where i have 2 decision variable. One of the variable is xij, which is directly in the objective function, other one is yj, which is not in the objective function, it is in my constraints. yj is dependent to xij.
xij is an binary variable where i want solver to decide if xij is 1 or 0, and yj is the row summation of xij. here is an example;
lets say that the solver gave me a solution for xij like this;
x = [ 1 0 1 1; 0 0 1 0; 1 1 0 0]
i want yj to be column or a row vector it does not matter (preferably column)
yj = [ (1 +0 +1=) 2 ; (0 + 0+ 1=) 1; (1+1+0=)2 ; (1+0+0=)1]
I have other constraints where i use yj.
here is my model; (p=67) (M is some large number like 1000)
My first question is that; can i do this kind of an operation?
second Q : how can i do this?
Ps: I am using genetic algorithm solver!
thak you in advance!
Best,
Beyza.
9 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Genetic Algorithm 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!