Load Objectives

Loads optimization objectives for a trial in globalMOO.

Endpoint

POST /models/{model_id}/projects/{project_id}/trials/{trial_id}/objectives

Path Parameters

Parameter
Type
Required
Description

model_id

integer

Yes

ID of the model

project_id

integer

Yes

ID of the project

trial_id

integer

Yes

ID of the trial

Request Parameters

Parameter
Type
Required
Description

objectives

array[float]

Yes

Target values for each objective

objectiveTypes

array[string]

Yes

Type for each objective (see below)

initialInput

array[float]

Yes

Initial input values (must match project input count)

initialOutput

array[float]

Yes

Initial output values (must match objectives count)

desiredL1Norm

float

Yes

Desired L1 norm for objectives (default: 0.0)

minimumBounds

array[float]

Conditional

Lower bounds (required for percent/value types)

maximumBounds

array[float]

Conditional

Upper bounds (required for percent/value types)

Objective Types

Valid objective types are:

  • exact - Match target value exactly within L1 norm

  • percent - Within a percentage range of target value (requires bounds)

  • value - Within an absolute range of target value (requires bounds)

  • lessthan - Less than target value

  • lessthan_equal - Less than or equal to target value

  • greaterthan - Greater than target value

  • greaterthan_equal - Greater than or equal to target value

  • minimize - Find minimum possible value

  • maximize - Find maximum possible value

Request Format

Response Format

Examples

Error Responses

Status Code
Description

400

Invalid request - Missing required fields, invalid format, or validation errors

401

Unauthorized - Invalid API key

404

Model, project, or trial not found

429

Too many requests - Rate limit exceeded

500

Internal server error

Server-Side Validation

The API performs the following validations:

  • Model, project, and trial IDs must be positive integers

  • 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

  • All numeric values must be valid floating point numbers

  • Objective types must be valid types as listed above

  • For percent and value objectives:

    • minimumBounds and maximumBounds are required

    • maximumBounds values must be greater than minimumBounds

  • desiredL1Norm must be provided and non-negative (defaults to 0.0)

  • Trial must exist and be in an active state

Last updated