Solver

Once the Problem has been created, everything is ready for execution. You can retrieve the inputs and outputs required for the problem to be solved and specify how to treat each. Inputs can be set as ranges as well as fixed values and constraints and objectives can be set for each of the outputs allowing you to customize the problem as needed. Submit the problem to be executed and retrieve the results.


Endpoint

The computation RESTful interface allows:

  • Retrieving the input and output variable names that are to be used for configuring the problem.
  • Running the problem and retrieving the solution.

The base URL for the Solver endpoint is https://computer.solver-ai.com/.


HTTP Methods

  • GET problem_setup/{id}: Retrieves the input and output variable names for problem id.
  • POST solvejson: Runs the solver.

Data Format

The solver can be set up via the Browsable API or programmatically (more on this here).

Problems Setup

The solver can be set up via Browsable API (4 - Problem Setup)

When logged in, the configuration for a particular problem can be obtained via the dropdown in Browsable API (4 - Problem Setup). Once selected the problem you can specify the execution setup:

  • Inputs: Setup for each of the inputs. For each input specify:
    • Min: Minimum value.
    • Max: Maximum value (only required if Constant is not selected).
    • Constant: Select for the varaible to be a constant.
    • Integer: Select for the variable to be an integer.
  • Constraints (optional): Setup for the output variables to specify requirements on the output. This setting is optional as it is not necessary to specify any constraint.
    • Operation: Defines the type of constraint, which can be:
      • none (default): No operation is performed on the variable.
      • smaller than: The variable must be smaller than Value1 (Value2 is not required).
      • greater than: The variable must be greater than Value1 (Value2 is not required).
      • equal to: The variable must be equal to Value1 (Value2 is not required).
      • inside range: The varaible must have value between Value1 and Value2 (Value1 < value < Value2)
      • outside range: The variable must have value outside smaller than Value1 and larger than Value2 (value < Value1 and value > Value2)
    • Value1: Value to be used in conjunction with the selected Operation.
    • Value2 (optional): Value to be used in conjunction with the selected Operation (only requried for range operations).
  • Objectives (optional): Setup for the output variables to specify requirements on the outputs requiring maximization or minimization. This setting is optional as it is not necessary to specify any objective.
    • Operation:
      • none (default): No operation is performed on the variable.
      • minimize: The variable is to be minimized.
      • maximize: The variable is to be maximized.
  • Include Least Infeasible Solutions: This option allows you to include unfeasible solutions (solutions which violate the constraints) in the results. This can be useful if:
    • You are aware that for some particular cases there might not be a feasible solution, but you still need to obtain the least infeasible one.
    • You are debugging your implementation and need to determine which constraints are being violated and prevent you to identify a solution.
  • Solution Quality: Integer which can be given values from 1 to 10, with default value set to 1. Depending on the complexity of the problem to be solved determining an accurate solution might require a higer level of computation. The Solution Quality parameter allows you to try different levels of computation if you are not satisfied with the results obtained. The effect of the Solution Quality is the following
  • Solution Quality = 1:
    • Minimum solution quality level.
    • Fastest execution time.
    • Smallest use of computation time and therefore execution cost.
  • Solution Quality = 10:
    • Maximum solution quality level.
    • Slowest execution time.
    • Heighest use of computation time and therefore execution cost.

Problem Execution

Click on the Submit button in the Browsable API (5 - Problem Execution) to start the solver.

Results

The results are displayed in Browsable API (6 - Results). Note that the amount of time for generating a result will depend on the complexity of the problem to be solved.

Results are displayed in table format in the Browsable API:

  • rows: Each row is a separate solution. Depending on the problem the solution might not be unique, in such cases a number of alternative solutions will be generated.
  • columns: Each column contains the data for a specifi variable. Input variables are given first forllowed by output values.

Permissions

Only authenticated users can interact with this endpoint. This can be done via the [API] page or programmatically via a token, which can be obtained from the [Account] page.

All problems solved will be associated with the authenticated user.


Notes

  • For information on setting the same programmatically follow the documentation relative to the API Clients.

Privacy Policy Cookie Policy 
Website Terms and Conditions Platform Terms and Conditions 
X



//


SOLVER-AI ® is a registered trademark in the UK.
Copyright © 2022-2024 SOLVER-AI Ltd. All Rights Reserved.