Batched Results
Use this page when solve returns a
BatchSolveResult. Each batch entry represents one
set of
project keys.
Start with Batched Solves to create a batch.
Batch Result Data
BatchSolveResult provides these types of
result data:
project_file: the solved project file.keys: metadata for the batched project keys.costs: tabular batched cost data.eigenvalues: tabular batched eigenvalue data.postprocesses: a collection of batched postprocesses.
Exports of BatchSolveResult data include a
batch dimension.
Use to_dict() for dictionary exports
from batched project-key views and
to_dict() for batched postprocess views. The
deprecated to_mapping() compatibility
name remains available for both views, including
BatchPostprocessRecord.to_mapping().
BatchSolveResult also provides:
success_indices: indices of successful solve entries.failure_indices: indices of failed solve entries.
Select Entries And Slices
Select individual entries or slices from a
BatchSolveResult.
Use an index in square brackets to select one
BatchSolveEntry from the
BatchSolveResult. Index 0 selects the first
entry:
entry = batch[0]
Use a slice, such as batch[1:4], to create
another BatchSolveResult. The first number is
included and the second number is excluded:
subset = batch[1:4]
The batch preserves input order. Slicing preserves the original entry indices.
Use len to get the number of batch entries and iterate over the batch to inspect each
BatchSolveEntry in input order:
print(len(batch))
for entry in batch:
print(entry.index, entry.keys)
Use success_indices and
failure_indices to select
entry groups.
Inspect One Entry
A BatchSolveEntry provides these attributes:
index: the batch index.keys: the keys used for the solve call.result: theSolveResultobject when the solve call succeeded.failure: aBatchSolveFailurewhen this entry failed.log: solve log information, as for aSolveResult.
Batch Export Dimensions
The costs,
eigenvalues, and
postprocesses attributes follow the same rules as the
corresponding SolveResult attributes. Their
exports include an extra batch dimension.
Batch exports use explicit dimensions and identities:
batch_indexidentifies the original input set of project keys.row_indexidentifies a row within one result entry.is_validmarks result data that is available.is_paddedmarks positions added to align variable-length results.
Unavailable rows use NaN values where the export format requires padding. The is_valid
mask distinguishes unavailable data from solver data that is actually NaN.
Export Limits
Batch results do not provide wide-form aggregate DataFrame exports. Use long-form DataFrame methods for batch tables and postprocess rows.
See Data Exporting for general format behavior and Resultbag for cached batch acquisition.