Solver¶
- class Solver¶
The runner of Amplify v0. Deprecated.
Use
solve(). This class holds a client and the options of one run, andsolvepasses them tosolve().Methods
Attributes
The strength of a chain of a D-Wave embedding.
The client of the machine that solves the model.
The raw response of the machine of the last run.
Whether the run removes the duplicate solutions.
The time limit of the search for a D-Wave embedding, in seconds.
The time that the machine spent on the last run.
Whether the run drops the solutions that break a constraint.
The values of the intermediate variables of the last run.
Whether the run sorts the solutions by the objective function.
- __init__(client)¶
Hold the client that the run uses.
- パラメータ:
client -- The client of the machine that solves the model.
- solve(arg) SolverResult¶
Solve the model and return the solutions.
The call fills
client_result,execution_time, andlogical_result.- パラメータ:
arg -- The model to solve. A
QuadraticModel, aModel, aPoly, or a constraint.- 戻り値:
The solutions that the machine gave.
- __deprecated__ = 'Solver is deprecated since amplify v1.0.0 and will no longer support in the near future.\nUse solve() instead. Please see the migration guide for details: https://amplify.fixstars.com/docs/amplify/v1/migration.html'¶
- property chain_strength¶
The strength of a chain of a D-Wave embedding.
- 戻り値:
The value that
solve()receives as chain_strength.
- property client¶
The client of the machine that solves the model.
- 戻り値:
The client that
solveuses.
- property client_result¶
The raw response of the machine of the last run.
- 戻り値:
The response, or None before the first call of
solve.
- property deduplicate¶
Whether the run removes the duplicate solutions. Obsolete.
- 例外:
NotImplementedError -- Always. The getter and the setter both raise.
- property embedding_time_limit¶
The time limit of the search for a D-Wave embedding, in seconds.
- 戻り値:
The value that
solve()receives as embedding_timeout.
- property execution_time¶
The time that the machine spent on the last run.
- 戻り値:
The execution time, or None before the first call of
solve.
- property filter_solution¶
Whether the run drops the solutions that break a constraint.
- 戻り値:
The value that
solve()receives as filter_solution.
- property logical_result¶
The values of the intermediate variables of the last run.
- 戻り値:
The values, or None before the first call of
solve.