o.minimize()没有给我最小的解决方案

时间:2019-02-20 14:50:31

标签: z3 z3py

在我的上一篇文章中,我得到了这个min(max())函数:

def maxi(a,b):
  return If(a>=b,a,b)

a = 0
for y in zip(*time): #time is a list with many rows and columns
  z = sum(y)         #z receives the sum of the columns
  a = maxi(a,z)     

o.minimize(a)

信息:矩阵中的每个变量的值都可以为7.08或0

我的问题如下:

-> If I put a=0, I will never get a solution

-> If I put a=50, I will get a solution but I will never get the best solution.

我做错了什么?谢谢!

0 个答案:

没有答案
相关问题