Initialize Inverse Optimization

Initializes an inverse optimization process for a trial in globalMOO.

Endpoint

POST /trials/{trial_id}/initialize-inverse

Request Parameters

Parameter
Type
Required
Description

convergence

float

Yes

Convergence criterion (must be positive)

objectives

array[float]

Yes

Target values for each objective

objectiveTypes

array[string]

Yes

Type for each objective (see valid types below)

initialInput

array[float]

Yes

Initial input values (must match project input count)

initialOutput

array[float]

Yes

Initial output values (must match objectives length)

minimumBounds

array[float]

Yes

Lower bounds (for percent/value objectives)

maximumBounds

array[float]

Yes

Upper bounds (for percent/value objectives)

desiredL1Norm

float

Yes

Desired L1 norm (defaults to 0.0)

Request Format

{
    "convergence": 0.001,
    "objectives": [100.0, 50.0, 25.0],
    "objectiveTypes": ["percent", "value", "percent"],
    "initialInput": [1.0, 2.0, 3.0],
    "initialOutput": [90.0, 45.0, 20.0],
    "minimumBounds": [-5.0, -2.0, -1.0],
    "maximumBounds": [5.0, 2.0, 1.0],
    "desiredL1Norm": 0.0
}

Response Format

Examples

Error Responses

Status Code
Description

400

Invalid request - Missing required fields or invalid format

401

Unauthorized - Invalid API key

404

Trial not found

429

Too many requests - Rate limit exceeded

500

Internal server error

Validation Rules

  • All numeric arrays (objectives, initialInput, initialOutput) must be arrays of floats

  • Array lengths must be consistent:

    • objectives and objectiveTypes must have the same length

    • initialInput length must match the project's input count

    • initialOutput length must match objectives length

    • minimumBounds/maximumBounds must match objectives length when required

  • Convergence must be a positive float

  • objectiveTypes must contain valid type strings (see above)

  • For PERCENT and VALUE objectives:

    • minimumBounds and maximumBounds are required

    • maximumBounds values must be greater than minimumBounds

  • For EXACT objectives, convergence must be positive, and all entries must be EXACT. This objective type refers to the total L1-norm for the outcomes vector, not any specific outcome.

  • All input and output values must be valid floating point numbers

Last updated