Inverse Schema

Inverse objects represent steps in the inverse solution and/or optimization process.

Schema

{
    "id": 123,
    "created_at": "2025-01-31T10:00:00.000Z",
    "updated_at": "2025-01-31T10:00:00.000Z",
    "disabled_at": null,
    "loaded_at": "2025-01-31T10:00:01.000Z",
    "satisfied_at": null,
    "stopped_at": null,
    "exhausted_at": null,
    "iteration": 1,
    "l1_norm": 0.001,
    "suggest_time": 125000000,
    "compute_time": 50000000,
    "input": [1.0, 2.0, 3.0],
    "output": [4.0, 5.0, 6.0],
    "results": [
        // Result objects
    ]
}

Fields

Field
Type
Required
Description

id

integer

Yes

Unique identifier

created_at

string

Yes

Creation timestamp

updated_at

string

Yes

Last update timestamp

disabled_at

string

No

Disable timestamp

loaded_at

string

No

When output was loaded

satisfied_at

string

No

When all objectives satisfied

stopped_at

string

No

When manually stopped

exhausted_at

string

No

When max iterations reached

iteration

integer

Yes

Current iteration number

l1_norm

float

Yes

Current L1 norm error

suggest_time

integer

Yes

Suggestion time (nanoseconds)

compute_time

integer

Yes

Computation time (nanoseconds)

input

array[float]

Yes

Input parameter values

output

array[float]

No

Output values (if loaded)

results

array[Result]

No

Individual objective results

Stop Reasons

The stop reason can be determined from timestamps:

Reason
Status
Description

Running

0

No stop timestamps set

Satisfied

1

satisfied_at is set

Stopped

2

stopped_at is set

Exhausted

3

exhausted_at is set

Priority order if multiple set:

  1. satisfied_at

  2. stopped_at

  3. exhausted_at

Input/Output Arrays

  • input array length must match project input_count

  • output array length must match objective count

  • all values must be valid floats/integers

  • arrays must not contain null values

Performance Metrics

  • suggest_time: Time to generate next inputs

  • compute_time: Time to evaluate outputs

  • Higher times may indicate:

    • Complex objective landscape

    • Numerical instability

    • Resource constraints

Results Array

Contains Result objects matching objective count:

  • One Result per objective

  • Result.number matches objective index

  • Results track satisfaction status

  • Null until output is loaded

  • All results must be satisfied for inverse.satisfied_at to be set

Usage Notes

  1. Check stopReason using helper methods:

    if inverse.should_stop():
        reason = inverse.get_stop_reason()
  2. Examine results for detailed status:

    for result in inverse.results:
        print(f"Objective {result.number}: {'✓' if result.satisfied else '✗'}")
  3. Monitor performance:

    print(f"Suggestion took {inverse.suggest_time/1000000:.2f}ms")
    print(f"Computation took {inverse.compute_time/1000000:.2f}ms")
  4. Track convergence:

    print(f"Current L1 norm: {inverse.l1_norm}")

Last updated