pysolver_view.roots.problems.base module#
Root problem contracts and reusable benchmark metadata.
- class pysolver_view.roots.problems.base.BenchmarkProblem(name, x0, description, *, x_scale=None, solution=None)[source]#
Bases:
NonlinearSystemProblemPSV root-problem base carrying reproducible benchmark metadata.
- source = 'https://www.netlib.org/minpack/ex/file16'#
- class pysolver_view.roots.problems.base.NonlinearSystemProblem[source]#
Bases:
ABCAbstract base class for root-finding problems.
Derived root-finding problem objects must implement the following method:
residual: Evaluate the system of equations for a given set of decision variables.
Additionally, specific problem classes can define the gradient method to compute the Jacobians. If this method is not present in the derived class, the solver will revert to using forward finite differences for Jacobian calculations.
Methods
residual(x)
Evaluate the system of equations for a given set of decision variables.
Examples
Here’s an example of how to derive from NonlinearSystemProblem:
class MyNonlinearSystemProblem(NonlinearSystemProblem): def residual(self, x): # Implement evaluation logic here pass