Page 4 sur 4

Re: linear programming

Publié : mer. janv. 24, 2018 7:13 am
par lukamar
Thanks, I mirrored your changes (there's no delete in optimization.cc, but incorrect deletion occurs at five places in lpsolve.cc).

Re: linear programming

Publié : jeu. janv. 10, 2019 5:35 pm
par lukamar
Hi,

I have fixed two bugs in solve_relaxation subroutine in lpsolve.cc:
* there was missing a check whether the problem has integral variables or not, which caused segfault with this problem:

Code : Tout sélectionner

lpsolve(x+y/3,[x+y<=2,x+y/4<=1,x-y<=2,x/4+y>=-1,x+y>=1,-x+y<=2,x+y/4<=1/2,x+y/4>=1/2],x=-1..3/2,y=-1/2..5/4,maximize)
* the other problem was also with the above commandline, the option "maximize" was not recognized properly, causing the objective to be minimized.

I've committed fixes for the both issues to my Github giac repository.