Unable to retrieve attribute 'x'
AnsweredHello,
I keep getting unable to retrieve 'x' error
I need some direction which way to look for to fix this
Could you please help me on this, Thanks
def GeoIndCom(lst_num, eps):
x_list = z
pi_list= []
dQ = metrics.euclidean
# delta = 1.05
for i in range(int(lst_num)):
pi_list.append(float(100))
print(x_list)
print(pi_list)
print(len(x_list))
print(len(pi_list))
p_matrix, pre_prob, post_prob = optql(x_list, pi_list, dQ, epsilon=eps)
f = open("./EM/EM_Uniform_41_" + str(eps) + ".txt", 'w')
for i in range(len(x_list)):
str_temp = ""
for j in range(len(x_list)):
#print(p_matrix[i,j], end="\t")
str_temp = str_temp + str(p_matrix[i,j]) + ","
str_temp = str_temp[0:len(str_temp)-1] + "\n"
f.write(str_temp)
f.close()
#
grid_num_list = [110.0]
eps_list = [5.0]
for i in range(len(grid_num_list)):
cur_grid_num = grid_num_list[i]
for k in range(len(eps_list)):
cur_eps = eps_list[k]
print("==========================================================================")
print("Grid Num: ", cur_grid_num)
print("Epsilon : ", cur_eps)
print("==========================================================================")
GeoIndCom(cur_grid_num, cur_eps)
#
print('finished333333')
0
-
Hi Seungmin,
Note that the output you provide shows that you have an infeasible model, meaning no solution exists.
I can see in the traceback on the line ending in "line 278, in optql" that the optql function is trying to access the solution values (the "X" attribute) which of course do not exist if there is no solution.
The following article in our knowledge base may be a good starting point to help you understand why the model is infeasible: "How do I resolve the error Model is infeasible or unbounded"?
- Riley0
Please sign in to leave a comment.
Comments
1 comment