Si, evalFactibility() devuelve True si es verdadero y False si es falso
Esta es la funcion
Código Python:
Ver originalcsize=3
size=5
ops=[1,1,2]
rhs=[4,8,3]
def evalFactibility(vs):
val=[[0]*size for i in range(csize)]
for i in range(csize):
aux=[]
for j in range(size):
val[i][j]=coeffs[i][j]*vs[j]
aux.append(val[i][j])
aux2=sum(aux)
if ops[i]==1:
if not(aux2 <= rhs[i]):
return 0 #false
elif ops[i]==2:
if not(aux2 >= rhs[i]):
return 0 #false
return 1 #true