Open chatziko opened 5 years ago
Interesting, I'd accept a fix + a test for this use case! It should be necessary to explicitly drive all the artificial variables at, iirc, but I'm clearly missing a step to make it work. You can see the handling of cB partially addresses this in the phase-switching code.
I'm actually not using your julia code directly, but a C++ port of it included in my libqif library (here) (using a patched version of armadillo that works with rationals).
I've fixed the issue by driving out the artificial variables, the corresponding lines are here. It should be easily transferable back to julia, I'll do it if I find some time.
A problem in the current implementation: after phase 1 an artificial variable can still be in the basis (with value 0). Such variables need to be driven out of the basis before starting phase 2, otherwise they might become non-zero in phase 2, which will make the solution invalid.
This is explained here:
The following program demonstrates this issue. The returned solution violates the constraints: