linear programming

Librairie C++ de calcul formel/ C++ symbolic computation library

Modérateur : xcasadmin

lukamar
Messages : 294
Inscription : ven. juin 30, 2017 9:55 am
Localisation : Zagreb, Croatia

Re: linear programming

Message par lukamar » mer. janv. 24, 2018 7:13 am

Thanks, I mirrored your changes (there's no delete in optimization.cc, but incorrect deletion occurs at five places in lpsolve.cc).

lukamar
Messages : 294
Inscription : ven. juin 30, 2017 9:55 am
Localisation : Zagreb, Croatia

Re: linear programming

Message par lukamar » jeu. janv. 10, 2019 5:35 pm

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.

Répondre