SolverSolution¶
- class SolverSolution¶
One solution that the obsolete
Solver.solvereturned. Deprecated.Use
Solution, whichsolve()returns.Methods
Hold one solution.
Attributes
The value of the objective function.
The number of times that the machine found this solution.
Whether the solution satisfies every constraint.
The values of the variables.
- __init__(energy, is_feasible, values)¶
Hold one solution.
- Parameters:
energy – The value of the objective function.
is_feasible – Whether the solution satisfies every constraint.
values – The values of the variables.
- __deprecated__ = 'SolverSolution is deprecated since amplify v1.0.0 and will no longer support in the near future.\nPlease see the migration guide for details: https://amplify.fixstars.com/docs/amplify/v1/migration.html'¶
- property energy¶
The value of the objective function.
Use
objective.- Returns:
The value that the solution gives to the objective function.
- property frequency¶
The number of times that the machine found this solution. Deprecated.
Amplify v1 does not count the solutions, so this property always gives 1.
- Returns:
- property is_feasible¶
Whether the solution satisfies every constraint.
Use
feasible.- Returns:
True when the solution is feasible.
- property values¶
The values of the variables.
- Returns:
The value of each variable of the input model.