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
Metadata
Release files for emarketlib 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| emarketlib-0.0.1.tar.gz | 27.6 kB | Without provenance | Details for emarketlib-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| emarketlib-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for emarketlib-0.0.1-py3-none-any.whl |
Total release size: 55.2 kB
Release files / emarketlib-0.0.1.tar.gz
| Download URL | emarketlib-0.0.1.tar.gz |
|---|---|
| Size | 27.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18f633c15882f65009279b05b1b7d6ffa0714d5b08f21af962387b85301d3af4
|
|
BLAKE2b-256 checksum How to use checksums |
a2805be26c9f4a69638cbb7efe8d6f1e368bf54067c546730ed795f6d6664c3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / emarketlib-0.0.1-py3-none-any.whl
| Download URL | emarketlib-0.0.1-py3-none-any.whl |
|---|---|
| Size | 27.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e679105c3ba2745f83b410b3ec9735884289497a54bf9d24e20b21a6e40d46e3
|
|
BLAKE2b-256 checksum How to use checksums |
99eab3261b3d470bf0d4606e61a9aa9dc84f18c4dc1a4aaaa54b75c35ccfe383
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Security for emarketlib 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.