> For the complete documentation index, see [llms.txt](https://water-strategy.gitbook.io/waterstrategy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://water-strategy.gitbook.io/waterstrategy/tutorials/using-allocation-penalties/exercise-1b-two-demands.md).

# Exercise 1b Two demands

Note: Create a new network called Exercise 1b and setup the timestep before running the network as described in Exercise 1a.

### **Creating topology** <a href="#creating-topology" id="creating-topology"></a>

Navigate to the left panel and click on **Build** to open the Nodes list.

Drag and drop to the workspace Map:

· 1 input node ![](https://water-strategy.gitbook.io/~gitbook/image?url=https%3A%2F%2F530325344-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FOe4DHiaeqejzGopyV9BO%252Fuploads%252FCoS4XcwZOuFle3QT9Mpk%252Fimage.png%3Falt%3Dmedia%26token%3Dd6df9b97-17a7-47d9-ad78-9ef423225af8\&width=300\&dpr=4\&quality=100\&sign=75d0000c\&sv=2)

· 2 output nodes ![](https://water-strategy.gitbook.io/~gitbook/image?url=https%3A%2F%2F530325344-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FOe4DHiaeqejzGopyV9BO%252Fuploads%252FZLZ00umDcfJzcZq7WUkf%252Fimage.png%3Falt%3Dmedia%26token%3D400e55c9-b110-4188-ba3f-6722be5f09cb\&width=300\&dpr=4\&quality=100\&sign=78031169\&sv=2)

Click on **edge** ![](https://water-strategy.gitbook.io/~gitbook/image?url=https%3A%2F%2F530325344-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FOe4DHiaeqejzGopyV9BO%252Fuploads%252FTXZyiFqD4gO5uM14q6hN%252F2.png%3Falt%3Dmedia\&width=300\&dpr=4\&quality=100\&sign=77a9541c\&sv=2) to activate “link mode”. And connect the nodes as shown in the picture below:

![](https://water-strategy.gitbook.io/~gitbook/image?url=https%3A%2F%2F530325344-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FOe4DHiaeqejzGopyV9BO%252Fuploads%252Ft55lMBTlvMALRpg9oyMu%252F3.png%3Falt%3Dmedia\&width=768\&dpr=4\&quality=100\&sign=ce14fa7a\&sv=2)

Click again on **edge** ![](https://water-strategy.gitbook.io/~gitbook/image?url=https%3A%2F%2F530325344-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FOe4DHiaeqejzGopyV9BO%252Fuploads%252FgbpPleYgvI4pqFlGhBHP%252F4.png%3Falt%3Dmedia\&width=300\&dpr=4\&quality=100\&sign=2960901b\&sv=2) to deactivate “link mode”.

Note: To learn more about different node types, refer to the documentation here.

### **Configure node’s attributes** <a href="#configure-nodes-attributes" id="configure-nodes-attributes"></a>

Double-click on each node to open the node panel on the right side of the screen and setup the nodes as in the following image

![](https://water-strategy.gitbook.io/~gitbook/image?url=https%3A%2F%2F530325344-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FOe4DHiaeqejzGopyV9BO%252Fuploads%252FHzpqqxmmj6ErhEtNjjNp%252F5.png%3Falt%3Dmedia\&width=768\&dpr=4\&quality=100\&sign=bb021d9d\&sv=2)

On the left panel Click on **Run a Model** ![](https://water-strategy.gitbook.io/~gitbook/image?url=https%3A%2F%2F530325344-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FOe4DHiaeqejzGopyV9BO%252Fuploads%252FJ2Cpej7WSy7zZSAmJDhg%252F6.png%3Falt%3Dmedia\&width=300\&dpr=4\&quality=100\&sign=b1afc1b3\&sv=2).

A new window will pop-up, click on **Submit**

![](https://water-strategy.gitbook.io/~gitbook/image?url=https%3A%2F%2F530325344-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FOe4DHiaeqejzGopyV9BO%252Fuploads%252FGAj0JyjPpsGsTAuMYcEJ%252F7.png%3Falt%3Dmedia\&width=768\&dpr=4\&quality=100\&sign=b31b85c1\&sv=2)

Water Strategy allows you to visualize different results on the same graph. To do, click on any node and then **click on the icon** ![](https://water-strategy.gitbook.io/~gitbook/image?url=https%3A%2F%2F530325344-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FOe4DHiaeqejzGopyV9BO%252Fuploads%252FwBIFizAlk9m3NF3wZkH9%252F8.png%3Falt%3Dmedia\&width=300\&dpr=4\&quality=100\&sign=b8f4a27c\&sv=2) for the attribute **simulated\_flow.**

![](https://water-strategy.gitbook.io/~gitbook/image?url=https%3A%2F%2F530325344-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FOe4DHiaeqejzGopyV9BO%252Fuploads%252FuOKZzyrHl7vWSumAPHgJ%252Fimage.png%3Falt%3Dmedia%26token%3Da1931db4-c36d-465d-83d5-16d33c7baf1f\&width=768\&dpr=4\&quality=100\&sign=54b800b9\&sv=2)

Select the desired attributes from the drop-down list and click on the icon ![](https://water-strategy.gitbook.io/~gitbook/image?url=https%3A%2F%2F530325344-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FOe4DHiaeqejzGopyV9BO%252Fuploads%252FPBYqLtDuzR5AW7TmA8Az%252F10.png%3Falt%3Dmedia\&width=300\&dpr=4\&quality=100\&sign=ed865c13\&sv=2)

![](https://water-strategy.gitbook.io/~gitbook/image?url=https%3A%2F%2F530325344-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FOe4DHiaeqejzGopyV9BO%252Fuploads%252FVwuTvyXpluKlgAUil55m%252F11.png%3Falt%3Dmedia\&width=768\&dpr=4\&quality=100\&sign=45e02e50\&sv=2)

<figure><img src="/files/17WKQpAN1OHsE1H1qquV" alt=""><figcaption></figcaption></figure>

### **Explanation** <a href="#explanation" id="explanation"></a>

The input node can supply a maximum of 10 Mm³/day, but both output nodes have demands that total 16 Mm³/day. Since both demands have negative allocation penalties, the network prioritizes based on the magnitude of these penalties. The output node with the more negative allocation penalty receives higher priority.

In this case, the left output node has an allocation penalty of -10, which is a higher priority compared to the right output node’s allocation penalty of -5. Consequently, water will be allocated to the left output node first, and any remaining water will be allocated to the right output node.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://water-strategy.gitbook.io/waterstrategy/tutorials/using-allocation-penalties/exercise-1b-two-demands.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
