Skip to content

Integer Constraints Not Working #43

Description

@tanchinluh

I was trying to use the FOT for linear programming problem with integer constraints, as the build in function Scilab is only meant for floating I think, I face following issue:

A = [-40 0 0 1 0 0 ; 0 -60 0 0 1 0 ; 0 0 -85 0 0 1 ; 0 0 0 -1 -1 -1];
B = [0 0 0 -750]';
C = [200 275 325 1.5 1.8 1.9]';
lb = [1 1 1 1 1 1]';
ub = [8 5 3 840 560 3*85]';
[xopt,fopt,exitflag,iter,yopt]=karmarkar([],[],C,[],[],[],[],[],A,B,lb,ub)
disp(xopt);
4.8766469
4.9990788
2.999906
195.06523
299.94403
254.99124

xopt = intlinprog(C,[1 2 3 4 5 6]',A,B,[],[],lb,ub)
disp(xopt);
4.875
5.
3.
195.
300.
255.

first 6 numbers are the optimised value using standard Scilab function, which is the floating point, while using he FOT with integer constraints, I expect to get the output all in integer, however, I get x(1) is 4.875.

Any advice? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions