<!--
SPDX-FileCopyrightText: Florian Maurer
SPDX-License-Identifier: AGPL-3.0-or-later
-->
# emarketlib
A Python library for simulating electricity markets and market mechanisms.
## Features
- Base market implementation with configurable market mechanisms
- Multiple clearing algorithms:
- Pay-as-clear (uniform pricing)
- Pay-as-bid
- Average mechanism
- Trade reduction mechanism
- McAfee mechanism
- VCG auction mechanism
- Support for:
- Market registration and validation
- Order book handling
- Market clearing
- Result storage and querying
- Grid topology data
## Market Mechanisms
### Pay-as-clear (Uniform Pricing)
- All accepted orders receive the same clearing price
- Clearing price determined by highest accepted supply order
- Merit order based clearing with random tie-breaking
### Pay-as-bid
- Each accepted order is settled at its bid price
- Merit order based clearing with random tie-breaking
### Average Mechanism
- Clearing price is average of highest accepted supply and lowest accepted demand price
- Not incentive compatible but individually rational
### Trade Reduction
- Removes last matched trade to achieve incentive compatibility
- Not efficient but individually rational
- Budget balanced but not strongly budget balanced
### McAfee Mechanism
- Incentive compatible and individually rational
- Weakly budget balanced
- Not efficient when price conditions not met
### VCG Auction
- Incentive compatible and individually rational
- Efficient but not budget balanced
- Auctioneer must subsidize difference
## Usage
```python
from emarketlib import MarketConfig
from emarketlib.clearing_algorithms.simple import PayAsClearRole
# Create market config
config = MarketConfig(
market_id="day_ahead",
# Add configuration parameters
)
# Initialize market with clearing mechanism
market = PayAsClearRole(config)
```
## Installation
`pip install emarketlib`
Raw data
{
"_id": null,
"home_page": null,
"name": "emarketlib",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "agent based simulation, energy market, market simulation, simulation",
"author": null,
"author_email": "Florian Maurer <maurer@fh-aachen.de>",
"download_url": "https://files.pythonhosted.org/packages/a2/80/5be26c9f4a69638cbb7efe8d6f1e368bf54067c546730ed795f6d6664c3a/emarketlib-0.0.1.tar.gz",
"platform": null,
"description": "<!--\nSPDX-FileCopyrightText: Florian Maurer\n\nSPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n# emarketlib\n\nA Python library for simulating electricity markets and market mechanisms.\n\n## Features\n\n- Base market implementation with configurable market mechanisms\n- Multiple clearing algorithms:\n - Pay-as-clear (uniform pricing)\n - Pay-as-bid\n - Average mechanism\n - Trade reduction mechanism\n - McAfee mechanism\n - VCG auction mechanism\n- Support for:\n - Market registration and validation\n - Order book handling\n - Market clearing\n - Result storage and querying\n - Grid topology data\n\n## Market Mechanisms\n\n### Pay-as-clear (Uniform Pricing)\n- All accepted orders receive the same clearing price\n- Clearing price determined by highest accepted supply order\n- Merit order based clearing with random tie-breaking\n\n### Pay-as-bid\n- Each accepted order is settled at its bid price\n- Merit order based clearing with random tie-breaking\n\n### Average Mechanism\n- Clearing price is average of highest accepted supply and lowest accepted demand price\n- Not incentive compatible but individually rational\n\n### Trade Reduction\n- Removes last matched trade to achieve incentive compatibility\n- Not efficient but individually rational\n- Budget balanced but not strongly budget balanced\n\n### McAfee Mechanism\n- Incentive compatible and individually rational\n- Weakly budget balanced\n- Not efficient when price conditions not met\n\n### VCG Auction\n- Incentive compatible and individually rational\n- Efficient but not budget balanced\n- Auctioneer must subsidize difference\n\n## Usage\n\n```python\nfrom emarketlib import MarketConfig\nfrom emarketlib.clearing_algorithms.simple import PayAsClearRole\n\n# Create market config\nconfig = MarketConfig(\n market_id=\"day_ahead\",\n # Add configuration parameters\n)\n\n# Initialize market with clearing mechanism\nmarket = PayAsClearRole(config)\n```\n\n\n## Installation\n\n\n`pip install emarketlib`\n",
"bugtrack_url": null,
"license": "AGPL-3.0-or-later",
"summary": "Energy market toolbox",
"version": "0.0.1",
"project_urls": {
"homepage": "https://github.com/assume-framework/emarketlib",
"repository": "https://github.com/assume-framework/emarketlib"
},
"split_keywords": [
"agent based simulation",
" energy market",
" market simulation",
" simulation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "99eab3261b3d470bf0d4606e61a9aa9dc84f18c4dc1a4aaaa54b75c35ccfe383",
"md5": "fe3423393ee04e913039a800971f4586",
"sha256": "e679105c3ba2745f83b410b3ec9735884289497a54bf9d24e20b21a6e40d46e3"
},
"downloads": -1,
"filename": "emarketlib-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fe3423393ee04e913039a800971f4586",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 27609,
"upload_time": "2024-11-09T01:54:32",
"upload_time_iso_8601": "2024-11-09T01:54:32.924957Z",
"url": "https://files.pythonhosted.org/packages/99/ea/b3261b3d470bf0d4606e61a9aa9dc84f18c4dc1a4aaaa54b75c35ccfe383/emarketlib-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a2805be26c9f4a69638cbb7efe8d6f1e368bf54067c546730ed795f6d6664c3a",
"md5": "3d589f839bda5aecd925da07cd08fa3f",
"sha256": "18f633c15882f65009279b05b1b7d6ffa0714d5b08f21af962387b85301d3af4"
},
"downloads": -1,
"filename": "emarketlib-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "3d589f839bda5aecd925da07cd08fa3f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 27607,
"upload_time": "2024-11-09T01:54:35",
"upload_time_iso_8601": "2024-11-09T01:54:35.283414Z",
"url": "https://files.pythonhosted.org/packages/a2/80/5be26c9f4a69638cbb7efe8d6f1e368bf54067c546730ed795f6d6664c3a/emarketlib-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-09 01:54:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "assume-framework",
"github_project": "emarketlib",
"github_not_found": true,
"lcname": "emarketlib"
}