# RP

If you're looking for a flexible proportional formula for allocating parliamentary seats, a basic proportional method can be adapted for any total number of seats. The formula distributes seats among various parties based on the votes they received, and can be adjusted for any number of available seats in the parliament. Here's how to apply it:

1. Let $$V$$ be the total number of votes.
2. Let $$Vi$$ be the number of votes received by each party $$i$$.
3. Let $$S$$ be the total number of seats in the parliament.
4. For each party, calculate the percentage of the total votes it received:

   $$Pi=Vi/V$$
5. Multiply this percentage $$Pi$$ by the total number of seats $$S$$ to get the approximate number of seats for each party:

   $$Mi=Pi×S$$

   Here, $$Mi$$ might not be a whole number.
6. Allocate seats based on these approximate numbers. If the total number of allocated seats does not add up to $$S$$, adjust by adding or removing seats from parties with the closest values to the next whole number.

{% file src="/files/BdwSLJRobm6x6cvHckFb" %}
Simple model for a constitution of your RP server
{% endfile %}

{% file src="/files/0lIXJDiaWCPiMPmouumg" %}
Simple model for a criminal code of your RP server
{% endfile %}


---

# Agent Instructions: 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:

```
GET https://docs.bkscripts.com/scripts/bk_politicalsystem/rp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
