1. Amplify SDK Overview¶
Before we go into the functionality details, let us summarize the overall picture and execution flow of the Amplify SDK.
The Amplify SDK performs optimization by formulating a combinatorial optimization problem using the following steps (1) to (6).
- (1) Decision variables
First, create a generator (
VariableGenerator
) that creates decision variables. Next, create a variable (Poly
) or an array of variables (PolyArray
) using the VariableGenerator. If the problem you want to formulate is a quadratic programming problem, you can also create a coefficient matrix (Matrix
) for the quadratic programming problem.- (2) Objective function
An objective function is constructed using the variables generated by the VariableGenerator. You can define the function as a polynomial (
Poly
) or a coefficient matrix (Matrix
).- (3) Constraint
Constraints (
Constraint
) are constructed from polynomials using constraint creation functions. If multiple constraints are needed, you can combine them into a constraint list (ConstraintList
).- (4) Optimization model
An optimization model (
Model
) is created from the objective function and constraints.- (5) Solver client
Specify a machine or solver to use and create a solver client (e.g.,
FixstarsClient
).- (6) Solver execution
Pass the optimization model and solver client, and run the optimization through
solve
function. The result of the execution is returned asResult
, and the objective function value and the variables of the optimal solution can be obtained.
Each of the above steps is described in detail on the following pages.