> 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/creating-a-reservoir-system/additional-exercises-using-allocation-penalties-and-control-rules.md).

# استخدام عقوبات التخصيص وقواعد التحكم لموازنة المصادر

## استخدام عقوبات التخصيص لموازنة المصدر <a href="#using-allocation-penalties-to-balance-source-use-in-the-mosetse-system" id="using-allocation-penalties-to-balance-source-use-in-the-mosetse-system"></a>

يمكن استخدام عقوبات التخصيص لموازنة استخدام المصادر للمطالب. في التدريبات السابقة **مثال للخزان** كان لديه عقوبة تخصيص ثابتة قدرها -200.

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

1. قم باستنساخ **«إضافة الخزان P وE»** السيناريو وتسمية السيناريو الجديد **«مصادر متوازنة»**
2. قم بتحرير سمة «عقوبة التخصيص» (سمة «التكلفة») لعقدة Reservoir وقم بتغيير نوعها إلى **'PYWR\_المعلمة '**

<figure><img src="/files/vq0bqhCd3NdFLiLjSgKA" alt=""><figcaption><p>تحرير سمة «التكلفة» (سمة «عقوبة التخصيص»)</p></figcaption></figure>

3. في علامة تبويب JSON، قم بلصق رمز JSON التالي. تقوم معلمة الحجم المحرفة هذه بتعيين غرامة تخصيص 0 للخزان عندما يكون ممتلئًا، وعقوبة التخصيص -200 عندما يكون فارغًا. عندما يكون الخزان بين الامتلاء والفراغ، يتم استيفاء غرامة التخصيص بين 0 و -200.

```
{
	«النوع»: «معامل الحجم المحرف»،
	«العقدة»: «مثال للخزان»،
	«المجلدات»: [
		0،
		25
	]،
	«القيم»: [
		-200،
		0
	]،
	«interp_kwargs»: {
		«النوع»: «خطي»
	}،
	«تعليق»: «المجلدات: Mm3، القيم: عقوبة التخصيص»
}
```

4. في عقدة إدخال المياه الجوفية، قم بتعيين **الحد الأقصى\_يتدفق** إلى 0.02 وقم بتعيين **عقوبة التوزيع** إلى 50.0. عقوبة التخصيص الإيجابية البالغة 50 تجعل من الممكن استخدام عقدة المياه الجوفية فقط عندما تكون عقوبة تخصيص الخزان أقل من -50، أي عندما يكون 75\_\_ ممتلئًا. هذا يعني أنه عندما يكون الخزان ممتلئًا تقريبًا، لن يتم استخدام المياه الجوفية. فقط بمجرد سحب الخزان بشكل كافٍ، ستبدأ عقدة المياه الجوفية في توفير المياه للطلب.

<figure><img src="/files/UHqI4rr3S3S866luwXL5" alt=""><figcaption><p>حدد عقوبة التخصيص/التكلفة</p></figcaption></figure>

5. قم بتشغيل النموذج وعرض **محاكاة\_يتدفق** من عقدة إدخال المياه الجوفية ومقارنتها بـ **الطلب مع GW؛** و ال **محاكاة\_الصوت** من عقدة الخزان وقارن كلاهما بـ **إضافة الخزان P و E**.

<figure><img src="/files/w3lUi5xt3r9qAgBTK5Jc" alt=""><figcaption><p>مقارنة مدخلات المياه الجوفية</p></figcaption></figure>

<figure><img src="/files/E6KbRKF381pzObxlO0Yd" alt=""><figcaption><p>مقارنة حجم الخزان</p></figcaption></figure>

كما ترى **سيناريو متوازن** وهو **البرتقالي**، يستخدم مصدر المياه الجوفية بشكل أقل من السيناريو السابق. إذا كانت عقدة المياه الجوفية ذات ترخيص محدود، فهذه طريقة للحفاظ على حجم الترخيص. سيتم عرض هذا في برنامج تعليمي آخر.

*تلميح: يمكنك رؤية عقوبة التخصيص المحاكاة إذا قمت بوضع علامة على مخرجات السلسلة الزمنية لعقوبة التخصيص Pywr\_المعلمة. في الوقت الحالي، يتم استدعاء العقوبة المحاكاة **محاكاة\_التكلفة** على الخزان*

<figure><img src="/files/6B6jCs7DMkTKcRTpS6xD" alt=""><figcaption><p>قم بتحرير معلمة التكلفة</p></figcaption></figure>

<figure><img src="/files/4wQb3AdQ5x4dV5jeDkZR" alt=""><figcaption><p>اختر مسجل السلاسل الزمنية واحفظه</p></figcaption></figure>

<figure><img src="/files/9pK5nAXmvPjGwyu2JbZz" alt=""><figcaption><p>عرض التكلفة تختلف مع الوقت</p></figcaption></figure>

<figure><img src="/files/cINBpYbYV4gkQq3hd5Mv" alt=""><figcaption><p>تختلف التكلفة مع الوقت</p></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/creating-a-reservoir-system/additional-exercises-using-allocation-penalties-and-control-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.
