Esempio n. 1
0
def _optimise_transfers(values, person, ammount):
	for group in find_transfer_groups(values, ammount):
		# all_transfers = []
		# all_transfers.extend(find_simple_transfers(group, person, ammount))
		# all_transfers.extend(list(make_transfers(g, person, ammount))
		#                      for g in itertools.permutations(group))
		# all_transfers.append(find_optimal_transfer(group, person, ammount))
		# transfers = min(all_transfers, key=cost)
		transfers = lp.solve(group)
		for transfer in transfers:
			yield transfer
Esempio n. 2
0
def smoking():
    solve(prob5)