Skip to content

Commit

Permalink
v__0.0.6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredgalichon committed Nov 11, 2023
1 parent 34265a6 commit e04e895
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
1 change: 1 addition & 0 deletions mec/gt.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def mangasarian_stone_solve(self):
return(sol_dict)

def lemke_howson_solve(self,verbose = 0):
from sympy import Symbol

ris = ['r_' + str(i+1) for i in range(self.nbi)]
yjs = ['y_' + str(self.nbi+j+1) for j in range(self.nbj)]
Expand Down
33 changes: 32 additions & 1 deletion mec/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,35 @@ def build_surplus(nbx,nby):
print(choo_siow_mkt.assess(np.append(uv_GS_diy, λ_GS_diy_k)))
choo_siow_mkt.isCoercive()
return

########################################################
########################################################
def test_mec_gt_Matrix_game():
from mec.gt import Matrix_game
Phi_i_j = np.array([[50, 100, 93.8],
[93.9, 60.0, 82.8],
[97.6, 100, 73.2]])
thegame = Matrix_game(Phi_i_j)
print(thegame.BRI(1) ,thegame.BRJ(0) )
thegame.compute_eq()
thegame.minimax_LP()
thegame.minimax_CP()



def test_mec_gt_Bimatrix_game():
from mec.gt import Bimatrix_game
penalty_data = np.array([[50, 100, 93.8], [93.9, 60.0, 82.8], [97.6, 100, 73.2]])

penalty_zero_sum = Bimatrix_game(A_i_j = penalty_data, B_i_j = 100 - penalty_data)
penalty_nonzero_sum = Bimatrix_game(A_i_j = penalty_data,
B_i_j = np.array([[150, 100, 100], [100, 150, 100], [100, 100, 150]]) - penalty_data)
penalty_zero_sum.mangasarian_stone_solve()
penalty_nonzero_sum.lemke_howson_solve()

########################################################
########################################################
########################################################

def test_mec_lp():
test_mec_lp_LP()
test_mec_lp_Dictionary()
Expand All @@ -108,6 +134,11 @@ def test_mec_ot():
test_mec_ot_TULogit()

return

def test_mec_gt():
test_mec_gt_Matrix_game

return

def test_mec():
test_mec_lp()
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.0.6.3",
version="0.0.6.4",
url="",
authors=["Alfred Galichon"],
author_email="ag133@nyu.edu",
Expand Down

0 comments on commit e04e895

Please sign in to comment.