> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognite.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Cognite Data Fusion (CDF) is an industrial DataOps platform. Prefer English docs unless the user asks for another locale.
> Follow /_llms/ index links recursively until you reach page URLs ending in .md. Fetch those Markdown twins instead of HTML.
> For REST APIs, default to calendar version 20230101 (stable). Use 20230101-beta or 20230101-alpha only if the user is on a preview API. Cite paths under /api-reference/concepts/<version>/ and the Cdf-Version header. Prefer the Python SDK (cognite-sdk) unless the user is in JavaScript/TypeScript.
> Start here by task: platform overview /cdf/index.md; data modeling /cdf/dm/index.md; data integration /cdf/integration/index.md; access /cdf/access/index.md; CDF Toolkit /cdf/deploy/cdf_toolkit/index.md; REST quickstart /dev/quickstart.md; Python SDK https://cognite-sdk-python.readthedocs-hosted.com/en/stable/; Atlas AI /cdf/atlas_ai/concepts/index.md; Flows apps /cdf/flows/index.md; MCP and IDE setup /dev/guides/ide_ai_integration.md.
> For implementation work, also load /skill.md.

# Parse GAP model revisions

> Learn how the GAP connector extracts information models from simulator model revisions including flowsheet hierarchy, equipment properties, and connections.

> [!WARNING]
>
> The features described in this section are in [public preview](https://docs.cognite.com/cdf/product_feature_status.md#public-preview) and may change.

The GAP connector extracts the information model from GAP simulator model revisions. This feature parses the **flowsheet hierarchy** of GAP simulator model revisions, including **functional blocks**, such as process equipment, **block properties**, such as operating parameters, physical properties and configuration settings, **connections** between blocks, and **graphical information** for visualization processes.

The connector stores the parsed information in Cognite Data Fusion (CDF) alongside the associated simulator model revision.

## Enable model extraction

By default, model extraction is disabled. Enable the feature by adding the following to your `config.yml`:

```yaml theme={"languages":{"custom":["/_languages/kuiper.json"]}}
automation:
  information-model-extraction-enabled: true
```

## Prerequisites

Model parsing automatically activates when:

* A valid `modelparsing.config.yml` file exists in the connector's configuration directory.

* Connector configuration `automation.information-model-extraction-enabled` is set to `true`.

* A new simulator model revision is created or an existing model revision is reparsed.

* The GAP model contains a **single** flowsheet.

## Configure parsing

You configure the model parsing in a separate YAML file (`modelparsing.config.yml`) that defines which properties to extract from different equipment types.

Use `modelparsing.config.example.yml` for guidance.

### Configuration file structure

```yaml theme={"languages":{"custom":["/_languages/kuiper.json"]}}
# Common properties extracted from all equipment types
common-properties:
  - name: OilRate
    value-type: DOUBLE
    unit:
      quantity: Liquid Rate
    description: Oil rate from the network solver.
    address-suffix: .SolverResults[0].OilRate
  - name: WaterRate
    value-type: DOUBLE
    unit:
      quantity: Liquid Rate
    description: Water rate from the network solver.
    address-suffix: .SolverResults[0].WaterRate

# Equipment-specific properties
equipment-properties:
  - equipment: well
    properties:
      - name: WellModel
        value-type: STRING
        description: Type of well model used.
        address-suffix: .WellModel
      - name: TypeWell
        value-type: STRING
        description: Type of well.
        address-suffix: .TypeWell
  - equipment: pipe
    properties:
      - name: PipeModel
        value-type: STRING
        description: Type of pipeline model used.
        address-suffix: .PipeModel
      - name: PipeCorr
        value-type: STRING
        description: Type of pipeline correlation used.
        address-suffix: .PIPECORR
```

### Property configuration parameters

| Parameter | Description | Required |
| - | - | - |
| **name** | The display name for the property. | Yes |
| **value-type** | The data type of the property. Supported values: `STRING`, `DOUBLE`, `STRING_ARRAY`, `DOUBLE_ARRAY`. | Yes |
| **address-suffix** | The GAP address suffix to append to the equipment address to retrieve the property value. | Yes |
| **unit.quantity** | The unit quantity associated with the property. Only relevant for numeric properties. | No |
| **description** | A brief description of the property for documentation purposes. | No |

## Extract information

This is how the GAP connector extracts information from simulator model revisions:

**1. Loads the model**

When a simulator model revision is validated, the connector loads the GAP model.

**2. Discovers equipment**

The parser queries GAP to discover all equipment types and instances in the model.

**3. Extracts properties**

For each equipment instance, the parser:

* Extracts common properties defined in the configuration.

* Extracts equipment-specific properties based on the equipment type.

* Retrieves unit information for numeric properties.

**4. Generates edges**

The parser analyzes equipment connections to generate edges representing material flows

**5. Stores the information model**

The complete information model is stored in CDF and associated with the simulator model revision.

## Access parsed information

When a simulator model revision has been parsed, use the simulator model revision endpoints to fetch the associated flowsheet data.

## Property extraction errors

During model parsing, the connector automatically skips any property where it fails to extract data to continue parsing. For example:

**Invalid address**

If the `address-suffix` contains a typo, for instance, `.SolverResults[0].OliuRate` instead of `.SolverResults[0].OilRate`, the property is skipped.

**Incorrect unit quantity**

If the specified `unit.quantity` doesn't match the property type, for instance, using `Temperature` for a pressure value, the property extraction fails and is skipped.

**Wrong value type**

If the `value-type` doesn't match the actual data type, for instance, specifying `DOUBLE` for a string property, the property is skipped and the connector logs details about the failed property extraction, continues processing remaining properties, and excludes the failed property from the final information model.

## Limitations and considerations

* Only GAP models with a **single flowsheet** are supported. The connector skips parsing for models with multiple flowsheets.

* Model parsing requires a **valid configuration file**.

* Model parsing **adds processing time** during model validation. The impact depends on model complexity.

* Not all properties may be available for all equipment types. Missing properties are logged and skipped.

* **Unit information** is retrieved when available, but may be missing for some properties.

* Individual property extraction failures don't stop the overall parsing process, but may result in incomplete information models.
