> 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/arby/albramj-altalymyh/pywr-scenarios-reading-external-dataframe-and-adding-custom-rules.md).

# سيناريوهات Pywr لقراءة إطار البيانات الخارجي وإضافة القواعد المخصصة

في هذا البرنامج التعليمي، سنعمل مع **شبكة التايمز**، والتي تتلقى نسخة منها تلقائيًا عند إنشاء حساب WaterStrategy.

تشمل الخطوات التي تمت تغطيتها ما يلي:

1. **تحديث طلب لي فالي**: سنقوم بقراءة وتحديث بيانات Lee Valley Demand من ملف CSV خارجي يحتوي على سلسلة زمنية.
2. **تطبيق عدم اليقين بشأن تغير المناخ**: سيتم إدخال أوجه عدم اليقين المتعلقة بتغير المناخ عن طريق التنشيط **سيناريوهات pywr**. سيتم تطبيق حالات عدم اليقين هذه على نقطتي تجميع (التدفقات الداخلة)، وتعديل ظروف التدفق بناءً على سيناريوهات محددة.
3. **إضافة قاعدة مخصصة**: سوف تتعلم كيفية إنشاء قاعدة مخصصة، وهي أداة قوية تسمح بتوسيع وتكامل وظائف WaterStrategy. في هذا المثال، سيتم إنشاء معلمة جديدة لزيادة الحد الأقصى لحجم الخزان ديناميكيًا في تاريخ محدد، كما هو محدد من قبل المستخدم.

في نهاية هذا البرنامج التعليمي، ستكون مجهزًا لإدارة وتخصيص جوانب مختلفة من شبكة Thames داخل WaterStrategy، باستخدام بيانات السلاسل الزمنية وسيناريوهات عدم اليقين والقواعد المخصصة.

ستقوم بتحميل الملفات المطلوبة يدويًا، لذا تأكد من حفظها على جهاز الكمبيوتر الخاص بك لسهولة الوصول إليها أثناء البرنامج التعليمي

* [نهر التايمز\ \_لي\ \_فالي\ \_الطلب](https://nexsysanalytics-my.sharepoint.com/:x:/g/personal/jgonzalez_nexsys-analytics_com/ERY5QXJtGQtFpo7PKUUykJEBI9g6adLvCwxG90xhZqgySQ?e=b4brjW)
* [تدفقات التيمز\ \_التدفقات\ \_سيناريوهات PYWR.h5](https://nexsysanalytics-my.sharepoint.com/:u:/g/personal/jgonzalez_nexsys-analytics_com/EV7TBf9J_WZDpF3Oy6HyNmoBj3F4Ew216OE9ltOCC1P8pw?e=YV1A3q)

للبدء، في **مواد تدريب المشروع**، افتح **التايمز** شبكة الاتصال

<figure><img src="/files/njBWZrUKlxenzEByvgjS" alt=""><figcaption></figcaption></figure>

استنساخ **السيناريو 1**

<figure><img src="/files/atu6e6mj9KHaS71NlT2E" alt="" width="375"><figcaption></figcaption></figure>

<figure><img src="/files/hrIm2QEWBvyt9Uu6u46H" alt="" width="563"><figcaption></figcaption></figure>


---

# 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/arby/albramj-altalymyh/pywr-scenarios-reading-external-dataframe-and-adding-custom-rules.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.
