diff --git a/src/simplexe.py b/src/simplexe.py
index 2247d3267123f922ab8233444f22b07d04c92239..c6631f1b1d1a3da928d50a2c7e21960ee9362240 100644
--- a/src/simplexe.py
+++ b/src/simplexe.py
@@ -255,19 +255,32 @@ class Simplexe:
         # to iterate over basic variables do:
 
         for rowId, baseColId in enumerate(self.__basicVariables):
-            if self.RHS[rowId] / self.__tableau[rowId][baseColId] < 0:
+            if self.__getBasicVariableValue(rowId, baseColId) < 0:
                 return False
 
-        # raise Exception(
-        #     'Not implemented', 'Simplexe.__isSolutionFeasible: missing code to be implemented.')
         return True
 
     # returns index of entering col Id
     # return None or -1 if there is pivot
     def __selectEnteringColumn(self):
         # find an entering column for pivot => return -1 if none is found!
-        raise Exception(
-            'Not implemented', 'Simplexe.__selectEnteringColumn: missing code to be implemented.')
+
+        # print(self.__tableau[0])
+        # for rowId, baseColId in enumerate(self.__basicVariables):
+        #     print(self.__tableau[rowId, baseColId])
+        #
+
+        # This maybe ain't that dumb but it works half the time which is weird
+        # if self.__PivotCount > self.AMatrix.shape[1] - 1:
+        #     return -1
+        #
+        # return self.__PivotCount
+
+        if np.size(self.__tableau[-1, :-1][np.where(self.__tableau[-1, :-1]
+                                                    < 0)]) == 0:
+            return -1
+
+        return np.argmin(self.__tableau[-1, :-1])
 
     # returns leaving row ID
     # return None or -1 if there is pivot (sets optimisation status accoringly before returning)
@@ -276,8 +289,21 @@ class Simplexe:
         # iterate using :
         # rowCount = self.TableauRowCount - 2 if self.IsPhaseI else self.TableauRowCount - 1
         # for index in range(rowCount):
-        raise Exception(
-            'Not implemented', 'Simplexe.__selectLeavingRow: missing code to be implemented.')
+
+        rowCount = self.TableauRowCount - 2 if self.IsPhaseI else \
+            self.TableauRowCount - 1
+
+        lhs = self.__tableau[:rowCount, pivotColId]
+        rhs = self.__tableau[:rowCount, -1]
+
+        ratios = rhs / lhs
+
+        candidates = np.where(ratios > 0, ratios, np.inf)
+
+        if len((np.unique(candidates))) == 0:
+            return -1
+
+        return candidates.argmin()
 
     def __pivotTableau(self, pivotIDs):
         if pivotIDs is None or pivotIDs[0] < 0 or pivotIDs[1] < 0:
@@ -302,8 +328,21 @@ class Simplexe:
         # iterate using
         # pivotRow = self.__tableau[pivotRowId, :] / pivotVal
         # for rowId in range(self.TableauRowCount):
-        raise Exception(
-            'Not implemented', 'Simplexe.__pivotTableau: missing code to be implemented.')
+
+        # Calculer la ligne du pivot normalisée (avoir la valeur 1 à la colonne du pivot)
+        pivotRow = self.__tableau[pivotRowId, :] / pivotVal
+
+        # Pour chaque ligne autre que le pivot
+        for rowId in range(self.TableauRowCount):
+            if rowId != pivotRowId:
+                # Mettre la colonne du pivot à 0
+                multiplier = self.__tableau[rowId, pivotColId]
+                self.__tableau[rowId, :] -= multiplier * pivotRow
+
+        self.__tableau[pivotRowId, :] = pivotRow
+
+        # raise Exception(
+        #     'Not implemented', 'Simplexe.__pivotTableau: missing code to be implemented.')
 
     # For a given unfeasible initial problem, this method creates the corresponding Tableau of the Phase I, then launches the optimization of Phase I
     def initPhaseI(self, simplexe):