本文整理汇总了Python中problem.Problem.printAllocation方法的典型用法代码示例。如果您正苦于以下问题:Python Problem.printAllocation方法的具体用法?Python Problem.printAllocation怎么用?Python Problem.printAllocation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类problem.Problem
的用法示例。
在下文中一共展示了Problem.printAllocation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: simulationLipton
# 需要导入模块: from problem import Problem [as 别名]
# 或者: from problem.Problem import printAllocation [as 别名]
def simulationLipton(sample_size,n,m,culture,verbose=False):
d = fairnessDashboard()
for xp in range(sample_size):
p = Problem(n,m,culture,centralized=True)
protocols.lipton(p,verbose)
if verbose:
print(p)
print (p.printAllocation()) # print the final allocation
d.update(p)
print(d)
return
示例2: simulationPickingSequences
# 需要导入模块: from problem import Problem [as 别名]
# 或者: from problem.Problem import printAllocation [as 别名]
def simulationPickingSequences(sample_size,n,m,sequence,culture,verbose=False):
'''
for a given sequence, runs several simulations
@sample_size: number of xps for each parameter configuration
@n: nb of agents
@m: nb of resources
'''
d = fairnessDashboard()
for xp in range(sample_size):
p = Problem(n,m,culture,centralized=True)
protocols.pickingSequence(p,sequence,verbose)
if verbose:
print(p)
print (p.printAllocation())
d.update(p)
print(d)
return