Skip to content

DESDEO (fast)API 0.1.0

A rest API for the DESDEO framework.


Endpoints


GET /user_info

Get Current User Info

Description

Return information about the current user.

Args: user (Annotated[User, Depends): user dependency, handled by get_current_user.

Returns: UserPublic: public information about the current user.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Responses

{
    "username": "string",
    "id": 0,
    "role": "guest",
    "group_ids": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "username": {
            "type": "string",
            "title": "Username"
        },
        "id": {
            "type": "integer",
            "title": "Id"
        },
        "role": {
            "$ref": "#/components/schemas/UserRole"
        },
        "group_ids": {
            "anyOf": [
                {
                    "items": {
                        "type": "integer"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Group Ids"
        }
    },
    "type": "object",
    "required": [
        "username",
        "id",
        "role",
        "group_ids"
    ],
    "title": "UserPublic",
    "description": "The object to handle public user information."
}

POST /login

Login

Description

Login to get an authentication token.

Return an access token in the response and a cookie storing a refresh token.

Args: form_data (Annotated[OAuth2PasswordRequestForm, Depends()]): The form data to authenticate the user. session (Annotated[Session, Depends(get_db)]): The database session. cookie_max_age (int): the lifetime of the cookie storing the refresh token.

Input parameters

Parameter In Type Default Nullable Description
cookie_max_age query integer 30 No

Request body

{
    "grant_type": null,
    "username": "string",
    "password": "************",
    "scope": "string",
    "client_id": null,
    "client_secret": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "grant_type": {
            "anyOf": [
                {
                    "type": "string",
                    "pattern": "^password$"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Grant Type"
        },
        "username": {
            "type": "string",
            "title": "Username"
        },
        "password": {
            "type": "string",
            "format": "password",
            "title": "Password"
        },
        "scope": {
            "type": "string",
            "title": "Scope",
            "default": ""
        },
        "client_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Client Id"
        },
        "client_secret": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "format": "password",
            "title": "Client Secret"
        }
    },
    "type": "object",
    "required": [
        "username",
        "password"
    ],
    "title": "Body_login_login_post"
}

Responses

{
    "access_token": "string",
    "refresh_token": "string",
    "token_type": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "access_token": {
            "type": "string",
            "title": "Access Token"
        },
        "refresh_token": {
            "type": "string",
            "title": "Refresh Token"
        },
        "token_type": {
            "type": "string",
            "title": "Token Type"
        }
    },
    "type": "object",
    "required": [
        "access_token",
        "refresh_token",
        "token_type"
    ],
    "title": "Tokens",
    "description": "A model for the authentication token."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /logout

Logout

Description

Log the current user out. Deletes the refresh token that was set by logging in.

Args: None

Returns: JSONResponse: A response in which the cookies are deleted

Responses

Schema of the response body


POST /refresh

Refresh Access Token

Description

Refresh the access token using the refresh token stored in the cookie.

Args: request (Request): The request containing the cookie. session (Annotated[Session, Depends(get_db)]): the database session. refresh_token (Annotated[Str | None, Cookie()]): the refresh token, which is fetched from a cookie included in the response.

Returns: dict: A dictionary containing the new access token.

Input parameters

Parameter In Type Default Nullable Description
refresh_token cookie No

Responses

Schema of the response body

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /add_new_dm

Add New Dm

Description

Add a new user of the role Decision Maker to the database. Requires no login.

Args: form_data (Annotated[OAuth2PasswordRequestForm, Depends()]): The user credentials to add to the database. session (Annotated[Session, Depends(get_session)]): the database session.

Returns: JSONResponse: A JSON response

Raises: HTTPException: if username is already in use or if saving to the database fails for some reason.

Request body

{
    "grant_type": null,
    "username": "string",
    "password": "************",
    "scope": "string",
    "client_id": null,
    "client_secret": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "grant_type": {
            "anyOf": [
                {
                    "type": "string",
                    "pattern": "^password$"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Grant Type"
        },
        "username": {
            "type": "string",
            "title": "Username"
        },
        "password": {
            "type": "string",
            "format": "password",
            "title": "Password"
        },
        "scope": {
            "type": "string",
            "title": "Scope",
            "default": ""
        },
        "client_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Client Id"
        },
        "client_secret": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "format": "password",
            "title": "Client Secret"
        }
    },
    "type": "object",
    "required": [
        "username",
        "password"
    ],
    "title": "Body_add_new_dm_add_new_dm_post"
}

Responses

Schema of the response body

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /add_new_analyst

Add New Analyst

Description

Add a new user of the role Analyst to the database. Requires a logged in analyst or an admin.

Args: user: Annotated[User, Depends(get_current_user)]: Logged in user with the role "analyst" or "admin". form_data: (Annotated[OAuth2PasswordRequestForm, Depends()]): The user credentials to add to the database. session: (Annotated[Session, Depends(get_session)]): the database session.

Returns: JSONResponse: A JSON response

Raises: HTTPException: if the logged in user is not an analyst or an admin or if username is already in use or if saving to the database fails for some reason.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "grant_type": null,
    "username": "string",
    "password": "************",
    "scope": "string",
    "client_id": null,
    "client_secret": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "grant_type": {
            "anyOf": [
                {
                    "type": "string",
                    "pattern": "^password$"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Grant Type"
        },
        "username": {
            "type": "string",
            "title": "Username"
        },
        "password": {
            "type": "string",
            "format": "password",
            "title": "Password"
        },
        "scope": {
            "type": "string",
            "title": "Scope",
            "default": ""
        },
        "client_id": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Client Id"
        },
        "client_secret": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "format": "password",
            "title": "Client Secret"
        }
    },
    "type": "object",
    "required": [
        "username",
        "password"
    ],
    "title": "Body_add_new_analyst_add_new_analyst_post"
}

Responses

Schema of the response body

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /problem/all

Get Problems

Description

Get information on all the current user's problems.

Args: user (Annotated[User, Depends): the current user.

Returns: list[ProblemInfoSmall]: a list of information on all the problems.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Responses

[
    {
        "name": "string",
        "description": "string",
        "is_convex": null,
        "is_linear": null,
        "is_twice_differentiable": null,
        "scenario_keys": null,
        "variable_domain": "continuous",
        "id": 0,
        "user_id": 0,
        "problem_metadata": null
    }
]
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "items": {
        "$ref": "#/components/schemas/ProblemInfoSmall"
    },
    "type": "array",
    "title": "Response Get Problems Problem All Get"
}

GET /problem/all_info

Get Problems Info

Description

Get detailed information on all the current user's problems.

Args: user (Annotated[User, Depends): the current user.

Returns: list[ProblemInfo]: a list of the detailed information on all the problems.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Responses

[
    {
        "name": "string",
        "description": "string",
        "is_convex": null,
        "is_linear": null,
        "is_twice_differentiable": null,
        "scenario_keys": null,
        "variable_domain": "continuous",
        "id": 0,
        "user_id": 0,
        "constants": null,
        "tensor_constants": null,
        "variables": null,
        "tensor_variables": null,
        "objectives": [
            {
                "func": null,
                "scenario_keys": null,
                "surrogates": null,
                "simulator_path": null,
                "name": "string",
                "symbol": "string",
                "unit": null,
                "maximize": true,
                "ideal": null,
                "nadir": null,
                "objective_type": "analytical",
                "is_linear": true,
                "is_convex": true,
                "is_twice_differentiable": true,
                "id": null,
                "problem_id": null
            }
        ],
        "constraints": null,
        "scalarization_funcs": null,
        "extra_funcs": null,
        "discrete_representation": null,
        "simulators": null,
        "problem_metadata": null
    }
]
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "items": {
        "$ref": "#/components/schemas/ProblemInfo"
    },
    "type": "array",
    "title": "Response Get Problems Info Problem All Info Get"
}

POST /problem/get

Get Problem

Description

Get the model of a specific problem.

Args: request (ProblemGetRequest): the request containing the problem's id problem_id. user (Annotated[User, Depends): the current user. session (Annotated[Session, Depends): the database session.

Raises: HTTPException: could not find a problem with the given id.

Returns: ProblemInfo: detailed information on the requested problem.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "problem_id": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "problem_id": {
            "type": "integer",
            "title": "Problem Id"
        }
    },
    "type": "object",
    "required": [
        "problem_id"
    ],
    "title": "ProblemGetRequest",
    "description": "Model to deal with problem fetching requests."
}

Responses

{
    "name": "string",
    "description": "string",
    "is_convex": null,
    "is_linear": null,
    "is_twice_differentiable": null,
    "scenario_keys": null,
    "variable_domain": "continuous",
    "id": 0,
    "user_id": 0,
    "constants": null,
    "tensor_constants": null,
    "variables": null,
    "tensor_variables": null,
    "objectives": [
        {
            "func": null,
            "scenario_keys": null,
            "surrogates": null,
            "simulator_path": null,
            "name": "string",
            "symbol": "string",
            "unit": null,
            "maximize": true,
            "ideal": null,
            "nadir": null,
            "objective_type": "analytical",
            "is_linear": true,
            "is_convex": true,
            "is_twice_differentiable": true,
            "id": null,
            "problem_id": null
        }
    ],
    "constraints": null,
    "scalarization_funcs": null,
    "extra_funcs": null,
    "discrete_representation": null,
    "simulators": null,
    "problem_metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "name": {
            "type": "string",
            "title": "Name"
        },
        "description": {
            "type": "string",
            "title": "Description"
        },
        "is_convex": {
            "anyOf": [
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Is Convex"
        },
        "is_linear": {
            "anyOf": [
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Is Linear"
        },
        "is_twice_differentiable": {
            "anyOf": [
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Is Twice Differentiable"
        },
        "scenario_keys": {
            "anyOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scenario Keys"
        },
        "variable_domain": {
            "$ref": "#/components/schemas/VariableDomainTypeEnum"
        },
        "id": {
            "type": "integer",
            "title": "Id"
        },
        "user_id": {
            "type": "integer",
            "title": "User Id"
        },
        "constants": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/ConstantDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Constants"
        },
        "tensor_constants": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/TensorConstantDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tensor Constants"
        },
        "variables": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/VariableDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Variables"
        },
        "tensor_variables": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/TensorVariableDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tensor Variables"
        },
        "objectives": {
            "items": {
                "$ref": "#/components/schemas/ObjectiveDB"
            },
            "type": "array",
            "title": "Objectives"
        },
        "constraints": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/ConstraintDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Constraints"
        },
        "scalarization_funcs": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/ScalarizationFunctionDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scalarization Funcs"
        },
        "extra_funcs": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/ExtraFunctionDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Extra Funcs"
        },
        "discrete_representation": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/DiscreteRepresentationDB"
                },
                {
                    "type": "null"
                }
            ]
        },
        "simulators": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/SimulatorDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Simulators"
        },
        "problem_metadata": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ProblemMetaDataPublic"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "type": "object",
    "required": [
        "name",
        "description",
        "is_convex",
        "is_linear",
        "is_twice_differentiable",
        "scenario_keys",
        "variable_domain",
        "id",
        "user_id",
        "constants",
        "tensor_constants",
        "variables",
        "tensor_variables",
        "objectives",
        "constraints",
        "scalarization_funcs",
        "extra_funcs",
        "discrete_representation",
        "simulators",
        "problem_metadata"
    ],
    "title": "ProblemInfo",
    "description": "Problem info request return data."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /problem/add

Add Problem

Description

Add a newly defined problem to the database.

Args: request (Problem): the JSON representation of the problem. user (Annotated[User, Depends): the current user. session (Annotated[Session, Depends): the database session.

Note: Users with the role 'guest' may not add new problems.

Raises: HTTPException: when any issue with defining the problem arises.

Returns: ProblemInfo: the information about the problem added.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Responses

{
    "name": "string",
    "description": "string",
    "is_convex": null,
    "is_linear": null,
    "is_twice_differentiable": null,
    "scenario_keys": null,
    "variable_domain": "continuous",
    "id": 0,
    "user_id": 0,
    "constants": null,
    "tensor_constants": null,
    "variables": null,
    "tensor_variables": null,
    "objectives": [
        {
            "func": null,
            "scenario_keys": null,
            "surrogates": null,
            "simulator_path": null,
            "name": "string",
            "symbol": "string",
            "unit": null,
            "maximize": true,
            "ideal": null,
            "nadir": null,
            "objective_type": "analytical",
            "is_linear": true,
            "is_convex": true,
            "is_twice_differentiable": true,
            "id": null,
            "problem_id": null
        }
    ],
    "constraints": null,
    "scalarization_funcs": null,
    "extra_funcs": null,
    "discrete_representation": null,
    "simulators": null,
    "problem_metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "name": {
            "type": "string",
            "title": "Name"
        },
        "description": {
            "type": "string",
            "title": "Description"
        },
        "is_convex": {
            "anyOf": [
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Is Convex"
        },
        "is_linear": {
            "anyOf": [
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Is Linear"
        },
        "is_twice_differentiable": {
            "anyOf": [
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Is Twice Differentiable"
        },
        "scenario_keys": {
            "anyOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scenario Keys"
        },
        "variable_domain": {
            "$ref": "#/components/schemas/VariableDomainTypeEnum"
        },
        "id": {
            "type": "integer",
            "title": "Id"
        },
        "user_id": {
            "type": "integer",
            "title": "User Id"
        },
        "constants": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/ConstantDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Constants"
        },
        "tensor_constants": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/TensorConstantDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tensor Constants"
        },
        "variables": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/VariableDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Variables"
        },
        "tensor_variables": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/TensorVariableDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tensor Variables"
        },
        "objectives": {
            "items": {
                "$ref": "#/components/schemas/ObjectiveDB"
            },
            "type": "array",
            "title": "Objectives"
        },
        "constraints": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/ConstraintDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Constraints"
        },
        "scalarization_funcs": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/ScalarizationFunctionDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scalarization Funcs"
        },
        "extra_funcs": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/ExtraFunctionDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Extra Funcs"
        },
        "discrete_representation": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/DiscreteRepresentationDB"
                },
                {
                    "type": "null"
                }
            ]
        },
        "simulators": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/SimulatorDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Simulators"
        },
        "problem_metadata": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ProblemMetaDataPublic"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "type": "object",
    "required": [
        "name",
        "description",
        "is_convex",
        "is_linear",
        "is_twice_differentiable",
        "scenario_keys",
        "variable_domain",
        "id",
        "user_id",
        "constants",
        "tensor_constants",
        "variables",
        "tensor_variables",
        "objectives",
        "constraints",
        "scalarization_funcs",
        "extra_funcs",
        "discrete_representation",
        "simulators",
        "problem_metadata"
    ],
    "title": "ProblemInfo",
    "description": "Problem info request return data."
}

POST /problem/add_json

Add Problem Json

Description

Adds a problem to the database based on its JSON definition.

Args: json_file (UploadFile): a file in JSON format describing the problem. user (Annotated[User, Depends): the usr for which the problem is added. session (Annotated[Session, Depends): the database session.

Raises: HTTPException: if the provided json_file is empty. HTTPException: if the content in the provided json_file is not in JSON format.annotations

Returns: ProblemInfo: a description of the added problem.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "json_file": "TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQ="
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "json_file": {
            "type": "string",
            "format": "binary",
            "title": "Json File"
        }
    },
    "type": "object",
    "required": [
        "json_file"
    ],
    "title": "Body_add_problem_json_problem_add_json_post"
}

Responses

{
    "name": "string",
    "description": "string",
    "is_convex": null,
    "is_linear": null,
    "is_twice_differentiable": null,
    "scenario_keys": null,
    "variable_domain": "continuous",
    "id": 0,
    "user_id": 0,
    "constants": null,
    "tensor_constants": null,
    "variables": null,
    "tensor_variables": null,
    "objectives": [
        {
            "func": null,
            "scenario_keys": null,
            "surrogates": null,
            "simulator_path": null,
            "name": "string",
            "symbol": "string",
            "unit": null,
            "maximize": true,
            "ideal": null,
            "nadir": null,
            "objective_type": "analytical",
            "is_linear": true,
            "is_convex": true,
            "is_twice_differentiable": true,
            "id": null,
            "problem_id": null
        }
    ],
    "constraints": null,
    "scalarization_funcs": null,
    "extra_funcs": null,
    "discrete_representation": null,
    "simulators": null,
    "problem_metadata": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "name": {
            "type": "string",
            "title": "Name"
        },
        "description": {
            "type": "string",
            "title": "Description"
        },
        "is_convex": {
            "anyOf": [
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Is Convex"
        },
        "is_linear": {
            "anyOf": [
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Is Linear"
        },
        "is_twice_differentiable": {
            "anyOf": [
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Is Twice Differentiable"
        },
        "scenario_keys": {
            "anyOf": [
                {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scenario Keys"
        },
        "variable_domain": {
            "$ref": "#/components/schemas/VariableDomainTypeEnum"
        },
        "id": {
            "type": "integer",
            "title": "Id"
        },
        "user_id": {
            "type": "integer",
            "title": "User Id"
        },
        "constants": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/ConstantDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Constants"
        },
        "tensor_constants": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/TensorConstantDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tensor Constants"
        },
        "variables": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/VariableDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Variables"
        },
        "tensor_variables": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/TensorVariableDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Tensor Variables"
        },
        "objectives": {
            "items": {
                "$ref": "#/components/schemas/ObjectiveDB"
            },
            "type": "array",
            "title": "Objectives"
        },
        "constraints": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/ConstraintDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Constraints"
        },
        "scalarization_funcs": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/ScalarizationFunctionDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scalarization Funcs"
        },
        "extra_funcs": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/ExtraFunctionDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Extra Funcs"
        },
        "discrete_representation": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/DiscreteRepresentationDB"
                },
                {
                    "type": "null"
                }
            ]
        },
        "simulators": {
            "anyOf": [
                {
                    "items": {
                        "$ref": "#/components/schemas/SimulatorDB"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Simulators"
        },
        "problem_metadata": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ProblemMetaDataPublic"
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "type": "object",
    "required": [
        "name",
        "description",
        "is_convex",
        "is_linear",
        "is_twice_differentiable",
        "scenario_keys",
        "variable_domain",
        "id",
        "user_id",
        "constants",
        "tensor_constants",
        "variables",
        "tensor_variables",
        "objectives",
        "constraints",
        "scalarization_funcs",
        "extra_funcs",
        "discrete_representation",
        "simulators",
        "problem_metadata"
    ],
    "title": "ProblemInfo",
    "description": "Problem info request return data."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /problem/get_metadata

Get Metadata

Description

Fetch specific metadata for a specific problem.

Fetch specific metadata for a specific problem. See all the possible metadata types from DESDEO/desdeo/api/models/problem.py Problem Metadata section.

Args: request (MetaDataGetRequest): the requested metadata type. user (Annotated[User, Depends]): the current user. session (Annotated[Session, Depends]): the database session.

Returns: list[ForestProblemMetadata | RepresentativeNonDominatedSolutions]: list containing all the metadata defined for the problem with the requested metadata type. If no match is found, returns an empty list.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "problem_id": 0,
    "metadata_type": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "problem_id": {
            "type": "integer",
            "title": "Problem Id"
        },
        "metadata_type": {
            "type": "string",
            "title": "Metadata Type"
        }
    },
    "type": "object",
    "required": [
        "problem_id",
        "metadata_type"
    ],
    "title": "ProblemMetaDataGetRequest",
    "description": "Request model for getting specific type of metadata from a specific problem."
}

Responses

[
    null
]
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "items": {
        "anyOf": [
            {
                "$ref": "#/components/schemas/ForestProblemMetaData"
            },
            {
                "$ref": "#/components/schemas/RepresentativeNonDominatedSolutions"
            },
            {
                "$ref": "#/components/schemas/SolverSelectionMetadata"
            }
        ]
    },
    "type": "array",
    "title": "Response Get Metadata Problem Get Metadata Post"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /problem/assign_solver

Select Solver

Description

Assign a specific solver for a problem.

request: ProblemSelectSolverRequest: The request containing problem id and string representation of the solver user: Annotated[User, Depends(get_current_user): The user that is logged in. session: Annotated[Session, Depends(get_session)]: The database session.

Raises: HTTPException: Unknown solver, unauthorized user

Returns: JSONResponse: A simple confirmation.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "problem_id": 0,
    "solver_string_representation": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "problem_id": {
            "type": "integer",
            "title": "Problem Id"
        },
        "solver_string_representation": {
            "type": "string",
            "title": "Solver String Representation"
        }
    },
    "type": "object",
    "required": [
        "problem_id",
        "solver_string_representation"
    ],
    "title": "ProblemSelectSolverRequest",
    "description": "Model to request a specific solver for a problem."
}

Responses

Schema of the response body

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /session/new

Create New Session

Description

.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "info": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "info": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Info"
        }
    },
    "type": "object",
    "title": "CreateSessionRequest",
    "description": "Model of the request to create a new session."
}

Responses

{
    "id": null,
    "user_id": null,
    "info": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Id"
        },
        "user_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "User Id"
        },
        "info": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Info"
        }
    },
    "type": "object",
    "required": [
        "id",
        "user_id",
        "info"
    ],
    "title": "InteractiveSessionBase",
    "description": "The base model for representing interactive sessions."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /session/get

Get Session

Description

Return an interactive session with a given id for the current user.

Args: request (GetSessionRequest): a request containing the id of the session. user (Annotated[User, Depends): the current user. session (Annotated[Session, Depends): the database session.

Raises: HTTPException: could not find an interactive session with the given id for the current user.

Returns: InteractiveSessionInfo: info on the requested interactive session.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "session_id": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "session_id": {
            "type": "integer",
            "title": "Session Id"
        }
    },
    "type": "object",
    "required": [
        "session_id"
    ],
    "title": "GetSessionRequest",
    "description": "Model of the request to get a specific session."
}

Responses

{
    "id": null,
    "user_id": null,
    "info": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Id"
        },
        "user_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "User Id"
        },
        "info": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Info"
        }
    },
    "type": "object",
    "required": [
        "id",
        "user_id",
        "info"
    ],
    "title": "InteractiveSessionBase",
    "description": "The base model for representing interactive sessions."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /method/rpm/solve

Solve Solutions

Description

Runs an iteration of the reference point method.

Args: request (RPMSolveRequest): a request with the needed information to run the method. user (Annotated[User, Depends): the current user. session (Annotated[Session, Depends): the current database session.

Returns: RPMState: a state with information on the results of iterating the reference point method once.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "problem_id": 0,
    "session_id": null,
    "parent_state_id": null,
    "scalarization_options": null,
    "solver": null,
    "solver_options": null,
    "preference": {
        "preference_type": "string",
        "aspiration_levels": {}
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "problem_id": {
            "type": "integer",
            "title": "Problem Id"
        },
        "session_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Session Id"
        },
        "parent_state_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Parent State Id"
        },
        "scalarization_options": {
            "anyOf": [
                {
                    "additionalProperties": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "string"
                            },
                            {
                                "type": "boolean"
                            }
                        ]
                    },
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scalarization Options"
        },
        "solver": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Solver"
        },
        "solver_options": {
            "anyOf": [
                {
                    "additionalProperties": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "string"
                            },
                            {
                                "type": "boolean"
                            }
                        ]
                    },
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Solver Options"
        },
        "preference": {
            "$ref": "#/components/schemas/ReferencePoint"
        }
    },
    "type": "object",
    "required": [
        "problem_id"
    ],
    "title": "RPMSolveRequest",
    "description": "Model of the request to the reference point method."
}

Responses

{
    "id": null,
    "preferences": {
        "preference_type": "string",
        "aspiration_levels": {}
    },
    "scalarization_options": null,
    "solver": null,
    "solver_options": null,
    "solver_results": [
        {
            "optimal_variables": {},
            "optimal_objectives": {},
            "constraint_values": null,
            "extra_func_values": null,
            "scalarization_values": null,
            "success": true,
            "message": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Id"
        },
        "preferences": {
            "$ref": "#/components/schemas/ReferencePoint"
        },
        "scalarization_options": {
            "anyOf": [
                {
                    "additionalProperties": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "string"
                            },
                            {
                                "type": "boolean"
                            }
                        ]
                    },
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scalarization Options"
        },
        "solver": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Solver"
        },
        "solver_options": {
            "anyOf": [
                {
                    "additionalProperties": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "string"
                            },
                            {
                                "type": "boolean"
                            }
                        ]
                    },
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Solver Options"
        },
        "solver_results": {
            "items": {
                "$ref": "#/components/schemas/SolverResults"
            },
            "type": "array",
            "title": "Solver Results"
        }
    },
    "type": "object",
    "required": [
        "preferences",
        "solver_results"
    ],
    "title": "RPMState",
    "description": "Reference Point Method (k+1 candidates)."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /method/nimbus/solve

Solve Solutions

Description

Solve the problem using the NIMBUS method.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "problem_id": 0,
    "session_id": null,
    "parent_state_id": null,
    "scalarization_options": null,
    "solver": null,
    "solver_options": null,
    "preference": {
        "preference_type": "string",
        "aspiration_levels": {}
    },
    "current_objectives": {},
    "num_desired": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "problem_id": {
            "type": "integer",
            "title": "Problem Id"
        },
        "session_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Session Id"
        },
        "parent_state_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Parent State Id"
        },
        "scalarization_options": {
            "anyOf": [
                {
                    "additionalProperties": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "string"
                            },
                            {
                                "type": "boolean"
                            }
                        ]
                    },
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scalarization Options"
        },
        "solver": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Solver"
        },
        "solver_options": {
            "anyOf": [
                {
                    "additionalProperties": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "string"
                            },
                            {
                                "type": "boolean"
                            }
                        ]
                    },
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Solver Options"
        },
        "preference": {
            "$ref": "#/components/schemas/ReferencePoint"
        },
        "current_objectives": {
            "additionalProperties": {
                "type": "number"
            },
            "type": "object",
            "title": "Current Objectives",
            "description": "The objectives used for iteration."
        },
        "num_desired": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Num Desired",
            "default": 1
        }
    },
    "type": "object",
    "required": [
        "problem_id",
        "current_objectives"
    ],
    "title": "NIMBUSClassificationRequest",
    "description": "Model of the request to the nimbus method."
}

Responses

{
    "state_id": null,
    "previous_preference": {
        "preference_type": "string",
        "aspiration_levels": {}
    },
    "previous_objectives": {},
    "current_solutions": [
        {
            "name": null,
            "solution_index": null,
            "state_id": 0,
            "objective_values": null,
            "variable_values": null
        }
    ],
    "saved_solutions": null,
    "all_solutions": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "state_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "State Id",
            "description": "The newly created state id"
        },
        "previous_preference": {
            "$ref": "#/components/schemas/ReferencePoint",
            "description": "The previous preference used."
        },
        "previous_objectives": {
            "additionalProperties": {
                "type": "number"
            },
            "type": "object",
            "title": "Previous Objectives",
            "description": "The previous solutions objectives used for iteration."
        },
        "current_solutions": {
            "items": {
                "$ref": "#/components/schemas/SolutionReferenceResponse"
            },
            "type": "array",
            "title": "Current Solutions",
            "description": "The solutions from the current iteration of nimbus."
        },
        "saved_solutions": {
            "items": {
                "$ref": "#/components/schemas/SolutionReferenceResponse"
            },
            "type": "array",
            "title": "Saved Solutions",
            "description": "The best candidate solutions saved by the decision maker."
        },
        "all_solutions": {
            "items": {
                "$ref": "#/components/schemas/SolutionReferenceResponse"
            },
            "type": "array",
            "title": "All Solutions",
            "description": "All solutions generated by NIMBUS in all iterations."
        }
    },
    "type": "object",
    "required": [
        "state_id",
        "previous_preference",
        "previous_objectives",
        "current_solutions",
        "saved_solutions",
        "all_solutions"
    ],
    "title": "NIMBUSClassificationResponse",
    "description": "The response from NIMBUS classification endpoint."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /method/nimbus/initialize

Initialize

Description

Initialize the problem for the NIMBUS method.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "problem_id": 0,
    "session_id": null,
    "parent_state_id": null,
    "starting_point": null,
    "scalarization_options": null,
    "solver": null,
    "solver_options": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "problem_id": {
            "type": "integer",
            "title": "Problem Id"
        },
        "session_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Session Id"
        },
        "parent_state_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Parent State Id"
        },
        "starting_point": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ReferencePoint"
                },
                {
                    "$ref": "#/components/schemas/SolutionInfo"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Starting Point"
        },
        "scalarization_options": {
            "anyOf": [
                {
                    "additionalProperties": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "string"
                            },
                            {
                                "type": "boolean"
                            }
                        ]
                    },
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scalarization Options"
        },
        "solver": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Solver"
        },
        "solver_options": {
            "anyOf": [
                {
                    "additionalProperties": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "string"
                            },
                            {
                                "type": "boolean"
                            }
                        ]
                    },
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Solver Options"
        }
    },
    "type": "object",
    "required": [
        "problem_id"
    ],
    "title": "NIMBUSInitializationRequest",
    "description": "Model of the request to the nimbus method."
}

Responses

{
    "state_id": null,
    "current_solutions": [
        {
            "name": null,
            "solution_index": null,
            "state_id": 0,
            "objective_values": null,
            "variable_values": null
        }
    ],
    "saved_solutions": null,
    "all_solutions": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "state_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "State Id",
            "description": "The newly created state id"
        },
        "current_solutions": {
            "items": {
                "$ref": "#/components/schemas/SolutionReferenceResponse"
            },
            "type": "array",
            "title": "Current Solutions",
            "description": "The solutions from the current interation of nimbus."
        },
        "saved_solutions": {
            "items": {
                "$ref": "#/components/schemas/SolutionReferenceResponse"
            },
            "type": "array",
            "title": "Saved Solutions",
            "description": "The best candidate solutions saved by the decision maker."
        },
        "all_solutions": {
            "items": {
                "$ref": "#/components/schemas/SolutionReferenceResponse"
            },
            "type": "array",
            "title": "All Solutions",
            "description": "All solutions generated by NIMBUS in all iterations."
        }
    },
    "type": "object",
    "required": [
        "state_id",
        "current_solutions",
        "saved_solutions",
        "all_solutions"
    ],
    "title": "NIMBUSInitializationResponse",
    "description": "The response from NIMBUS classification endpoint."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /method/nimbus/save

Save

Description

Save solutions.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "problem_id": 0,
    "session_id": null,
    "parent_state_id": null,
    "solution_info": [
        {
            "state_id": 0,
            "solution_index": 0,
            "name": null
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "problem_id": {
            "type": "integer",
            "title": "Problem Id"
        },
        "session_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Session Id"
        },
        "parent_state_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Parent State Id"
        },
        "solution_info": {
            "items": {
                "$ref": "#/components/schemas/SolutionInfo"
            },
            "type": "array",
            "title": "Solution Info"
        }
    },
    "type": "object",
    "required": [
        "problem_id",
        "solution_info"
    ],
    "title": "NIMBUSSaveRequest",
    "description": "Request model for saving solutions from any method's state."
}

Responses

{
    "state_id": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "state_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "State Id",
            "description": "The id of the newest state"
        }
    },
    "type": "object",
    "required": [
        "state_id"
    ],
    "title": "NIMBUSSaveResponse",
    "description": "The response from NIMBUS save endpoint."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /method/nimbus/intermediate

Solve Nimbus Intermediate

Description

Solve intermediate solutions by forwarding the request to generic intermediate endpoint with context nimbus.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "problem_id": 0,
    "session_id": null,
    "parent_state_id": null,
    "context": null,
    "scalarization_options": null,
    "solver": null,
    "solver_options": null,
    "num_desired": null,
    "reference_solution_1": {
        "state_id": 0,
        "solution_index": 0,
        "name": null
    },
    "reference_solution_2": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "problem_id": {
            "type": "integer",
            "title": "Problem Id"
        },
        "session_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Session Id"
        },
        "parent_state_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Parent State Id"
        },
        "context": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Context"
        },
        "scalarization_options": {
            "anyOf": [
                {
                    "additionalProperties": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "string"
                            },
                            {
                                "type": "boolean"
                            }
                        ]
                    },
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scalarization Options"
        },
        "solver": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Solver"
        },
        "solver_options": {
            "anyOf": [
                {
                    "additionalProperties": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "string"
                            },
                            {
                                "type": "boolean"
                            }
                        ]
                    },
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Solver Options"
        },
        "num_desired": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Num Desired",
            "default": 1
        },
        "reference_solution_1": {
            "$ref": "#/components/schemas/SolutionInfo"
        },
        "reference_solution_2": {
            "$ref": "#/components/schemas/SolutionInfo"
        }
    },
    "type": "object",
    "required": [
        "problem_id",
        "reference_solution_1",
        "reference_solution_2"
    ],
    "title": "IntermediateSolutionRequest",
    "description": "Model of the request to solve intermediate solutions between two solutions."
}

Responses

{
    "state_id": null,
    "reference_solution_1": {},
    "reference_solution_2": {},
    "current_solutions": [
        {
            "name": null,
            "solution_index": null,
            "state_id": 0,
            "objective_values": null,
            "variable_values": null
        }
    ],
    "saved_solutions": null,
    "all_solutions": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "state_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "State Id",
            "description": "The newly created state id"
        },
        "reference_solution_1": {
            "additionalProperties": {
                "type": "number"
            },
            "type": "object",
            "title": "Reference Solution 1",
            "description": "The first solution used when computing intermediate points."
        },
        "reference_solution_2": {
            "additionalProperties": {
                "type": "number"
            },
            "type": "object",
            "title": "Reference Solution 2",
            "description": "The second solution used when computing intermediate points."
        },
        "current_solutions": {
            "items": {
                "$ref": "#/components/schemas/SolutionReferenceResponse"
            },
            "type": "array",
            "title": "Current Solutions",
            "description": "The solutions from the current iteration of NIMBUS."
        },
        "saved_solutions": {
            "items": {
                "$ref": "#/components/schemas/SolutionReferenceResponse"
            },
            "type": "array",
            "title": "Saved Solutions",
            "description": "The best candidate solutions saved by the decision maker."
        },
        "all_solutions": {
            "items": {
                "$ref": "#/components/schemas/SolutionReferenceResponse"
            },
            "type": "array",
            "title": "All Solutions",
            "description": "All solutions generated by NIMBUS in all iterations."
        }
    },
    "type": "object",
    "required": [
        "state_id",
        "reference_solution_1",
        "reference_solution_2",
        "current_solutions",
        "saved_solutions",
        "all_solutions"
    ],
    "title": "NIMBUSIntermediateSolutionResponse",
    "description": "The response from NIMBUS classification endpoint."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /method/nimbus/get-or-initialize

Get Or Initialize

Description

Get the latest NIMBUS state if it exists, or initialize a new one if it doesn't.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "problem_id": 0,
    "session_id": null,
    "parent_state_id": null,
    "starting_point": null,
    "scalarization_options": null,
    "solver": null,
    "solver_options": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "problem_id": {
            "type": "integer",
            "title": "Problem Id"
        },
        "session_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Session Id"
        },
        "parent_state_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Parent State Id"
        },
        "starting_point": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ReferencePoint"
                },
                {
                    "$ref": "#/components/schemas/SolutionInfo"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Starting Point"
        },
        "scalarization_options": {
            "anyOf": [
                {
                    "additionalProperties": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "string"
                            },
                            {
                                "type": "boolean"
                            }
                        ]
                    },
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scalarization Options"
        },
        "solver": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Solver"
        },
        "solver_options": {
            "anyOf": [
                {
                    "additionalProperties": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "string"
                            },
                            {
                                "type": "boolean"
                            }
                        ]
                    },
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Solver Options"
        }
    },
    "type": "object",
    "required": [
        "problem_id"
    ],
    "title": "NIMBUSInitializationRequest",
    "description": "Model of the request to the nimbus method."
}

Responses

Schema of the response body
{
    "anyOf": [
        {
            "$ref": "#/components/schemas/NIMBUSInitializationResponse"
        },
        {
            "$ref": "#/components/schemas/NIMBUSClassificationResponse"
        },
        {
            "$ref": "#/components/schemas/NIMBUSIntermediateSolutionResponse"
        }
    ],
    "title": "Response Get Or Initialize Method Nimbus Get Or Initialize Post"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /method/nimbus/finalize

Finalize Nimbus

Description

An endpoint for finishing up the nimbus process.

Args: request (NIMBUSFinalizeRequest): The request containing the final solution, etc. user (Annotated[User, Depends): The current user. session (Annotated[Session, Depends): The database session.

Raises: HTTPException

Returns: NIMBUSFinalizeResponse: Response containing state id of the final solution.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "problem_id": 0,
    "session_id": null,
    "parent_state_id": null,
    "solution_info": {
        "state_id": 0,
        "solution_index": 0,
        "name": null
    },
    "preferences": {
        "preference_type": "string",
        "aspiration_levels": {}
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "problem_id": {
            "type": "integer",
            "title": "Problem Id"
        },
        "session_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Session Id"
        },
        "parent_state_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Parent State Id"
        },
        "solution_info": {
            "$ref": "#/components/schemas/SolutionInfo"
        },
        "preferences": {
            "$ref": "#/components/schemas/ReferencePoint"
        }
    },
    "type": "object",
    "required": [
        "problem_id",
        "solution_info",
        "preferences"
    ],
    "title": "NIMBUSFinalizeRequest",
    "description": "Request model for finalizing the NIMBUS procedure."
}

Responses

{
    "state_id": null,
    "final_solution": {
        "name": null,
        "solution_index": null,
        "state_id": 0,
        "objective_values": null,
        "variable_values": null
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "state_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "State Id",
            "description": "The id of the newest state"
        },
        "final_solution": {
            "$ref": "#/components/schemas/SolutionReferenceResponse",
            "description": "The final solution"
        }
    },
    "type": "object",
    "required": [
        "state_id",
        "final_solution"
    ],
    "title": "NIMBUSFinalizeResponse",
    "description": "The response from NIMBUS finish endpoint."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /method/nimbus/delete_save

Delete Save

Description

Endpoint for deleting saved solutions.

Args: request (NIMBUSDeleteSaveRequest): request containing necessary information for deleting a save user (Annotated[User, Depends): the current (logged in) user session (Annotated[Session, Depends): database session

Raises: HTTPException

Returns: NIMBUSDeleteSaveResponse: Response acknowledging the deletion of save and other useful info.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "state_id": 0,
    "solution_index": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "state_id": {
            "type": "integer",
            "title": "State Id",
            "description": "The ID of the save state."
        },
        "solution_index": {
            "type": "integer",
            "title": "Solution Index",
            "description": "The ID of the solution within the above state."
        }
    },
    "type": "object",
    "required": [
        "state_id",
        "solution_index"
    ],
    "title": "NIMBUSDeleteSaveRequest",
    "description": "Request model for deletion of a saved solution."
}

Responses

{
    "message": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "message": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Message"
        }
    },
    "type": "object",
    "required": [
        "message"
    ],
    "title": "NIMBUSDeleteSaveResponse",
    "description": "Response of NIMBUS save deletion."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /method/generic/intermediate

Solve Intermediate

Description

Solve intermediate solutions between given two solutions.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "problem_id": 0,
    "session_id": null,
    "parent_state_id": null,
    "context": null,
    "scalarization_options": null,
    "solver": null,
    "solver_options": null,
    "num_desired": null,
    "reference_solution_1": {
        "state_id": 0,
        "solution_index": 0,
        "name": null
    },
    "reference_solution_2": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "problem_id": {
            "type": "integer",
            "title": "Problem Id"
        },
        "session_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Session Id"
        },
        "parent_state_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Parent State Id"
        },
        "context": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Context"
        },
        "scalarization_options": {
            "anyOf": [
                {
                    "additionalProperties": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "string"
                            },
                            {
                                "type": "boolean"
                            }
                        ]
                    },
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Scalarization Options"
        },
        "solver": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Solver"
        },
        "solver_options": {
            "anyOf": [
                {
                    "additionalProperties": {
                        "anyOf": [
                            {
                                "type": "number"
                            },
                            {
                                "type": "string"
                            },
                            {
                                "type": "boolean"
                            }
                        ]
                    },
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Solver Options"
        },
        "num_desired": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Num Desired",
            "default": 1
        },
        "reference_solution_1": {
            "$ref": "#/components/schemas/SolutionInfo"
        },
        "reference_solution_2": {
            "$ref": "#/components/schemas/SolutionInfo"
        }
    },
    "type": "object",
    "required": [
        "problem_id",
        "reference_solution_1",
        "reference_solution_2"
    ],
    "title": "IntermediateSolutionRequest",
    "description": "Model of the request to solve intermediate solutions between two solutions."
}

Responses

{
    "state_id": null,
    "reference_solution_1": {
        "name": null,
        "solution_index": null,
        "state_id": 0,
        "objective_values": null,
        "variable_values": null
    },
    "reference_solution_2": null,
    "intermediate_solutions": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "state_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "State Id",
            "description": "The newly created state id"
        },
        "reference_solution_1": {
            "$ref": "#/components/schemas/SolutionReferenceResponse",
            "description": "The first solution used when computing intermediate solutions."
        },
        "reference_solution_2": {
            "$ref": "#/components/schemas/SolutionReferenceResponse",
            "description": "The second solution used when computing intermediate solutions."
        },
        "intermediate_solutions": {
            "items": {
                "$ref": "#/components/schemas/SolutionReferenceResponse"
            },
            "type": "array",
            "title": "Intermediate Solutions",
            "description": "The intermediate solutions computed."
        }
    },
    "type": "object",
    "required": [
        "state_id",
        "reference_solution_1",
        "reference_solution_2",
        "intermediate_solutions"
    ],
    "title": "GenericIntermediateSolutionResponse",
    "description": "The response from computing intermediate values."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /method/generic/score-bands

Calculate Score Bands

Description

Calculate SCORE bands parameters from objective data.

Request body

{
    "data": [
        [
            10.12
        ]
    ],
    "objs": [
        "string"
    ],
    "dist_parameter": 10.12,
    "use_absolute_corr": true,
    "distance_formula": 0,
    "flip_axes": true,
    "clustering_algorithm": "string",
    "clustering_score": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "data": {
            "items": {
                "items": {
                    "type": "number"
                },
                "type": "array"
            },
            "type": "array",
            "title": "Data",
            "description": "Matrix of objective values"
        },
        "objs": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Objs",
            "description": "Array of objective names for each column"
        },
        "dist_parameter": {
            "type": "number",
            "title": "Dist Parameter",
            "description": "Distance parameter for axis positioning",
            "default": 0.05
        },
        "use_absolute_corr": {
            "type": "boolean",
            "title": "Use Absolute Corr",
            "description": "Use absolute correlation values",
            "default": false
        },
        "distance_formula": {
            "type": "integer",
            "title": "Distance Formula",
            "description": "Distance formula (1 or 2)",
            "default": 1
        },
        "flip_axes": {
            "type": "boolean",
            "title": "Flip Axes",
            "description": "Whether to flip axes based on correlation signs",
            "default": true
        },
        "clustering_algorithm": {
            "type": "string",
            "title": "Clustering Algorithm",
            "description": "Clustering algorithm (DBSCAN or GMM)",
            "default": "DBSCAN"
        },
        "clustering_score": {
            "type": "string",
            "title": "Clustering Score",
            "description": "Clustering score metric",
            "default": "silhoutte"
        }
    },
    "type": "object",
    "required": [
        "data",
        "objs"
    ],
    "title": "ScoreBandsRequest",
    "description": "Model of the request to calculate SCORE bands parameters."
}

Responses

{
    "groups": [
        0
    ],
    "axis_dist": [
        10.12
    ],
    "axis_signs": null,
    "obj_order": [
        0
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "groups": {
            "items": {
                "type": "integer"
            },
            "type": "array",
            "title": "Groups",
            "description": "Cluster group assignments for each data point"
        },
        "axis_dist": {
            "items": {
                "type": "number"
            },
            "type": "array",
            "title": "Axis Dist",
            "description": "Normalized axis positions"
        },
        "axis_signs": {
            "anyOf": [
                {
                    "items": {
                        "type": "integer"
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Axis Signs",
            "description": "Axis direction signs (1 or -1)"
        },
        "obj_order": {
            "items": {
                "type": "integer"
            },
            "type": "array",
            "title": "Obj Order",
            "description": "Optimal order of objectives"
        }
    },
    "type": "object",
    "required": [
        "groups",
        "axis_dist",
        "axis_signs",
        "obj_order"
    ],
    "title": "ScoreBandsResponse",
    "description": "Model of the response containing SCORE bands parameters."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /utopia/

Get Utopia Data

Description

Request and receive the Utopia map corresponding to the decision variables sent.

Args: request (UtopiaRequest): the set of decision variables and problem for which the utopia forest map is requested for. user (Annotated[User, Depend(get_current_user)]) the current user session (Annotated[Session, Depends(get_session)]) the current database session Raises: HTTPException: Returns: UtopiaResponse: the map for the forest, to be rendered in frontend

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "problem_id": 0,
    "solution": {
        "state_id": 0,
        "solution_index": 0,
        "name": null
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "problem_id": {
            "type": "integer",
            "title": "Problem Id",
            "description": "Problem for which the map is generated"
        },
        "solution": {
            "$ref": "#/components/schemas/SolutionInfo",
            "description": "Solution for which to generate the map"
        }
    },
    "type": "object",
    "required": [
        "problem_id",
        "solution"
    ],
    "title": "UtopiaRequest",
    "description": "The request for an Utopia map."
}

Responses

{
    "is_utopia": true,
    "map_name": "string",
    "map_json": {},
    "options": {},
    "description": "string",
    "years": [
        "string"
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "is_utopia": {
            "type": "boolean",
            "title": "Is Utopia",
            "description": "True if map exists for this problem."
        },
        "map_name": {
            "type": "string",
            "title": "Map Name",
            "description": "Name of the map."
        },
        "map_json": {
            "additionalProperties": true,
            "type": "object",
            "title": "Map Json",
            "description": "MapJSON representation of the geography."
        },
        "options": {
            "additionalProperties": true,
            "type": "object",
            "title": "Options",
            "description": "A dict with given years as keys containing options for each year."
        },
        "description": {
            "type": "string",
            "title": "Description",
            "description": "Description shown above the map."
        },
        "years": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Years",
            "description": "A list of years for which the maps have been generated."
        }
    },
    "type": "object",
    "required": [
        "is_utopia",
        "map_name",
        "map_json",
        "options",
        "description",
        "years"
    ],
    "title": "UtopiaResponse",
    "description": "The response to an UtopiaRequest."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /gdm/create_group

Create Group

Description

Create group.

Args: request (GroupCreateRequest): a request that holds information to be used in creation of the group. user (Annotated[User, Depends(get_current_user)]): the current user. session (Annotated[Session, Depends(get_session)]): the database session.

Returns: JSONResponse: Aknowledgement that the gourp was created

Raises: HTTPException

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "group_name": "string",
    "problem_id": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "group_name": {
            "type": "string",
            "title": "Group Name"
        },
        "problem_id": {
            "type": "integer",
            "title": "Problem Id"
        }
    },
    "type": "object",
    "required": [
        "group_name",
        "problem_id"
    ],
    "title": "GroupCreateRequest",
    "description": "Used for requesting a group to be created."
}

Responses

Schema of the response body

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /gdm/delete_group

Delete Group

Description

Delete the group with given ID.

Args: request (GroupInfoRequest): Contains the ID of the group to be deleted user (Annotated[User, Depends(get_current_user)]): The user (in this case must be owner for anything to happen) session (Annotated[Session, Depends(get_session)]): The database session

Returns: JSONResponse: Aknowledgement of the deletion

Raises: HTTPException: Insufficient authorization etc.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "group_id": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "group_id": {
            "type": "integer",
            "title": "Group Id"
        }
    },
    "type": "object",
    "required": [
        "group_id"
    ],
    "title": "GroupInfoRequest",
    "description": "Class for requesting group information."
}

Responses

Schema of the response body

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /gdm/add_to_group

Add To Group

Description

Add a user to a group.

Args: request (GroupModifyRequest): Request object that has group and user IDs. user (Annotated[User, Depends(get_current_user)]): the current user. session (Annotated[Session, Depends(get_session)]): the database session.

Returns: JSONResponse: Aknowledge that user has been added to the group

Raises: HTTPException: Authorization issues, group or user not found.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "group_id": 0,
    "user_id": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "group_id": {
            "type": "integer",
            "title": "Group Id"
        },
        "user_id": {
            "type": "integer",
            "title": "User Id"
        }
    },
    "type": "object",
    "required": [
        "group_id",
        "user_id"
    ],
    "title": "GroupModifyRequest",
    "description": "Used for adding a user into group and removing a user from group."
}

Responses

Schema of the response body

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /gdm/remove_from_group

Remove From Group

Description

Remove user from group.

Args: request (GroupModifyRequest): Request object that has group and user IDs. user (Annotated[User, Depends(get_current_user)]): the current user. session (Annotated[Session, Depends(get_session)]): the database session.

Returns: JSONResponse: Aknowledge that user has been removed from the group.

Raises: HTTPException: Authorization issues, group or user not found.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "group_id": 0,
    "user_id": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "group_id": {
            "type": "integer",
            "title": "Group Id"
        },
        "user_id": {
            "type": "integer",
            "title": "User Id"
        }
    },
    "type": "object",
    "required": [
        "group_id",
        "user_id"
    ],
    "title": "GroupModifyRequest",
    "description": "Used for adding a user into group and removing a user from group."
}

Responses

Schema of the response body

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /gdm/get_group_info

Get Group Info

Description

Get information about the group.

Args: request (GroupInfoRequest): the id of the group for which we desire info on session (Annotated[Session, Depends(get_session)]): the database session

Returns: GroupPublic: public info of the group

Raises: HTTPException: If there's no group with the requests group id

Request body

{
    "group_id": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "group_id": {
            "type": "integer",
            "title": "Group Id"
        }
    },
    "type": "object",
    "required": [
        "group_id"
    ],
    "title": "GroupInfoRequest",
    "description": "Class for requesting group information."
}

Responses

{
    "id": 0,
    "name": "string",
    "owner_id": 0,
    "user_ids": [
        0
    ],
    "problem_id": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "integer",
            "title": "Id"
        },
        "name": {
            "type": "string",
            "title": "Name"
        },
        "owner_id": {
            "type": "integer",
            "title": "Owner Id"
        },
        "user_ids": {
            "items": {
                "type": "integer"
            },
            "type": "array",
            "title": "User Ids"
        },
        "problem_id": {
            "type": "integer",
            "title": "Problem Id"
        }
    },
    "type": "object",
    "required": [
        "id",
        "name",
        "owner_id",
        "user_ids",
        "problem_id"
    ],
    "title": "GroupPublic",
    "description": "Response model for Group."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /gnimbus/initialize

Gnimbus Initialize

Description

Initialize the problem for GNIMBUS.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "group_id": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "group_id": {
            "type": "integer",
            "title": "Group Id"
        }
    },
    "type": "object",
    "required": [
        "group_id"
    ],
    "title": "GroupInfoRequest",
    "description": "Class for requesting group information."
}

Responses

Schema of the response body

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /gnimbus/get_latest_results

Get Latest Results

Description

Get the latest results from group iteration.

Args: request (GroupInfoRequest): essentially just the ID of the group user (Annotated[User, Depends(get_current_user)]): Current user session (Annotated[Session, Depends(get_session)]): Database session.

Returns: GNIMBUSResultResponse: A GNIMBUSResultResponse response containing the latest gnimbus results

Raises: HTTPException: Validation errors or no results

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "group_id": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "group_id": {
            "type": "integer",
            "title": "Group Id"
        }
    },
    "type": "object",
    "required": [
        "group_id"
    ],
    "title": "GroupInfoRequest",
    "description": "Class for requesting group information."
}

Responses

{
    "method": "string",
    "phase": "string",
    "preferences": null,
    "common_results": [
        {
            "name": null,
            "solution_index": null,
            "state": {
                "id": null,
                "problem_id": null,
                "session_id": null,
                "parent_id": null,
                "state_id": null
            },
            "objective_values_all": [
                {}
            ],
            "variable_values_all": [
                {}
            ],
            "objective_values": null,
            "variable_values": null,
            "state_id": 0,
            "num_solutions": 0
        }
    ],
    "user_results": null,
    "personal_result_index": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "method": {
            "type": "string",
            "title": "Method"
        },
        "phase": {
            "type": "string",
            "title": "Phase"
        },
        "preferences": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/VotingPreference"
                },
                {
                    "$ref": "#/components/schemas/OptimizationPreference"
                }
            ],
            "title": "Preferences"
        },
        "common_results": {
            "items": {
                "$ref": "#/components/schemas/SolutionReference"
            },
            "type": "array",
            "title": "Common Results"
        },
        "user_results": {
            "items": {
                "$ref": "#/components/schemas/SolutionReference"
            },
            "type": "array",
            "title": "User Results"
        },
        "personal_result_index": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Personal Result Index"
        }
    },
    "type": "object",
    "required": [
        "method",
        "phase",
        "preferences",
        "common_results",
        "user_results",
        "personal_result_index"
    ],
    "title": "GNIMBUSResultResponse",
    "description": "The response for getting GNIMBUS results."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /gnimbus/all_iterations

Full Iteration

Description

Get all results from all iterations of the group.

Args: request (GroupInfoRequest): essentially just the ID of the group user (Annotated[User, Depends(get_current_user)]): current user session (Annotated[Session, Depends(get_session)]): current session

Returns: GNIMBUSAllIterationsResponse: A GNIMBUSAllIterationsResponse response containing all the results of the iterations. If last iteration was optimization, the first iteration is incomplete (i.e. the voting preferences and voting results are missing)

Raises: HTTPException: Validation errors or no results or no states and such.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "group_id": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "group_id": {
            "type": "integer",
            "title": "Group Id"
        }
    },
    "type": "object",
    "required": [
        "group_id"
    ],
    "title": "GroupInfoRequest",
    "description": "Class for requesting group information."
}

Responses

{
    "all_full_iterations": [
        {
            "phase": "string",
            "optimization_preferences": null,
            "voting_preferences": null,
            "starting_result": null,
            "common_results": [
                {
                    "name": null,
                    "solution_index": null,
                    "state": {
                        "id": null,
                        "problem_id": null,
                        "session_id": null,
                        "parent_id": null,
                        "state_id": null
                    },
                    "objective_values_all": [
                        {}
                    ],
                    "variable_values_all": [
                        {}
                    ],
                    "objective_values": null,
                    "variable_values": null,
                    "state_id": 0,
                    "num_solutions": 0
                }
            ],
            "user_results": null,
            "personal_result_index": null,
            "final_result": null
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "all_full_iterations": {
            "items": {
                "$ref": "#/components/schemas/FullIteration"
            },
            "type": "array",
            "title": "All Full Iterations"
        }
    },
    "type": "object",
    "required": [
        "all_full_iterations"
    ],
    "title": "GNIMBUSAllIterationsResponse",
    "description": "The response model for getting all found solutions among others."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /gnimbus/toggle_phase

Switch Phase

Description

Switch the phase from one to another. "learning", "crp", "decision" and "compromise" phases are allowed.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "group_id": 0,
    "new_phase": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "group_id": {
            "type": "integer",
            "title": "Group Id"
        },
        "new_phase": {
            "type": "string",
            "title": "New Phase"
        }
    },
    "type": "object",
    "required": [
        "group_id",
        "new_phase"
    ],
    "title": "GNIMBUSSwitchPhaseRequest",
    "description": "A request for a certain phase. Comes from the group owner/analyst."
}

Responses

{
    "old_phase": "string",
    "new_phase": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "old_phase": {
            "type": "string",
            "title": "Old Phase"
        },
        "new_phase": {
            "type": "string",
            "title": "New Phase"
        }
    },
    "type": "object",
    "required": [
        "old_phase",
        "new_phase"
    ],
    "title": "GNIMBUSSwitchPhaseResponse",
    "description": "A response for the above request."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /gnimbus/get_phase

Get Phase

Description

Get the current phase of the group.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "group_id": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "group_id": {
            "type": "integer",
            "title": "Group Id"
        }
    },
    "type": "object",
    "required": [
        "group_id"
    ],
    "title": "GroupInfoRequest",
    "description": "Class for requesting group information."
}

Responses

Schema of the response body

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /method/enautilus/step

Step

Description

.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "problem_id": 0,
    "session_id": null,
    "parent_state_id": null,
    "representative_solutions_id": null,
    "current_iteration": 0,
    "iterations_left": 0,
    "selected_point": {},
    "reachable_point_indices": [
        0
    ],
    "number_of_intermediate_points": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "problem_id": {
            "type": "integer",
            "title": "Problem Id"
        },
        "session_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Session Id"
        },
        "parent_state_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Parent State Id"
        },
        "representative_solutions_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Representative Solutions Id"
        },
        "current_iteration": {
            "type": "integer",
            "title": "Current Iteration",
            "description": "The number of the current iteration."
        },
        "iterations_left": {
            "type": "integer",
            "title": "Iterations Left",
            "description": "The number of iterations left."
        },
        "selected_point": {
            "additionalProperties": {
                "type": "number"
            },
            "type": "object",
            "title": "Selected Point",
            "description": "The selected intermediate point. If first iteration, set this to be the (approximated) nadir point."
        },
        "reachable_point_indices": {
            "items": {
                "type": "integer"
            },
            "type": "array",
            "title": "Reachable Point Indices",
            "description": "The indices indicating the point on the non-dominated set that are reachable from the currently selected point."
        },
        "number_of_intermediate_points": {
            "type": "integer",
            "title": "Number Of Intermediate Points",
            "description": "The number of intermediate points to be generated."
        }
    },
    "type": "object",
    "required": [
        "problem_id",
        "current_iteration",
        "iterations_left",
        "selected_point",
        "reachable_point_indices",
        "number_of_intermediate_points"
    ],
    "title": "EnautilusStepRequest",
    "description": "Model of the request to the E-NAUTILUS method."
}

Responses

{
    "id": null,
    "non_dominated_solutions_id": null,
    "current_iteration": 0,
    "iterations_left": 0,
    "selected_point": null,
    "reachable_point_indices": [
        0
    ],
    "number_of_intermediate_points": 0,
    "enautilus_results": {
        "current_iteration": 0,
        "iterations_left": 0,
        "intermediate_points": [
            {}
        ],
        "reachable_best_bounds": [
            {}
        ],
        "reachable_worst_bounds": [
            {}
        ],
        "closeness_measures": [
            10.12
        ],
        "reachable_point_indices": [
            [
                0
            ]
        ]
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Id"
        },
        "non_dominated_solutions_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Non Dominated Solutions Id"
        },
        "current_iteration": {
            "type": "integer",
            "title": "Current Iteration"
        },
        "iterations_left": {
            "type": "integer",
            "title": "Iterations Left"
        },
        "selected_point": {
            "anyOf": [
                {
                    "additionalProperties": {
                        "type": "number"
                    },
                    "type": "object"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Selected Point"
        },
        "reachable_point_indices": {
            "items": {
                "type": "integer"
            },
            "type": "array",
            "title": "Reachable Point Indices"
        },
        "number_of_intermediate_points": {
            "type": "integer",
            "title": "Number Of Intermediate Points"
        },
        "enautilus_results": {
            "$ref": "#/components/schemas/ENautilusResult"
        }
    },
    "type": "object",
    "required": [
        "current_iteration",
        "iterations_left",
        "number_of_intermediate_points",
        "enautilus_results"
    ],
    "title": "ENautilusState",
    "description": "E-NAUTILUS: one stepping iteration."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

EMO


POST /method/emo/iterate

Iterate

Description

Starts the EMO method.

Args: request (EMOSolveRequest): The request object containing parameters for the EMO method. user (Annotated[User, Depends]): The current user. session (Annotated[Session, Depends]): The database session.

Raises: HTTPException: If the request is invalid or the EMO method fails.

Returns: IterateResponse: A response object containing a list of IDs to be used for websocket communication. Also contains the StateDB id where the results will be stored.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "problem_id": 0,
    "session_id": null,
    "parent_state_id": null,
    "template_options": null,
    "preference_options": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "problem_id": {
            "type": "integer",
            "title": "Problem Id",
            "description": "Database ID of the problem to solve."
        },
        "session_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Session Id"
        },
        "parent_state_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Parent State Id",
            "description": "State ID of the parent state, if any. Should be None if this is the first state in a session."
        },
        "template_options": {
            "anyOf": [
                {
                    "items": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/Template1Options"
                            },
                            {
                                "$ref": "#/components/schemas/Template2Options"
                            }
                        ]
                    },
                    "type": "array"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Template Options",
            "description": "Options for the template to use. A list of options can be given if multiple templates are used in parallel."
        },
        "preference_options": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/ReferencePointOptions"
                },
                {
                    "$ref": "#/components/schemas/DesirableRangesOptions"
                },
                {
                    "$ref": "#/components/schemas/PreferredSolutionsOptions"
                },
                {
                    "$ref": "#/components/schemas/NonPreferredSolutionsOptions"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Preference Options",
            "description": "Options for the preference handling."
        }
    },
    "type": "object",
    "required": [
        "problem_id"
    ],
    "title": "EMOIterateRequest",
    "description": "Model of the request to iterate an EMO method."
}

Responses

{
    "method_ids": [
        "string"
    ],
    "client_id": "string",
    "state_id": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "method_ids": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "title": "Method Ids",
            "description": "IDs of the EMO methods using websockets to get/send updates."
        },
        "client_id": {
            "type": "string",
            "title": "Client Id",
            "description": "Client ID to use when connecting to the websockets."
        },
        "state_id": {
            "type": "integer",
            "title": "State Id",
            "description": "The state ID of the newly created state."
        }
    },
    "type": "object",
    "required": [
        "method_ids",
        "client_id",
        "state_id"
    ],
    "title": "EMOIterateResponse",
    "description": "Model of the response to an EMO iterate request."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /method/emo/fetch

Fetch Results

Description

Fetches results from a completed EMO method.

Args: request (EMOFetchRequest): The request object containing parameters for fetching results. user (Annotated[User, Depends]): The current user. session (Annotated[Session, Depends]): The database session.

Raises: HTTPException: If the request is invalid or the EMO method has not completed.

Returns: StreamingResponse: A streaming response containing the results of the EMO method.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "problem_id": 0,
    "session_id": null,
    "parent_state_id": null,
    "num_solutions": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "problem_id": {
            "type": "integer",
            "title": "Problem Id",
            "description": "Database ID of the problem to solve."
        },
        "session_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Session Id"
        },
        "parent_state_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Parent State Id",
            "description": "State ID of the parent state, if any. Should be None if this is the first state in a session."
        },
        "num_solutions": {
            "type": "integer",
            "title": "Num Solutions",
            "description": "Number of solutions to fetch. If 0, fetch all solutions.",
            "default": 0
        }
    },
    "type": "object",
    "required": [
        "problem_id"
    ],
    "title": "EMOFetchRequest",
    "description": "Model of the request to fetch solutions from an EMO method."
}

Responses

Schema of the response body

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /method/emo/fetch_score

Fetch Score Bands

Description

Fetches results from a completed EMO method.

Args: request (EMOFetchRequest): The request object containing parameters for fetching results and of the SCORE bands visualization. user (Annotated[User, Depends]): The current user. session (Annotated[Session, Depends]): The database session.

Raises: HTTPException: If the request is invalid or the EMO method has not completed.

Returns: SCOREBandsResult: The results of the SCORE bands visualization.

Input parameters

Parameter In Type Default Nullable Description
APIKeyCookie cookie string N/A No API key
OAuth2PasswordBearer header string N/A No

Request body

{
    "problem_id": 0,
    "session_id": null,
    "parent_state_id": null,
    "config": null,
    "solution_ids": [
        0
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "problem_id": {
            "type": "integer",
            "title": "Problem Id",
            "description": "Database ID of the problem to solve."
        },
        "session_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Session Id"
        },
        "parent_state_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Parent State Id",
            "description": "State ID of the parent state, if any."
        },
        "config": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/SCOREBandsConfig"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Configuration for the SCORE bands visualization."
        },
        "solution_ids": {
            "items": {
                "type": "integer"
            },
            "type": "array",
            "title": "Solution Ids",
            "description": "List of solution IDs to score."
        }
    },
    "type": "object",
    "required": [
        "problem_id",
        "solution_ids"
    ],
    "title": "EMOScoreRequest",
    "description": "Request model for getting SCORE bands visualization data from state."
}

Responses

{
    "state_id": null,
    "result": {
        "options": {
            "dimensions": null,
            "axis_positions": null,
            "clustering_algorithm": null,
            "distance_formula": 1,
            "distance_parameter": 10.12,
            "use_absolute_correlations": true,
            "include_solutions": true,
            "include_medians": true,
            "interval_size": 10.12,
            "scales": null
        },
        "ordered_dimensions": [
            "string"
        ],
        "clusters": [
            0
        ],
        "axis_positions": {},
        "bands": {},
        "medians": {},
        "cardinalities": {}
    }
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "state_id": {
            "anyOf": [
                {
                    "type": "integer"
                },
                {
                    "type": "null"
                }
            ],
            "title": "State Id",
            "description": "The state ID of the newly created state."
        },
        "result": {
            "$ref": "#/components/schemas/SCOREBandsResult"
        }
    },
    "type": "object",
    "required": [
        "result"
    ],
    "title": "EMOScoreResponse",
    "description": "Model of the response to an EMO score request."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Schemas

BinaryFlipMutationOptions

Name Type Description
mutation_probability The probability of mutation. Defaults to None, which sets the mutation probability to 1/.
name string The name of the mutation operator.

BlendAlphaCrossoverOptions

Name Type Description
alpha number Non-negative blending factor 'alpha' that controls the extent to which offspring may be sampled outside the interval defined by each pair of parent genes. alpha = 0 restricts children strictly within the parents range, larger alpha allows some outliers.
name string The name of the crossover operator.
xover_probability number

Body_add_new_analyst_add_new_analyst_post

Name Type Description
client_id
client_secret
grant_type
password string(password)
scope string
username string

Body_add_new_dm_add_new_dm_post

Name Type Description
client_id
client_secret
grant_type
password string(password)
scope string
username string

Body_add_problem_json_problem_add_json_post

Name Type Description
json_file string(binary)

Body_login_login_post

Name Type Description
client_id
client_secret
grant_type
password string(password)
scope string
username string

BoundedExponentialCrossoverOptions

Name Type Description
lambda_ number Positive scale λ for the exponential distribution.
name string The name of the crossover operator.
xover_probability number The crossover probability.

BoundedPolynomialMutationOptions

Name Type Description
distribution_index number The distribution index.
mutation_probability The probability of mutation. Defaults to None, which sets the mutation probability to 1/.
name string The name of the mutation operator.

ClipRepairOptions

Name Type Description
lower_bounds Lower bounds for the decision variables. If none, the lower bounds from the problem will be used.
name string Clip the solutions to be within the variable bounds.
upper_bounds Upper bounds for the decision variables. If none, the upper bounds from the problem will be used.

CompositeTerminatorOptions

Name Type Description
mode string Whether to use logical AND or OR.
name string The name of the termination operator.
terminators Array<> List of terminators.

ConstantDB

Name Type Description
id
name string Descriptive name of the constant. This can be used in UI and visualizations. Example: 'maximum cost'.
problem_id
symbol string Symbol to represent the constant. This will be used in the rest of the problem definition. It may also be used in UIs and visualizations. Example: 'c_1'.
value number The value of the constant.

ConstraintDB

Name Type Description
cons_type ConstraintTypeEnum The type of the constraint. Constraints are assumed to be in a standard form where the supplied 'func' expression is on the left hand side of the constraint's expression, and on the right hand side a zero value is assume. The comparison between the left hand side and right hand side is either and quality comparison ('=') or lesser than equal comparison ('<=').
func Array<>
id
is_convex boolean Whether the function expression is convex or not (non-convex). Defaults to `False`.
is_linear boolean Whether the constraint is linear or not. Defaults to True, e.g., a linear constraint is assumed.
is_twice_differentiable boolean Whether the function expression is twice differentiable or not. Defaults to `False`
name string Descriptive name of the constraint. This can be used in UI and visualizations. Example: 'maximum length'.
problem_id
scenario_keys
simulator_path
surrogates
symbol string Symbol to represent the constraint. This will be used in the rest of the problem definition. It may also be used in UIs and visualizations. Example: 'g_1'.

ConstraintTypeEnum

Type: string

CreateSessionRequest

Name Type Description
info

CustomClusterOptions

Name Type Description
clusters Array<integer> List of cluster IDs (one for each solution) indicating the cluster to which each solution belongs.
name string Custom user-provided clusters.

DBSCANOptions

Name Type Description
name string DBSCAN clustering algorithm.

DesirableRangesOptions

Name Type Description
aspiration_levels The aspiration levels as a dictionary with objective function symbols as the keys.
desirability_levels Array<> The desirability levels as a tuple (high, low). Used if method is DF transformation. If None, default levels (0.9, 0.1) are used.
method string The method for handling the desirable ranges.
name string The name of the preferred ranges option.
reservation_levels The reservation levels as a dictionary with objective function symbols as the keys.

DimensionClusterOptions

Name Type Description
dimension_name string Dimension to use for clustering.
kind string Kind of clustering to use. Either "EqualWidth", which divides the dimension range into equal width intervals, or "EqualFrequency", which divides the dimension values into intervals with equal number of solutions. Defaults to "EqualWidth".
n_clusters integer Number of clusters to use. Defaults to 5.
name string Clustering by one of the dimensions.

DiscreteRepresentationDB

Name Type Description
id
non_dominated boolean
objective_values
problem_id
variable_values

DistanceFormula

Type: integer

EMOFetchRequest

Name Type Description
num_solutions integer Number of solutions to fetch. If 0, fetch all solutions.
parent_state_id State ID of the parent state, if any. Should be None if this is the first state in a session.
problem_id integer Database ID of the problem to solve.
session_id

EMOIterateRequest

Name Type Description
parent_state_id State ID of the parent state, if any. Should be None if this is the first state in a session.
preference_options Options for the preference handling.
problem_id integer Database ID of the problem to solve.
session_id
template_options Options for the template to use. A list of options can be given if multiple templates are used in parallel.

EMOIterateResponse

Name Type Description
client_id string Client ID to use when connecting to the websockets.
method_ids Array<string> IDs of the EMO methods using websockets to get/send updates.
state_id integer The state ID of the newly created state.

EMOScoreRequest

Name Type Description
config Configuration for the SCORE bands visualization.
parent_state_id State ID of the parent state, if any.
problem_id integer Database ID of the problem to solve.
session_id
solution_ids Array<integer> List of solution IDs to score.

EMOScoreResponse

Name Type Description
result SCOREBandsResult
state_id The state ID of the newly created state.

ENautilusResult

Name Type Description
closeness_measures Array<number> Closeness measures of each intermediate point.
current_iteration integer Number of the current iteration.
intermediate_points Array<> New intermediate points
iterations_left integer Number of iterations left.
reachable_best_bounds Array<> Best bounds of the objective function values reachable from each intermediate point.
reachable_point_indices Array<Array<integer>> Indices of the reachable points from each intermediate point.
reachable_worst_bounds Array<> Worst bounds of the objective function values reachable from each intermediate point.

ENautilusState

Name Type Description
current_iteration integer
enautilus_results ENautilusResult
id
iterations_left integer
non_dominated_solutions_id
number_of_intermediate_points integer
reachable_point_indices Array<integer>
selected_point

EnautilusStepRequest

Name Type Description
current_iteration integer The number of the current iteration.
iterations_left integer The number of iterations left.
number_of_intermediate_points integer The number of intermediate points to be generated.
parent_state_id
problem_id integer
reachable_point_indices Array<integer> The indices indicating the point on the non-dominated set that are reachable from the currently selected point.
representative_solutions_id
selected_point The selected intermediate point. If first iteration, set this to be the (approximated) nadir point.
session_id

EndProcessPreference

Name Type Description
method string
set_preferences
success

ExternalCheckTerminatorOptions

Name Type Description
name string The name of the termination operator.

ExtraFunctionDB

Name Type Description
func Array<>
id
is_convex boolean Whether the function expression is convex or not (non-convex). Defaults to `False`.
is_linear boolean Whether the function expression is linear or not. Defaults to `False`.
is_twice_differentiable boolean Whether the function expression is twice differentiable or not. Defaults to `False`
name string Descriptive name of the function. Example: 'normalization'.
problem_id
scenario_keys
simulator_path
surrogates
symbol string Symbol to represent the function. This will be used in the rest of the problem definition. It may also be used in UIs and visualizations. Example: 'avg'.

ForestProblemMetaData

Name Type Description
compensation
id
map_json string
metadata_id
metadata_type string
schedule_dict
stand_descriptor
stand_id_field string
years Array<string>

FullIteration

Name Type Description
common_results Array<SolutionReference>
final_result
optimization_preferences
personal_result_index
phase string
starting_result
user_results Array<SolutionReference>
voting_preferences

GenericIntermediateSolutionResponse

Name Type Description
intermediate_solutions Array<SolutionReferenceResponse> The intermediate solutions computed.
reference_solution_1 SolutionReferenceResponse The first solution used when computing intermediate solutions.
reference_solution_2 SolutionReferenceResponse The second solution used when computing intermediate solutions.
state_id The newly created state id

GetSessionRequest

Name Type Description
session_id integer

GMMOptions

Name Type Description
name string Gaussian Mixture Model clustering algorithm.
scoring_method string Scoring method to use for GMM. Either "BIC" or "silhouette". Defaults to "silhouette". This option determines how the number of clusters is chosen.

GNIMBUSAllIterationsResponse

Name Type Description
all_full_iterations Array<FullIteration>

GNIMBUSResultResponse

Name Type Description
common_results Array<SolutionReference>
method string
personal_result_index
phase string
preferences
user_results Array<SolutionReference>

GNIMBUSSwitchPhaseRequest

Name Type Description
group_id integer
new_phase string

GNIMBUSSwitchPhaseResponse

Name Type Description
new_phase string
old_phase string

GroupCreateRequest

Name Type Description
group_name string
problem_id integer

GroupInfoRequest

Name Type Description
group_id integer

GroupModifyRequest

Name Type Description
group_id integer
user_id integer

GroupPublic

Name Type Description
id integer
name string
owner_id integer
problem_id integer
user_ids Array<integer>

HTTPValidationError

Name Type Description
detail Array<ValidationError>

IBEASelectorOptions

Name Type Description
binary_indicator string The binary indicator for IBEA.
kappa number The kappa parameter for IBEA.
name string The name of the selection operator.
population_size integer The population size.

IntegerRandomMutationOptions

Name Type Description
mutation_probability The probability of mutation. Defaults to None, which sets the mutation probability to 1/.
name string The name of the mutation operator.

InteractiveSessionBase

Name Type Description
id
info
user_id

IntermediateSolutionRequest

Name Type Description
context
num_desired
parent_state_id
problem_id integer
reference_solution_1 SolutionInfo
reference_solution_2 SolutionInfo
scalarization_options
session_id
solver
solver_options

KMeansOptions

Name Type Description
n_clusters integer Number of clusters to use. Defaults to 5.
name string KMeans clustering algorithm.

LHSGeneratorOptions

Name Type Description
n_points integer The number of points to generate for the initial population.
name string The name of the generator.

LocalCrossoverOptions

Name Type Description
name string The name of the crossover operator.
xover_probability number The crossover probability.

MaxEvaluationsTerminatorOptions

Name Type Description
max_evaluations integer The maximum number of evaluations allowed.
name string The name of the termination operator.

MaxGenerationsTerminatorOptions

Name Type Description
max_generations integer The maximum number of generations allowed.
name string The name of the termination operator.

MaxTimeTerminatorOptions

Name Type Description
max_time number The maximum time allowed (in seconds).
name string The name of the termination operator.

MixedIntegerRandomMutationOptions

Name Type Description
mutation_probability The probability of mutation. Defaults to None, which sets the mutation probability to 1/.
name string The name of the mutation operator.

MPTMutationOptions

Name Type Description
mutation_exponent number Controls strength of small mutation (larger means smaller mutations).
mutation_probability The probability of mutation. Defaults to None, which sets the mutation probability to 1/.
name string The name of the mutation operator.

NIMBUSClassificationRequest

Name Type Description
current_objectives The objectives used for iteration.
num_desired
parent_state_id
preference ReferencePoint
problem_id integer
scalarization_options
session_id
solver
solver_options

NIMBUSClassificationResponse

Name Type Description
all_solutions Array<SolutionReferenceResponse> All solutions generated by NIMBUS in all iterations.
current_solutions Array<SolutionReferenceResponse> The solutions from the current iteration of nimbus.
previous_objectives The previous solutions objectives used for iteration.
previous_preference ReferencePoint The previous preference used.
saved_solutions Array<SolutionReferenceResponse> The best candidate solutions saved by the decision maker.
state_id The newly created state id

NIMBUSDeleteSaveRequest

Name Type Description
solution_index integer The ID of the solution within the above state.
state_id integer The ID of the save state.

NIMBUSDeleteSaveResponse

Name Type Description
message

NIMBUSFinalizeRequest

Name Type Description
parent_state_id
preferences ReferencePoint
problem_id integer
session_id
solution_info SolutionInfo

NIMBUSFinalizeResponse

Name Type Description
final_solution SolutionReferenceResponse The final solution
state_id The id of the newest state

NIMBUSInitializationRequest

Name Type Description
parent_state_id
problem_id integer
scalarization_options
session_id
solver
solver_options
starting_point

NIMBUSInitializationResponse

Name Type Description
all_solutions Array<SolutionReferenceResponse> All solutions generated by NIMBUS in all iterations.
current_solutions Array<SolutionReferenceResponse> The solutions from the current interation of nimbus.
saved_solutions Array<SolutionReferenceResponse> The best candidate solutions saved by the decision maker.
state_id The newly created state id

NIMBUSIntermediateSolutionResponse

Name Type Description
all_solutions Array<SolutionReferenceResponse> All solutions generated by NIMBUS in all iterations.
current_solutions Array<SolutionReferenceResponse> The solutions from the current iteration of NIMBUS.
reference_solution_1 The first solution used when computing intermediate points.
reference_solution_2 The second solution used when computing intermediate points.
saved_solutions Array<SolutionReferenceResponse> The best candidate solutions saved by the decision maker.
state_id The newly created state id

NIMBUSSaveRequest

Name Type Description
parent_state_id
problem_id integer
session_id
solution_info Array<SolutionInfo>

NIMBUSSaveResponse

Name Type Description
state_id The id of the newest state

NonPreferredSolutionsOptions

Name Type Description
method string The method for handling the non-preferred solutions.
name string The name of the non-preferred solutions option.
preference The non-preferred solutions as a dictionary with objective function symbols as the keys.

NonUniformMutationOptions

Name Type Description
b number Non-uniform mutation decay parameter. Higher values causefaster reduction in mutation strength over generations.
max_generations integer Maximum number of generations in the evolutionary run. Used to scale mutation decay.
mutation_probability The probability of mutation. Defaults to None, which sets the mutation probability to 1/.
name string The name of the mutation operator.

NoRepairOptions

Name Type Description
name string Do not apply any repair to the solutions.

NSGA3SelectorOptions

Name Type Description
invert_reference_vectors boolean Whether to invert the reference vectors (inverted triangle).
name string The name of the selection operator.
reference_vector_options ReferenceVectorOptions Options for the reference vectors.

ObjectiveDB

Name Type Description
func
id
ideal Ideal value of the objective. This is optional.
is_convex boolean Whether the function expression is convex or not (non-convex). Defaults to `False`.
is_linear boolean Whether the function expression is linear or not. Defaults to `False`.
is_twice_differentiable boolean Whether the function expression is twice differentiable or not. Defaults to `False`
maximize boolean Whether the objective function is to be maximized or minimized.
nadir Nadir value of the objective. This is optional.
name string Descriptive name of the objective function. This can be used in UI and visualizations. Example: 'time'.
objective_type ObjectiveTypeEnum The type of objective function. 'analytical' means the objective function value is calculated based on 'func'. 'data_based' means the objective function value should be retrieved from a table. In case of 'data_based' objective function, the 'func' field is ignored. Defaults to 'analytical'.
problem_id
scenario_keys
simulator_path
surrogates
symbol string Symbol to represent the objective function. This will be used in the rest of the problem definition. It may also be used in UIs and visualizations. Example: 'f_1'.
unit The unit of the objective function. This is optional. Used in UIs and visualizations. Example: 'seconds' or 'millions of hectares'.

ObjectiveTypeEnum

Type: string

OptimizationPreference

Name Type Description
method string
phase string
set_preferences

ParameterAdaptationStrategy

Type: string

PowerMutationOptions

Name Type Description
mutation_probability The probability of mutation. Defaults to None, which sets the mutation probability to 1/.
name string The name of the mutation operator.
p number Power distribution parameter. Controls the perturbation magnitude.

PreferredSolutionsOptions

Name Type Description
method string The method for handling the preferred solutions.
name string The name of the preferred solutions option.
preference The preferred solutions as a dictionary with objective function symbols as the keys.

ProblemGetRequest

Name Type Description
problem_id integer

ProblemInfo

Name Type Description
constants
constraints
description string
discrete_representation
extra_funcs
id integer
is_convex
is_linear
is_twice_differentiable
name string
objectives Array<ObjectiveDB>
problem_metadata
scalarization_funcs
scenario_keys
simulators
tensor_constants
tensor_variables
user_id integer
variable_domain VariableDomainTypeEnum
variables

ProblemInfoSmall

Name Type Description
description string
id integer
is_convex
is_linear
is_twice_differentiable
name string
problem_metadata
scenario_keys
user_id integer
variable_domain VariableDomainTypeEnum

ProblemMetaDataGetRequest

Name Type Description
metadata_type string
problem_id integer

ProblemMetaDataPublic

Name Type Description
forest_metadata
problem_id integer
representative_nd_metadata

ProblemSelectSolverRequest

Name Type Description
problem_id integer
solver_string_representation string

RandomBinaryGeneratorOptions

Name Type Description
n_points integer The number of points to generate for the initial population.
name string The name of the generator.

RandomGeneratorOptions

Name Type Description
n_points integer The number of points to generate for the initial population.
name string The name of the generator.

RandomIntegerGeneratorOptions

Name Type Description
n_points integer The number of points to generate for the initial population.
name string The name of the generator.

RandomMixedIntegerGeneratorOptions

Name Type Description
n_points integer The number of points to generate for the initial population.
name string The name of the generator.

ReferencePoint

Name Type Description
aspiration_levels
preference_type string

ReferencePointOptions

Name Type Description
method string The method for handling the reference point.
name string The name of the reference point option.
preference The reference point as a dictionary with objective function symbols as the keys.

ReferenceVectorOptions

Name Type Description
adaptation_distance number Distance parameter for the interactive adaptation methods. Defaults to 0.2.
adaptation_frequency integer Number of generations between reference vector adaptation. If set to 0, no adaptation occurs. Defaults to 0. Only used if no preference is provided.
creation_type string The method for creating reference vectors. Defaults to "simplex". Currently only "simplex" is implemented. Future versions will include "s_energy". If set to "simplex", the reference vectors are created using the simplex lattice design method. This method is generates distributions with specific numbers of reference vectors. Check: https://www.itl.nist.gov/div898/handbook/pri/section5/pri542.htm for more information. If set to "s_energy", the reference vectors are created using the Riesz s-energy criterion. This method is used to distribute an arbitrary number of reference vectors in the objective space while minimizing the s-energy. Currently not implemented.
lattice_resolution Number of divisions along an axis when creating the simplex lattice. This is not required/used for the "s_energy" method. If not specified, the lattice resolution is calculated based on the `number_of_vectors`. If "spherical" is selected as the `vector_type`, this value overrides the `number_of_vectors`.
non_preferred_solutions The non-preferred solutions for interactive adaptation.
number_of_vectors integer Number of reference vectors to be created. If "simplex" is selected as the `creation_type`, then the closest `lattice_resolution` is calculated based on this value. If "s_energy" is selected, then this value is used directly. Note that if neither `lattice_resolution` nor `number_of_vectors` is specified, the number of vectors defaults to 200. Overridden if "spherical" is selected as the `vector_type` and `lattice_resolution` is provided.
preferred_ranges The preferred ranges for interactive adaptation.
preferred_solutions The preferred solutions for interactive adaptation.
reference_point The reference point for interactive adaptation.
vector_type string The method for normalizing the reference vectors. Defaults to "spherical".

RepresentativeNonDominatedSolutions

Name Type Description
description A description of the representative set. Optional.
id
ideal The ideal objective function values of the representative set.
metadata_id
metadata_type string
nadir The nadir objective function values of the representative set.
name string The name of the representative set.
solution_data The non-dominated solutions. It is assumed that columns exist for each variable and objective function. For functions, the `_min` variant should be present, and any tensor variables should be unrolled.

RouletteWheelSelectionOptions

Name Type Description
name string The name of the scalar selection operator.
tournament_size integer The number of individuals participating in the tournament.
winner_size integer The number of winners to select (equivalent to population size).

RPMSolveRequest

Name Type Description
parent_state_id
preference ReferencePoint
problem_id integer
scalarization_options
session_id
solver
solver_options

RPMState

Name Type Description
id
preferences ReferencePoint
scalarization_options
solver
solver_options
solver_results Array<SolverResults>

RVEASelectorOptions

Name Type Description
alpha number The alpha parameter in the angle penalized distance.
name string The name of the selection operator.
parameter_adaptation_strategy ParameterAdaptationStrategy The parameter adaptation strategy to use.
reference_vector_options ReferenceVectorOptions Options for the reference vectors.

ScalarizationFunctionDB

Name Type Description
func Array<>
id
is_convex boolean Whether the function expression is convex or not (non-convex). Defaults to `False`.
is_linear boolean Whether the function expression is linear or not. Defaults to `False`.
is_twice_differentiable boolean Whether the function expression is twice differentiable or not. Defaults to `False`
name string Name of the scalarization function.
problem_id
scenario_keys Array<string>
symbol Optional symbol to represent the scalarization function. This may be used in UIs and visualizations.

SCOREBandsConfig

Name Type Description
axis_positions Dictionary mapping objective names to their positions on the axes in the SCORE bands visualization. The first objective is at position 0.0, and the last objective is at position 1.0. Use this option if you want to manually set the axis positions. If None, the axis positions are calculated automatically based on correlations. Defaults to None.
clustering_algorithm Clustering algorithm to use. Currently supported options: "GMM", "DBSCAN", and "KMeans". Defaults to "DBSCAN".
dimensions List of variable/objective names (i.e., column names in the data) to include in the visualization. If None, all columns in the data are used. Defaults to None.
distance_formula DistanceFormula Distance formula to use. The value should be 1 or 2. Check the paper for details. Defaults to 1.
distance_parameter number Change the relative distances between the objective axes. Increase this value if objectives are placed too close together. Decrease this value if the objectives are equidistant in a problem with objective clusters. Defaults to 0.05.
include_medians boolean Whether to include cluster medians. Defaults to False. If True, the median traces are hidden by default, but can be viewed interactively in the figure.
include_solutions boolean Whether to include individual solutions. Defaults to False. If True, the size of the resulting figure may be very large for datasets with many solutions. Moreover, the individual traces are hidden by default, but can be viewed interactively in the figure.
interval_size number The size (as a fraction) of the interval to use for the bands. Defaults to 0.95, meaning that 95% of the middle solutions in a cluster will be included in the band. The rest will be considered outliers.
scales Optional dictionary specifying the min and max values for each objective. The keys should be the objective names (i.e., column names in the data), and the values should be tuples of (min, max). If not provided, the min and max will be calculated from the data.
use_absolute_correlations boolean Whether to use absolute value of the correlation to calculate the placement of axes. Defaults to False.

ScoreBandsRequest

Name Type Description
clustering_algorithm string Clustering algorithm (DBSCAN or GMM)
clustering_score string Clustering score metric
data Array<Array<number>> Matrix of objective values
dist_parameter number Distance parameter for axis positioning
distance_formula integer Distance formula (1 or 2)
flip_axes boolean Whether to flip axes based on correlation signs
objs Array<string> Array of objective names for each column
use_absolute_corr boolean Use absolute correlation values

ScoreBandsResponse

Name Type Description
axis_dist Array<number> Normalized axis positions
axis_signs Axis direction signs (1 or -1)
groups Array<integer> Cluster group assignments for each data point
obj_order Array<integer> Optimal order of objectives

SCOREBandsResult

Name Type Description
axis_positions Dictionary mapping objective names to their positions on the axes in the SCORE bands visualization. The first objective is at position 0.0, and the last objective is at position 1.0.
bands Dictionary mapping cluster IDs to dictionaries of objective names and their corresponding band extremes (min, max).
cardinalities Dictionary mapping cluster IDs to the number of solutions in each cluster.
clusters Array<integer> List of cluster IDs (one for each solution) indicating the cluster to which each solution belongs.
medians Dictionary mapping cluster IDs to dictionaries of objective names and their corresponding median values.
options SCOREBandsConfig Configuration options used to generate the SCORE bands.
ordered_dimensions Array<string> List of variable/objective names (i.e., column names in the data). Ordered according to their placement in the SCORE bands visualization.

SelfAdaptiveGaussianMutationOptions

Name Type Description
mutation_probability The probability of mutation. Defaults to None, which sets the mutation probability to 1/.
name string The name of the mutation operator.

SimulatedBinaryCrossoverOptions

Name Type Description
name string The name of the crossover operator.
xover_distribution number The SBX distribution index.
xover_probability number The SBX crossover probability.

SimulatorDB

Name Type Description
file
id
name string Descriptive name of the simulator. This can be used in UI and visualizations.
parameter_options
problem_id
symbol string Symbol to represent the simulator. This will be used in the rest of the problem definition. It may also be used in UIs and visualizations.
url

SingleArithmeticCrossoverOptions

Name Type Description
name string The name of the crossover operator.
xover_probability number The crossover probability.

SinglePointBinaryCrossoverOptions

Name Type Description
name string The name of the crossover operator.

SolutionInfo

Name Type Description
name Name to be given to the solution. Optional.
solution_index integer
state_id integer

SolutionReference

Name Type Description
name Optional name to help identify the solution if, e.g., saved.
num_solutions integer
objective_values
objective_values_all Array<>
solution_index The index of the referenced solution, if multiple solutions exist in the reference state.
state StateDB The reference state with the solution information.
state_id integer
variable_values
variable_values_all Array<>

SolutionReferenceResponse

Name Type Description
name
objective_values
solution_index
state_id integer
variable_values

SolverResults

Name Type Description
constraint_values The constraint values of the problem. A negative value means the constraint is respected, a positive one means it has been breached.
extra_func_values The extra function values of the problem.
message string Description of the cause of termination.
optimal_objectives The objective function values corresponding to the optimal decision variables found.
optimal_variables The optimal decision variables found.
scalarization_values The scalarization function values of the problem.
success boolean A boolean flag indicating whether the optimization was successful or not.

SolverSelectionMetadata

Name Type Description
id
metadata_id
metadata_type string
solver_string_representation string The string representation of the selected solver.

StateDB

Name Type Description
id
parent_id
problem_id
session_id
state_id

Template1Options

Name Type Description
algorithm_name string The unique name of the algorithm.
crossover The crossover operator options.
generator The population generator options.
mutation The mutation operator options.
name string The name of the template.
repair The repair operator options.
seed integer The seed for random number generation.
selection The selection operator options.
termination The termination operator options.
use_archive boolean Whether to use an archive.
verbosity integer The verbosity level of the operators.

Template2Options

Name Type Description
algorithm_name string The unique name of the algorithm.
crossover The crossover operator options.
generator The population generator options.
mate_selection The mate selection operator options.
mutation The mutation operator options.
name string The name of the template.
repair The repair operator options.
seed integer The seed for random number generation.
selection The selection operator options.
termination The termination operator options.
use_archive boolean Whether to use an archive.
verbosity integer The verbosity level of the operators.

Tensor

Type:

TensorConstantDB

Name Type Description
id
name string Descriptive name of the tensor representing the values. E.g., 'distances'
problem_id
shape Array<integer>
symbol string Symbol to represent the constant. This will be used in the rest of the problem definition. Notice that the elements of the tensor will be represented with the symbol followed by indices. E.g., the first element of the third element of a 2-dimensional tensor, is represented by 'x_1_3', where 'x' is the symbol given to the TensorVariable. Note that indexing starts from 1.
values Tensor

TensorVariableDB

Name Type Description
id
initial_values
lowerbounds
name string Descriptive name of the variable. This can be used in UI and visualizations. Example: 'velocity'.
problem_id
shape Array<integer>
symbol string Symbol to represent the variable. This will be used in the rest of the problem definition. Notice that the elements of the tensor will be represented with the symbol followed by indices. E.g., the first element of the third element of a 2-dimensional tensor, is represented by 'x_1_3', where 'x' is the symbol given to the TensorVariable. Note that indexing starts from 1.
upperbounds
variable_type VariableTypeEnum Type of the variable. Can be real, integer, or binary. Note that each element of a TensorVariable is assumed to be of the same type.

Tokens

Name Type Description
access_token string
refresh_token string
token_type string

TournamentSelectionOptions

Name Type Description
name string The name of the scalar selection operator.
tournament_size integer The number of individuals participating in the tournament.
winner_size integer The number of winners to select (equivalent to population size).

UniformIntegerCrossoverOptions

Name Type Description
name string The name of the crossover operator.

UniformMixedIntegerCrossoverOptions

Name Type Description
name string The name of the crossover operator.

Url

Name Type Description
auth Optional. A tuple of username and password to be used for authentication when making requests to the URL.
url string A URL to the simulator. A GET request to this URL should be used to evaluate solutions in batches.

UserPublic

Name Type Description
group_ids
id integer
role UserRole
username string

UserRole

Type: string

UtopiaRequest

Name Type Description
problem_id integer Problem for which the map is generated
solution SolutionInfo Solution for which to generate the map

UtopiaResponse

Name Type Description
description string Description shown above the map.
is_utopia boolean True if map exists for this problem.
map_json MapJSON representation of the geography.
map_name string Name of the map.
options A dict with given years as keys containing options for each year.
years Array<string> A list of years for which the maps have been generated.

ValidationError

Name Type Description
loc Array<>
msg string
type string

VariableDB

Name Type Description
id
initial_value Initial value of the variable. This is optional.
lowerbound Lower bound of the variable.
name string Descriptive name of the variable. This can be used in UI and visualizations. Example: 'velocity'.
problem_id
symbol string Symbol to represent the variable. This will be used in the rest of the problem definition. It may also be used in UIs and visualizations. Example: 'v_1'.
upperbound Upper bound of the variable.
variable_type VariableTypeEnum Type of the variable. Can be real, integer or binary.

VariableDomainTypeEnum

Type: string

VariableTypeEnum

Type: string

VotingPreference

Name Type Description
method string
set_preferences

Security schemes

Name Type Scheme Description
OAuth2PasswordBearer oauth2
APIKeyCookie apiKey