Metadata-Version: 2.4
Name: well-routing
Version: 0.2.2
Summary: Calculate well routing based on IOC routing tags
Author-email: Åsmund Våge Fannemel <34712686+asmfstatoil@users.noreply.github.com>
Requires-Python: <3.14.1,>=3.12
Requires-Dist: commonlib-reader<2.0.0,>=1.1.0
Requires-Dist: matplotlib<4.0.0,>=3.10.7
Requires-Dist: networkx<4.0.0,>=3.6.1
Requires-Dist: ots-sdk<2.0.0,>=1.0.0
Requires-Dist: stidapi<2.0.0,>=1.3.4
Requires-Dist: tagmapper<0.10.0,>=0.9.0
Requires-Dist: tagreader<7.0.0,>=6.2.0
Provides-Extra: graphviz
Requires-Dist: pygraphviz>=1.14; extra == 'graphviz'
Description-Content-Type: text/markdown

# well-routing
Calculate well routing based on IOC rate distribution models "8002 - Rate distribution", flowline models "8110 - FLOWLINE RATE" and manifold models "8200 - MANIFOLD RATE". Also queries a list of known wells, pipes and separators.

Creates a set of Nodes and Edges and converts them to a directed graph structure for pathfinding and optimization.


## Example Usage

The `populate.py` script demonstrates how to use these classes:

```python
from classes import Graph

start_time = "01-Dec-2025"
stop_time = "05-Dec-2025"
chosen_time = "01-Dec-2025 12:00"

g = Graph.get_asset_graph(
            stid_code=asset, start_time=start_time, stop_time=stop_time
        )
G = g.convert_to_networkx(timestamp=pd.to_datetime(chosen_time))

````

## Installation

### Install for use
Install from pypi using ```pip install well-routing```.

### Development
Clone repository ```git clone https://github.com/equinor/well-routing``` and install dependencies using uv ```uv sync```.

## Install with pygraphviz

### Mac 
Typically pygraph application is installed using brew on mac. ```brew install pygraph```.  

``` 
uv sync --all-extras \
    --config-settings=--global-option=build_ext \
    --config-settings=--global-option="-I$(brew --prefix graphviz)/include" \
    --config-settings=--global-option="-L$(brew --prefix graphviz)/lib"
```

### Windows
See install documentation at https://pygraphviz.github.io/documentation/stable/install.html#manual-download.


