Skip to content

Commit

Permalink
v__0.201
Browse files Browse the repository at this point in the history
  • Loading branch information
antoine-jacquet committed Jan 29, 2025
1 parent 24487fe commit f3af06f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions mec/gt.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def initialize_basis(self, verbose=0, display=False):
wis = self.tableau.slack_var_names_i
kent = 2*self.nbi # z_0 enters
kdep = np.argmin(self.q_i) # w_istar departs
self.tableau.update(kent, kdep)
self.tableau.pivot(kent, kdep)
if verbose>0: print((wis+zis)[kent] + ' enters, ' + (wis+zis)[kdep] + ' departs')
if display: self.tableau.display()
return kdep
Expand All @@ -169,7 +169,7 @@ def lemke_solve(self, verbose=0, maxit=100):
if verbose > 1:
print('Basis: ', [(wis+zis)[i] for i in self.tableau.k_b])
print((wis+zis)[kent], 'enters,', (wis+zis)[kdep], 'departs')
self.tableau.update(kent, kdep)
self.tableau.pivot(kent, kdep)
if kdep == 2*self.nbi:
break
print('==========')
Expand Down Expand Up @@ -260,7 +260,7 @@ def lemke_howson_solve(self,verbose = 0):
if verbose > 1:
print('Basis: ', [(wks+zks)[i] for i in tab.k_b])
print((wks+zks)[kent], 'enters,', (wks+zks)[kdep], 'departs')
tab.update(kent, kdep)
tab.pivot(kent, kdep)
if (complements[kent] not in tab.k_b) and (complements[kdep] in tab.k_b):
break
else:
Expand Down Expand Up @@ -453,7 +453,7 @@ def determine_entering(self,a_departing):

def step(self,a_entering ,verbose= 0):
a_departing = self.tableau_M.determine_departing(a_entering)
self.tableau_M.update(a_entering,a_departing)
self.tableau_M.pivot(a_entering,a_departing)

if self.get_basis_M() ==self.get_basis_Phi():
if verbose>0:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="mec",
version="0.200",
version="0.201",
authors=["Alfred Galichon"],
author_email="[email protected]",
licence="",
Expand Down

0 comments on commit f3af06f

Please sign in to comment.