How to solve an optimization problem in matab?
Show older comments
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?
Answers (1)
Torsten
on 2 Jan 2017
0 votes
help intlinprog
Best wishes
Torsten.
2 Comments
sara chatila
on 2 Jan 2017
Torsten
on 2 Jan 2017
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.
Categories
Find more on Solver Outputs and Iterative Display in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!