Open tanchinluh opened 4 years ago
They do not take into account the second parameter (intcon) in the function. (numintcons is always 0 / never set in matintlinprog / sci_intlinprog_matrixcpp.cpp) Looks trivial to solve by passing the vector size from cbcmatrixintlinprog.sci which holds the definition of "fot_intlinprog" procedure but I was not able to verify it as the Cpp build(link) failing on my windows system
sigh....
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