Energy market toolbox
Project description
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
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
emarketlib-0.0.1.tar.gz
(27.6 kB
view details)
Built Distribution
File details
Details for the file emarketlib-0.0.1.tar.gz
.
File metadata
- Download URL: emarketlib-0.0.1.tar.gz
- Upload date:
- Size: 27.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18f633c15882f65009279b05b1b7d6ffa0714d5b08f21af962387b85301d3af4 |
|
MD5 | 3d589f839bda5aecd925da07cd08fa3f |
|
BLAKE2b-256 | a2805be26c9f4a69638cbb7efe8d6f1e368bf54067c546730ed795f6d6664c3a |
File details
Details for the file emarketlib-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: emarketlib-0.0.1-py3-none-any.whl
- Upload date:
- Size: 27.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e679105c3ba2745f83b410b3ec9735884289497a54bf9d24e20b21a6e40d46e3 |
|
MD5 | fe3423393ee04e913039a800971f4586 |
|
BLAKE2b-256 | 99eab3261b3d470bf0d4606e61a9aa9dc84f18c4dc1a4aaaa54b75c35ccfe383 |