@File : solver.py @Time : 2024/06/07 14:10:11 @Author : Alejandro Marrero @Version : 1.0 @Contact : amarrerd@ull.edu.es @License : (C)Copyright 2024, Alejandro Marrero @Desc : None
Solver
Bases: ABC
, SupportsSolve[P]
Solver is any callable type that receives a OptProblem as its argument and returns a tuple with the solution found
Source code in digneapy/_core/_solver.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
__call__(problem, *args, **kwargs)
abstractmethod
Solves a optimisation problem
Parameters: |
|
---|
Raises: |
|
---|
Returns: |
|
---|
Source code in digneapy/_core/_solver.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
SupportsSolve
Bases: Protocol[P]
Protocol to type check all the solver types in digneapy. A solver is any callable type that receives at least a problem (Problem) and returns a list of object of the Solution class.
Source code in digneapy/_core/_solver.py
20 21 22 23 24 25 26 |
|