How to solve an optimization problem in matab?
显示 更早的评论
I have the following optimization problem that I want to solve in matlab:
Objective: minimize summation of d(i) from 1 till N
where d(i) is either 0 or 1
the constraints are:
a(k,i)<= d(i) for every k and i
and summation of a(k,i) where i is from 0 till n is <=1 for all k
and summation of a(k,i) where i is from 0 till n and k from 1 till P is >=C(constant)
a(k,i) is either 0 or 1
Is this solvable in Matlab and what functions should I use?
回答(1 个)
Torsten
2017-1-2
0 个投票
help intlinprog
Best wishes
Torsten.
2 个评论
sara chatila
2017-1-2
Torsten
2017-1-2
So you have N+N*P binary solution variables:
d(i) for i=1,...,N and
a(k,i) for k=1,...,P; i=1,...,N
?
Then order them as
x(1),...,x(N) for d(1),...,d(N)
x(N+1),...,x(2*N) for a(1,1),...,a(1,N)
x(2*N+1),...,x(3*N) for a(2,1),...,a(2,N).
...
x((P*N+1),...,x((P+1)*N) for a(P,1),...,a(P,N)
and form the matrix A adequately as to represent your summations.
Best wishes
Torsten.
类别
在 帮助中心 和 File Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!