Advertisement
Guest User

Untitled

a guest
May 25th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1.  
  2. def class Solver:
  3. def __init__(self):
  4. the_best_decision = None
  5.  
  6. def _optimied_function(self, *params):
  7. pass
  8.  
  9. def _solv(self, *restrictions):
  10. pass
  11.  
  12. def is_whole_decision(self, testing_decision):
  13. return all(next_coordinate.is_integer() for next_coordinate in testing_decision)
  14.  
  15. def _ramification(self, decision, *restrictions):
  16. if not decision is None:
  17. if is_whole_decision(decision):
  18. the_best_decision = the_best_decision if _optimied_function(self, the_best_decision) >= _optimied_function(self, decision) else decision
  19. else:
  20. #Update *restrictions
  21. _ramification(_solv(restrictions))
  22. #Update *restrictions
  23. _ramification(_solv(restrictions))
  24.  
  25. def find_best_decision(self):
  26. #Добавить ограничения
  27. return _ramification(_solv(restrictions))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement