Skip to main content

Conditional simulation workflow

This compute task executes a series of steps to perform a univariate conditional simulation workflow. The workflow is centered around turning bands conditional simulation and includes the following pre- and post-processing steps.

  1. Break ties (a.k.a. despiking) - Identify duplicate data values and add a small perturbation such that ranking of values can be performed properly for the normal score transform.
  2. Normal score transform - Transform data values to gaussian space using a quantile-quantile transform.
  3. Turning bands simulation - Perform the simulation. The turning bands algorithm is used to generate a gaussian random field based on the input distribution of values and the variogram model. Next, unconditional simulations are conditioned by kriging. Note that the initial simulation takes place at the point scale in gaussian space. Results are back-transformed and averaged to the block scale within the simulator. A subset of point scale simulations are retained for model validation.
  4. Post-processing - The ensemble of simulations is post-processed to produce a series of summary products including:
    • mean - The mean value for each location across all simulations.
    • variance - The variance of the local conditional distribution at each location.
    • P10 - For each location calculate the 10th percentile, there is a 90% probability of being above this value.
    • P50 - For each location calculate the 50th percentile, this is the median.
    • P90 - For each location calculate the 90th percentile, there is a 90% probability of being below this value.
    • ore_loss_cat - (optional) material categorization based on input processing costs.
  5. Validation dashboard - A series of statistical metrics and diagnostic plots are generated to assist in model validation. This summary of plots and statistics is presented as a dashboard.

Parameters

  • source_object (geoscience object reference)
    • Reference to the Geoscience Object containing the source points used for conditioning the simulation. Must be a pointset with schema version 1.2.0 or 1.3.0.
  • source_attribute (geoscience object attribute reference)
    • Reference to a one-dimensional continuous attribute inside source_object that contains the input values. The values are transformed to normal-score space using the provided distribution.
  • neighborhood (object)
    • Search parameters that determine which nearby points to use for each evaluation point during simulation conditioning.
    •   {
      "anisotropy": {
      "ellipsoid_ranges": {
      "major": 100.0, // Major axis length of the search ellipsoid
      "semi_major": 75.0, // Semi-major axis length
      "minor": 50.0 // Minor axis length
      },
      "rotation": {
      "dip_azimuth": 45.0, // First rotation about z-axis (0-360 degrees)
      "dip": 30.0, // Second rotation about x-axis (0-180 degrees)
      "pitch": 0.0 // Third rotation about z-axis (0-360 degrees)
      }
      },
      "max_samples": 15, // Maximum number of nearby samples to use
      "min_samples": 1 // Minimum number of nearby samples to use
      }
  • distribution (object, optional)
    • Parameters for the continuous distribution transformation, including optional weights and tail extrapolation settings.
    •   {
      "weights": "locations.attributes[1]", // Optional weights attribute reference
      "tail_extrapolation": {
      "upper": {
      "power": 0.5,
      "max": 100.0
      },
      "lower": {
      "power": 0.3,
      "min": 0.1
      }
      }
      }
  • variogram_model (geoscience object reference)
    • Reference to a variogram used to model the covariance within the domain. Must use schema version 1.1.0.
  • kriging_method (string)
    • The kriging method to use for the conditioning step. The options are "simple" (default) or "ordinary".
  • block_discretization (object)
    • Number of subdivisions within each block for simulation.
    •   {
      "nx": 5, // Number of subdivisions in x direction (1-9)
      "ny": 5, // Number of subdivisions in y direction (1-9)
      "nz": 5 // Number of subdivisions in z direction (1-9)
      }
  • number_of_lines (integer, optional)
    • Number of lines to use for the turning-band simulation. Default is 500, range 1-1000.
  • number_of_simulations (integer, optional)
    • Number of simulations to run. Default is 1, range 1-100.
  • random_seed (integer, optional)
    • Random seed for simulation and tie-breaking. Default is 38239342.
  • number_of_simulations_to_save (integer, optional)
    • Number of simulations to publish to the output object. Default is 5, range 0-100.
  • target_object (geoscience object target)
    • Reference to the geoscience object containing the grid to evaluate the simulation onto. A new attribute will be created on this object. Must be a regular-3d-grid or regular-masked-3d-grid with schema version 1.2.0 or 1.3.0.
  • location_wise_quantiles (array, optional)
    • List of quantiles (0.0 to 1.0) to compute for each location.
  • perform_validation (boolean, optional)
    • Whether to run validation and generate a validation report. Default is false.
  • report_context (object, optional)
    • Contextual information to be included in the validation report, including title and details.
    •   {
      "title": "Conditional Simulation Report", // Title of the report
      "details": [ // Up to ten detail entries
      {
      "label": "Creator",
      "value": "Jane Doe"
      },
      {
      "label": "Project",
      "value": "My Exploration Project"
      },
      ...
      ]
      }
  • loss_calculation (object, optional)
    • Settings for loss calculation including material categories, processing costs, and target attribute.
    •   {
      "material_categories": [
      {
      "cutoff_grade": 2.5,
      "metal_price": 10.0,
      "label": "ore",
      },
      ...
      ],
      "processing_cost": 2.3,
      "mining_waste_cost": 1.0,
      "mining_ore_cost": 5.0,
      "metal_recovery_fraction": 0.85,
      "target_attribute": {
      "operation": "create",
      "name": "my-estimated-loss",
      }
      }

Example

For more information, see the conditional simulation workflow API reference.

Request

requests.post(
"https://{hub}.api.seequent.com/compute/orgs/{org_id}/geostat/consim",
headers={"Authorization": "Bearer {token}"},
json={
"parameters": {
"source_object": "https://{hub}.api.seequent.com/geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/path/my-pointset.json",
"source_attribute": "locations.attributes[?name=='my-attribute']",
"neighborhood": {
"anisotropy": {
"ellipsoid_ranges": {
"major": 100.0,
"semi_major": 75.0,
"minor": 50.0,
},
"rotation": {
"dip_azimuth": 45.0,
"dip": 30.0,
"pitch": 0.0,
}
},
"max_samples": 15,
"min_samples": 1,
},
"distribution": {
"weights": "locations.attributes[1]", // Optional weights attribute reference
"tail_extrapolation": {
"upper": {
"power": 0.5,
"max": 100.0,
},
"lower": {
"power": 0.3,
"min": 0.1,
},
},
},
"variogram_model": "https://{hub}.api.seequent.com/geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/path/my-variogram.json",
"kriging_method": "simple",
"block_discretization": {
"nx": 5,
"ny": 5,
"nz": 5,
},
"number_of_lines": 500,
"number_of_simulations": 10,
"random_seed": 123456,
"number_of_simulations_to_save": 5,
"target_object": {
"reference": "https://{hub}.api.seequent.com/geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/path/my-grid.json",
"overwrite": True,
"description": "A new description for my masked grid.",
"tags": {
"Simulated": "true"
},
},
"location_wise_quantiles": [0.1, 0.5, 0.9],
"perform_validation": True,
"report_context": {
"title": "My report context",
"details": [
{
"label": "Creator",
"value": "Jane Doe",
},
],
},
"loss_calculation": {
"material_categories": [
{
"cutoff_grade": 2.5,
"metal_price": 10.0,
"label": "ore",
},
],
"processing_cost": 2.3,
"mining_waste_cost": 1.0,
"mining_ore_cost": 5.0,
"metal_recovery_fraction": 0.85,
"target_attribute": {
"operation": "create",
"name": "my-estimated-loss",
},
},
},
},
)

Result

{
"message": "Conditional simulation succeeded.",
"results": {
"target": {
"name": "my-grid",
"reference": "https://{hub}.api.seequent.com/geoscience-object/orgs/{org_id}/workspaces/{workspace_id}/objects/path/my-grid.json",
"description": "A new description for my masked grid.",
"schema_id": "/objects/regular-masked-3d-grid/1.3.0",
"summary_attributes": {
"mean": {
"name": "mean",
"reference": "cell_attributes[?key=='3d3b3839-c4df-4b7b-9705-7d451ac2684e']"
},
"variance": {
"name": "variance",
"reference": "cell_attributes[?key=='6d93df6e-3042-4040-8500-1c9de22d3ee5']"
},
"min": {
"name": "min",
"reference": "cell_attributes[?key=='3360ec99-6211-4839-8fe5-ce4b1c399441']"
},
"max": {
"name": "max",
"reference": "cell_attributes[?key=='3d90b077-b3e7-4cf9-bc43-d0b8e534b197']"
}
},
"quantile_attributes": [
{
"name": "Quantile: 0.1",
"quantile": 0.1,
"reference": "cell_attributes[?key=='38741f40-2171-4117-894a-4524c35ab76b']"
},
{
"name": "Quantile: 0.5",
"quantile": 0.5,
"reference": "cell_attributes[?key=='6ca4250b-4989-4b5c-832f-b72700f9a93e']"
},
{
"name": "Quantile: 0.9",
"quantile": 0.9,
"reference": "cell_attributes[?key=='3395e9b4-b96e-490d-9a99-f9178cae0860']"
}
],
"simulations": {
"name": "simulation-results",
"reference": "cell_attributes[?key=='5f4e2c3e-3d3b-4f4a-8e2a-1c2b3d4e5f6a']"
},
"simulations_normal_score": {
"name": "simulation-results-gaussian",
"reference": "cell_attributes[?key=='7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d']"
},
"point_simulations": {
"name": "simulation-results-point",
"reference": "cell_attributes[?key=='8f7e6d5c-4b3a-2f1e-0d9c-8b7a6e5d4c3b']"
},
"point_simulations_normal_score": {
"name": "simulation-results-point-gaussian",
"reference": "cell_attributes[?key=='9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d']"
},
"loss_calculation_attribute": {
"name": "my-estimated-loss",
"reference": "cell_attributes[?key=='0a1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d']"
},
},
"validation_summary": {
"reference_mean": 2.45,
"mean": 2.43
},
"validation_report": {
"name": "validation.json",
"reference": "https://{hub}.api.seequent.com/file/v2/orgs/{org_id}/workspaces/{workspace_id}/files/path/validation.json"
},
"links": {
"dashboard": "https://simval.seequent.com/{org_id}/workspaces/{hub}/{workspace_id}/reports/{file_id}/original"
}
}
}