Configuration
The configuration object contains a list of settings you can use to tweak the optimization algorithm's default behavior.
NoteThis setting is part of the problem request body in the
/problemsand/async/problemsendpoints.
The termination settings enable you to control the runtime of the optimization algorithm and when to stop. See the following example:
{
"configuration": {
"termination": {
"maxTime": 2,
"stagnationTime": 1
}
},
...
}-
Max time
Specify
maxTimeto set the maximum time, in seconds, that the algorithm can run to solve the problem. If the algorithm cannot find a solution within that time, it stops when the limit expires. -
Stagnation time
Specify the parameter
stagnationTime, in seconds, to stop the optimization algorithm if it cannot find an improved solution over a period ofstagnationTime. -
Search effort
Specify the
searchEffortparameter to control how much improvement the algorithm must achieve during eachstagnationTimeperiod to keep searching. Use this parameter to balance solution quality against runtime.Important- This parameter is an ALPHA feature.
- It applies only to the new optimization algorithm.
- To select the algorithm depending on an endpoint, see Algorithm selection.
The
searchEffortparameter supports the following values:Value Behavior quickRequires a large improvement to continue. The algorithm stops sooner. balancedDefault. Requires a moderate improvement to continue. thoroughTreats even small improvements as progress. The algorithm searches longer before it stops. { "configuration": { "termination": { "maxTime": 300, "stagnationTime": 60, "searchEffort": "thorough" } }, ... }
Algorithm selection
Set the classicMode parameter in the configuration object to select the optimization algorithm that solves a request. The default algorithm depends on the endpoint. For more information about which endpoints use which algorithm by default, how to compare results, and the updates about the transition period during which the API permits the use of either algorithm, see New default optimization algorithm.
The classicMode parameter supports the following values:
true: Uses the previous optimization algorithm. The algorithm ignores thesearchEffortsetting.false: Uses the new optimization algorithm.- Omitted: Uses the default algorithm for the endpoint.
The following example selects the new optimization algorithm to solve a request:
{
"configuration": {
"classicMode": false
},
...
}Next steps
- To understand the problem structure that contains this configuration, see Problem.
- For request structure and available options, see the API Reference.
Updated 4 days ago