JijSolver
In the current implementation, JijSolver runs a simple weighted local search algorithm where constraints are directly taken care of. In other words, problems are solved without been converted to QUBO.
Usage
Two classes are provided by jijzept
:
JijSolver
: a class to solve given problem by local search.JijSolverParameters
: a class to set parameters for JijSolver. A solution is obtained by runningsample_model
method inJijSolver
class.
from jijzept import JijSolver, JijSolverParameters
solver = JijSolver(config="./config.toml")
parameters = JijSolverParameters(numiters=8, eachsamsecs=1000)
response = solver.sample_model(
problem=problem,
feed_dict=instance_data,
parameters=parameters,
max_wait_time=300,
)
Parameters
JijSolverParameters
name | type | default | description |
---|---|---|---|
numiters | int | 4 | The number of iterations (each iteration consists of local search and update of the weights). |
eachsamsecs | float | 2000 | Specifies the duration for each LS (in milliseconds). |
JijSolver.sample_model
name | type | default | description |
---|---|---|---|
parameters | JijSolverParameters | See above table | Parameters for JijSolver. |
max_wait_time | Optional[Union[int, float]] | None | The number of timeout [sec] for post request. If None , 60 (one minute) will be set. Please note that this argument is for the jijzept timeout and not for configuring solver settings, such as solving time. |
sync | bool | True | If True , synchronous mode is enabled. |
queue_name | Optional[str] | None | Queue name. |