Solver

class Solver

The runner of Amplify v0. Deprecated.

Use solve(). This class holds a client and the options of one run, and solve passes them to solve().

Methods

__init__

Hold the client that the run uses.

solve

Solve the model and return the solutions.

Attributes

chain_strength

The strength of a chain of a D-Wave embedding.

client

The client of the machine that solves the model.

client_result

The raw response of the machine of the last run.

deduplicate

Whether the run removes the duplicate solutions.

embedding_time_limit

The time limit of the search for a D-Wave embedding, in seconds.

execution_time

The time that the machine spent on the last run.

filter_solution

Whether the run drops the solutions that break a constraint.

logical_result

The values of the intermediate variables of the last run.

sort_solution

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, and logical_result.

パラメータ:

arg -- The model to solve. A QuadraticModel, a Model, a Poly, 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 solve uses.

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.

property sort_solution

Whether the run sorts the solutions by the objective function.

戻り値:

The value that solve() receives as sort_solution.