Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f = [5 4 6 3 4];
- A = [];
- b = [];
- Aeq = [1 1 0 0 0;
- 0 0 0 1 1;
- 1 0 -1 -1 0;
- 0 1 1 0 -1];
- beq = [1; 1; 0;0;];
- lb = [0;0;0;0;0];
- ub = [1;1;1;1;1];
- [X, fval] = intlinprog(f,[1,2,3,4,5],A,b,Aeq,beq,lb,ub);
- % Prilagojeno
- % x12 x13 x23 x24 x34 x35 x45
- %
- f = [5 1 64 3 4 4 5];
- A = [];
- b = [];
- Aeq = [1 1 0 0 0 0 0;
- 0 0 0 1 1 0 -1;
- 1 0 -1 -1 0 0 0;
- 0 1 1 0 -1 0 0;
- 0 -1 -1 0 1 1 0;
- 0 0 0 0 0 1 1];
- beq = [1; 0; 0;0;0;1];
- lb = [0;0;0;0;0;0;0];
- ub = [1;1;1;1;1;1;1];
- [X, fval] = intlinprog(f,[1,2,3,4,5],A,b,Aeq,beq,lb,ub);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement