Run a template
- Choose a fresh Domain ID. Send
POST /domainswith the template object underlearning.transition. Inschema, declare the signal names from the template’s input and target paths without thevalues.prefix, and declare"outcome"inevent_types. - Send completed observations to
POST /domains/{id}/events, withevent_type: "outcome"and the input and target values undervalues. Keep the same authentication and session for every request. Checklearner_eligibilityto confirm admission and count the applicable observations before running a query. - Send
POST /domains/{id}/querywith the pre-outcome inputs undercontext.values. Requestdecision_idandtransition_predictionfor a forecast ordecision_idandtransition_planfor a plan. Put the outcome’s identifier incontext.metadata.future_idif you intend to revise or resolve it. - When the outcome becomes available, post one event with the pre-outcome inputs, the measured targets, and the returned
decision_idandfuture_idinmetadata. For a plan, also record the executed action invalues. Inspect learning and troubleshoot.
learning.transition with that object before sending the request.
Forecast joint demand and generation
Forecast site load and wind generation for the next hour. The numeric levels can move with weather and time of day. Uselinear_residual to transport the numeric levels and keep the residual outcomes joint.
values contain the earlier readings and both measured outcomes.
numeric_transport.target_paths, then read joint atoms to estimate events such as high load with low generation. If the cost of reserving capacity is already known, compute the expected cost of each permitted capacity in your application using the forecast probabilities. Read the joint atoms.
Pool sites for cold-start forecasts
Reuse this declaration for sites with compatible dynamics. Divide load and generation by an available site-specific scale, such as rated capacity, and name the resulting paths according to their units. Apply the same transform to past inputs and outcome records. Keep site IDs in your application trace and give each outcome a uniquefuture_id. Leave site identity out of the learner’s inputs and grouping. Hold out one site when checking how well shared history serves a first forecast there, then restore its physical units when applying capacity rules.
Forecast near-zero joint deviations
For regional generation forecast errors, compute deviations from the baseline forecast issued at the same time. If those deviations have little conditional mean structure, start withnumeric_transport: "none". The distribution can still change shape as weather conditions change.
probability over joint atoms where all three observed-minus-baseline errors are below your chosen thresholds. Compare prior and conditional on the same realized errors to check whether evidence improves the joint forecast.
Revise when a feed arrives late
Reuse the joint demand and generation template. Start withconditioning: "kernel". For a wider deployment with many observed masks, size max_calibration_groups for the mask, group, and action combinations you want to track. For example, 1024 is the supported upper bound. Size max_pending_forecasts for the maximum number of unresolved revisions across open outcomes.
The first query can use only the load and calendar fields. If the weather feed arrives later, include the new fields alongside the earlier ones. Send these as the context in separate queries, preserving the future_id.
decision_id and the same future_id. Inspect the observed paths at each issue time and the number of revisions resolved. Issue and revise a forecast.
Plan one dispatch step under a reserve limit
Choose among three storage commands using current reserve and expected demand. Set the modeled risk limit for leaving the interval below 20% reserve to 10%. Use the objective scale in percentage points.reserve_pct and demand_mw with the executed action and measured next_reserve_pct. Collect observations for all three actions across the states you expect to query. For a plan, send only the current reserve and demand. Read transition_plan.selected_action after confirming status: "planned" and failure_probability_upper within the configured limit. Use your application’s fallback during warmup and abstention.
Plan two storage intervals
Use this template when current dispatch changes the reserve you can draw on next interval. Here the state is a reserve band. The observed step payoff is a relative utility score between-2 and 2, so a scale of 4 covers any difference between successive rewards without clipping.
Start a new plan at the measured reserve band with
step_reward: 0.0. With this two-step objective, a plan earning rewards 2 and -1 scores better on the objective term than one earning 0 and -1, before constraints. Inspect candidate_sequences to verify that ordering on known transitions. Include and refresh valid transitions for the absorbing below_floor state if it can appear in projected rollouts. Execute the first selected action only, then query again with the actual state. Plan across multiple steps.
Run the Python smoke tests
Set the API base to your authorized deployment and supply its key. The base must include/api/v1.
futures_example.py. It uses the standard library. Choose a case and run it from a writable directory.
PASS line for each successful check. The multi-step case sends 72 transitions and queries between observations. Requests, responses and checks are saved under futures-... in the working directory. The trace excludes authentication headers. After inspecting the results, delete and verify the disposable Domains using their IDs in the requests trace.
