Adds a solve method to the Problem class. Arguments --------- name : str The keyword for the method. func : function The function that executes the solve method. This function must take as its first argument the problem instance to
(cls, name: str, func)
| 688 | |
| 689 | @classmethod |
| 690 | def register_solve(cls, name: str, func) -> None: |
| 691 | """Adds a solve method to the Problem class. |
| 692 | |
| 693 | Arguments |
| 694 | --------- |
| 695 | name : str |
| 696 | The keyword for the method. |
| 697 | func : function |
| 698 | The function that executes the solve method. This function must |
| 699 | take as its first argument the problem instance to solve. |
| 700 | """ |
| 701 | cls.REGISTERED_SOLVE_METHODS[name] = func |
| 702 | |
| 703 | def get_problem_data( |
| 704 | self, solver, |
no outgoing calls