---
title: Network Compressor Constraint
slug: network-compressor-constraint
docTags: 
createdAt: 2023-10-11T07:16:12.768Z
---

The Network Compressor Constraint table describes time-based constraints applied to compressor elements in a network, for network optimization and forecasting defaults.

:::hint{type="info"}
**Constraints** apply from the last date they were set. For example, if a record is added with date 2023-01-01T00:00:00+0000 and **maxGasLiftInjectionRate** set to 1200 Mscf/d, that constraint continues to apply until a future record sets a different value for **maxGasLiftInjectionRate**.
:::

:::hint{type="warning"}
A **NULL** value for a particular constraint makes that variable unconstrained. If different constraint variables change on different time horizons, take care when posting updates — it is easy to unintentionally reset a constraint with a NULL value.
:::

The unique constraint on network compressor constraint entries is **sourceCompressorId + sourceId**.

| **Variable**                | **Data Type**  | **Unit of Measure** | **Is Nullable?** | **Default Value** | **Description**                                                                                                                        |
| --------------------------- | -------------- | ------------------- | ---------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| sourceNetworkId             | String         | -                   | No               | -                 | Source ID of the [Network Header](docId\:irXj-Rg5lEh701vW2okjL)                                                                        |
| sourceCompressorId          | String         | -                   | No               | -                 | Source ID of the [Network Compressor Definition](docId\:f7zKlzcRyKktf72Akko8m) the constraint applies to                               |
| sourceId                    | String         | -                   | No               | -                 | Source ID for the compressor/date constraint. This sourceId enables upsert functionality from client source systems of record.         |
| date                        | DateTimeOffset | -                   | No               | -                 | Date at which the constraint becomes applicable. Datetime offset (with timezone) in ISO 8601 format. Example: 2022-09-27T16:28:37+0000 |
| maxGasLiftInjectionRate     | Double         | Mscf/d              | Yes              | -                 | Maximum gas lift injection rate constraint                                                                                             |
| maxGasLiftInjectionPressure | Double         | psig                | Yes              | -                 | Maximum gas lift injection pressure constraint                                                                                         |

***

# Data Integrity Checks

| **Condition**                                   | **Response**    |
| ----------------------------------------------- | --------------- |
| Any non-nullable field is NULL or empty         | Record Rejected |
| sourceNetworkId does not match a Network Header | Record Rejected |

***

# Common Error Messages

| **API**                 | **Scenario**            | **Error Response**                      |
| ----------------------- | ----------------------- | --------------------------------------- |
| Add / Upsert constraint | Unknown sourceNetworkId | Network was not found for source id xxx |
