Skip to main content

OptimizationResultResponse

Retained plans, total iterations and stop reason.

plans object[]required

The plans of the last iterations, oldest first: between one and three. The last one is the final plan.

Possible values: >= 1, <= 3

  • Array [
  • iterationinteger<int32>required

    Iteration that produced this plan, starting at 1.

    Possible values: >= 1

    stats objectrequired

    Aggregated statistics of this plan, computed for the target of the request.

    covernumber<double>

    People of the target reached at least once by the plan, as an absolute figure.

    coverPercentnumber<double>

    cover as a percentage (0 to 100) of the universe of the target.

    grpnumber<double>

    Gross rating points of the plan.

    contactsnumber<double>

    Total contacts of the plan in the target, as an absolute figure.

    costnumber<double>

    Net (discounted) cost of the plan: the value compared with a BUDGET objective.

    totalInsertionsinteger<int32>

    Sum of the insertions of all the carriers of the plan.

    affinitynumber<double>

    Not currently returned by the API.

    affinityIndexnumber<double>

    Not currently returned by the API.

    otsnumber<double>

    Not currently returned by the API.

    coverMaxnumber<double>

    Maximum cover reachable with all the candidate carriers.

    coverMaxPercentnumber<double>

    Not currently returned by the API.

    fidelitynumber<double>

    Not currently returned by the API.

    cpmContactsnumber<double>

    Net cost per thousand contacts.

    costPerGrpnumber<double>

    Net cost per GRP point.

    cpmIndividualsnumber<double>

    Not currently returned by the API.

    carriers object[]required

    Insertions assigned to each carrier in this plan.

  • Array [
  • idstringrequired

    Identifier of the carrier, as sent in carriers[].id of the request.

    insertionsinteger<int32>required

    Insertions assigned to this carrier in this plan.

  • ]
  • ]
  • totalIterationsinteger<int32>required

    Number of iterations the engine executed. Only the last ones are returned in plans.

    stopReasonstringrequired

    Why the run stopped. Switch on this value; do not parse messages. With OBJECTIVE_REACHED, see objectives for the ones that were met.

    Enum ValueDescription
    OBJECTIVE_REACHEDThe last plan reached at least one objective.
    DURATION_CAP_REACHEDThe run was stopped after 3600 seconds of execution; the plans are the best found until then.
    NO_FURTHER_IMPROVEMENTThe engine could not improve the plan further.
    ENGINE_ERRORThe run stopped for another reason after producing at least one plan; the plans may be far from the objectives.

    Possible values: [OBJECTIVE_REACHED, DURATION_CAP_REACHED, NO_FURTHER_IMPROVEMENT, ENGINE_ERROR]

    objectives object[]

    State, at the final plan, of each objective of the request with a value greater than 0. More than one objective can be reached at once.

  • Array [
  • typestringrequired

    Metric of the objective, with the same values as type in the request.

    Possible values: [CONTACTS, GRP, COVERAGE, COVERAGE_PERCENT, BUDGET]

    targetnumber<double>required

    The value requested for this objective.

    achievednumber<double>

    Value the final plan achieved for this metric. It can be absent.

    completedPercentnumber<double>

    achieved / target x 100, without a cap: it can exceed 100.

    reachedbooleanrequired

    Whether the objective was met: achieved is at least target.

  • ]
  • OptimizationResultResponse
    {
    "plans": [
    {
    "iteration": 0,
    "stats": {
    "cover": 0,
    "coverPercent": 0,
    "grp": 0,
    "contacts": 0,
    "cost": 0,
    "totalInsertions": 0,
    "affinity": 0,
    "affinityIndex": 0,
    "ots": 0,
    "coverMax": 0,
    "coverMaxPercent": 0,
    "fidelity": 0,
    "cpmContacts": 0,
    "costPerGrp": 0,
    "cpmIndividuals": 0
    },
    "carriers": [
    {
    "id": "string",
    "insertions": 0
    }
    ]
    }
    ],
    "totalIterations": 0,
    "stopReason": "OBJECTIVE_REACHED",
    "objectives": [
    {
    "type": "CONTACTS",
    "target": 0,
    "achieved": 0,
    "completedPercent": 0,
    "reached": true
    }
    ]
    }