Skip to content
Snippets Groups Projects
Verified Commit f2711b0c authored by iliya.saroukha's avatar iliya.saroukha :first_quarter_moon:
Browse files

feasible solution

parent 3acc4cc2
No related branches found
No related tags found
No related merge requests found
...@@ -253,9 +253,14 @@ class Simplexe: ...@@ -253,9 +253,14 @@ class Simplexe:
def __isSolutionFeasible(self): def __isSolutionFeasible(self):
# we MUST have that all BASIC variables are >= 0 to have a FEASIBLE solution # we MUST have that all BASIC variables are >= 0 to have a FEASIBLE solution
# to iterate over basic variables do: # to iterate over basic variables do:
# for rowId, baseColId in enumerate(self.__basicVariables):
raise Exception( for rowId, baseColId in enumerate(self.__basicVariables):
'Not implemented', 'Simplexe.__isSolutionFeasible: missing code to be implemented.') if self.RHS[rowId] / self.__tableau[rowId][baseColId] < 0:
return False
# raise Exception(
# 'Not implemented', 'Simplexe.__isSolutionFeasible: missing code to be implemented.')
return True
# returns index of entering col Id # returns index of entering col Id
# return None or -1 if there is pivot # return None or -1 if there is pivot
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment