---
hide-toc: true
---
# 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).
``````{grid} 1 1 2 2
:reverse: true
`````{grid-item}
:padding: 1 0 0 0
```{mermaid}
%%{init:{'theme':'neutral'}}%%
flowchart TB
node_1("VariableGenerator")
node_2("PolyArray")
node_3("Poly")
node_4("Constraint/ConstraintList")
node_5("Model")
node_6("Matrix")
node_7("Result")
node_8{{"solve(model, client)"}}
node_20("ClientA / ClientB / ...")
node_1 --> |"array()"| node_2
node_1 --> |"scalar()"| node_3
node_2 --> |"sum(),\n(arithmetics)"| node_3
node_1 --> |"matrix()"| node_6
node_3 --> |"equal_to(),\nless_equal(),\n..."|node_4
node_3 --> node_5
node_4 --> node_5
node_6 --> node_5
node_5 --> node_8
node_20 ------> node_8
node_8 --> node_7
```
`````
`````{grid-item}
**(1) Decision variables**
: First, create a generator ({py:class}`~amplify.VariableGenerator`) that creates decision variables. Next, create a variable ({py:class}`~amplify.Poly`) or an array of variables ({py:class}`~amplify.PolyArray`) using the VariableGenerator. If the problem you want to formulate is a quadratic programming problem, you can also create a coefficient matrix ({py:class}`~amplify.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 ({py:class}`~amplify.Poly`) or a coefficient matrix ({py:class}`~amplify.Matrix`).
**(3) Constraint**
: Constraints ({py:class}`~amplify.Constraint`) are constructed from polynomials using constraint creation functions. If multiple constraints are needed, you can combine them into a constraint list ({py:class}`~amplify.ConstraintList`).
**(4) Optimization model**
: An optimization model ({py:class}`~amplify.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., {py:class}`~amplify.FixstarsClient`).
**(6) Solver execution**
: Pass the optimization model and solver client, and run the optimization through {py:class}`~amplify.solve` function. The result of the execution is returned as {py:class}`~amplify.Result`, 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.
`````{grid} 2
:gutter: 3
````{grid-item-card} 2. How to create decision variables
:link: variables
:link-type: doc
This page explains how to create the decision variables, the first step in the formulation process.
```{div} sd-text-right
[Learn more »](variables.md)
```
````
````{grid-item-card} 3. Polynomials and objective functions
:link: objective
:link-type: doc
This page explains how to express the objective function, which corresponds to the degree of achievement of an objective.
```{div} sd-text-right
[Learn more »](objective.md)
```
````
````{grid-item-card} 4. Constraint construction
:link: constraint
:link-type: doc
This page explains how to set constraints on the range of possible values for a decision variable and how to construct a constraint object using polynomials.
```{div} sd-text-right
[Learn more »](constraint.md)
```
````
````{grid-item-card} 5. Model formulation
:link: clients
:link-type: doc
This page explains how to express the formulation of combinatorial optimization problems in program code.
```{div} sd-text-right
[Learn more »](model.md)
```
````
````{grid-item-card} 6. Solver client
:link: clients
:link-type: doc
This page describes how to create a solver client that abstracts each solver.
```{div} sd-text-right
[Learn more »](clients.md)
```
````
````{grid-item-card} 7. Solving combinatorial optimization problems
:link: solve
:link-type: doc
This page describes solving combinatorial optimization problems using a model and a solver client.
```{div} sd-text-right
[Learn more »](solve.md)
```
````
`````