Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def class Solver:
- def __init__(self):
- the_best_decision = None
- def _optimied_function(self, *params):
- pass
- def _solv(self, *restrictions):
- pass
- def is_whole_decision(self, testing_decision):
- return all(next_coordinate.is_integer() for next_coordinate in testing_decision)
- def _ramification(self, decision, *restrictions):
- if not decision is None:
- if is_whole_decision(decision):
- the_best_decision = the_best_decision if _optimied_function(self, the_best_decision) >= _optimied_function(self, decision) else decision
- else:
- #Update *restrictions
- _ramification(_solv(restrictions))
- #Update *restrictions
- _ramification(_solv(restrictions))
- def find_best_decision(self):
- #Добавить ограничения
- return _ramification(_solv(restrictions))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement