Open
Conversation
for more information, see https://pre-commit.ci
Member
|
Tax rate might be interesting, but here I also want to first see it in English. |
| self.wealth -= 1 | ||
|
|
||
| def pay_taxes(self): | ||
| tax_rate = 0.1 |
There was a problem hiding this comment.
@sofiabrezden @sofibrezden isn't it supposed to read the tax rate from the model?
Member
|
I would love to hear the backstory of what you're using Mesa for from all of you, as part of which project/course/interest etc.. Might help us help you better :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Опис змін
Додано функціональність оподаткування:
Реалізовано метод pay_taxes() у класі MoneyAgent, який дозволяє агентам сплачувати податки, розраховані на основі їхнього багатства. Це допомагає моделювати реальні економічні умови, де агенти повинні сплачувати податки.
Додано фондування допомоги:
Додано метод distribute_taxes() у класі BoltzmannWealthModel, який дозволяє розподіляти податковий фонд серед агентів з нульовим багатством. Це забезпечує підтримку бідних агентів у моделі.
Зміни у структурі класу:
Додано параметр tax_rate у клас BoltzmannWealthModel для зберігання ставки податку, що робить модель більш гнучкою та легкою для налаштування.
Поліпшено обчислення коефіцієнта Джині:
Перероблено метод compute_gini(), щоб він залишався таким же, але з додатковою логікою для більш точного обчислення в умовах оподаткування та розподілу допомоги.