diff --git a/src/simplexe.py b/src/simplexe.py index 12de09f20d4c1e3bef367c787334829b03a8a72d..3ea1807f6640c49432c881d70d2f3298184a2f6c 100644 --- a/src/simplexe.py +++ b/src/simplexe.py @@ -264,6 +264,7 @@ class Simplexe: ################################################################### # returns cheks if the current solution is feasible or not (return True if feasible) + def __isSolutionFeasible(self): # we MUST have that all BASIC variables are >= 0 to have a FEASIBLE solution # to iterate over basic variables do: @@ -284,7 +285,8 @@ class Simplexe: # print(self.__tableau[rowId, baseColId]) # - if np.array_equal(self.__basicVariables, self.__initBasicVariable): + if self.__PivotCount != 0 and np.array_equal(self.__basicVariables, + self.__initBasicVariable): self.hasCycle = True if self.hasCycle: