58 views (last 30 days)

I am trying to solve a integer linear programming problem, written in matlab as follows:

fs = 170;

Ts = 1/fs;

t = 0:Ts:1;

fo = 20;

f = -1*ones(1,171);

intcon = 1:length(f); %% All variables are integers.

lb = zeros(length(171),1); %%

ub = 1*ones(length(171),1); %% Enforces the optimization variables are binary.

Aeq = [];

beq = [];

A = ADS; %% Teoplitz Matrix (Convolution to Matrix Multiplication)

b = 5.*sin(2*pi*fo*t); %%

x = intlinprog(f,intcon,A,b,Aeq,beq,lb,ub);

When I try to solve this in matlab using default options, it tells me that no feasible solution exists. Then I removed the integer constraints and tried resolving it using linprog solver. It again tells me the same thing. I do not see any reason why this should happen.

I was just wondering if the reason for this might be the linear constraint b which is a sinusoidal? When I put b as a constant value, it solves the optimization problem.

Can someone please give me a bit more insight as to the reason of infeasibility in this case?

Matt J
on 24 Dec 2020

Edited: Matt J
on 24 Dec 2020

Alan Weiss
on 27 Dec 2020

You might find the following documentation useful:

Alan Weiss

MATLAB mathematical toolbox documentation

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

Start Hunting!
## 4 Comments

## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/700535-mixed-integer-linear-programming-problem#comment_1223242

⋮## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/700535-mixed-integer-linear-programming-problem#comment_1223242

## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/700535-mixed-integer-linear-programming-problem#comment_1223327

⋮## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/700535-mixed-integer-linear-programming-problem#comment_1223327

## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/700535-mixed-integer-linear-programming-problem#comment_1223347

⋮## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/700535-mixed-integer-linear-programming-problem#comment_1223347

## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/700535-mixed-integer-linear-programming-problem#comment_1225362

⋮## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/700535-mixed-integer-linear-programming-problem#comment_1225362

Sign in to comment.