PyPoSim
A small power plant simulator that can ramp to a certain power level. Great for noisy time-series data generation!
Install / Use
/learn @crazzle/PyPoSimREADME
PyPoSim 
A small power plant simulator that can ramp to a certain power level. Great for noisy time-series data generation!
TO-DO
[X] Provide Kafka support
[X] Ensure connection to Kafka Broker if Kafka is down on start-up
[X] Log datapoints into a file
[X] Provide REST API
[X] Add plants using UI
[X] Delete plants using UI
[X] Dispatch plants using UI
[X] Distinguish between capacity and setpoint
[X] Limit dispatch to be between zero and capacity
Getting started
- Clone the repo
- Navigate into the PyPoSim folder
- Install the required dependencies with pip install -r requirements.txt
- run it with python PyPoSim.py (standard port is 5000)
You can also run it using Docker, which is the preferred method.
Current set of parameters
- Capacity: The capacity of the plant
- Fluctuation: Corridor the output fluctuates within based on the capacity
- Ramp: Velocity to change from one power level to another
Play with the simulator
The simulator provides a REST API to create, poll, steere and delete simulated plants. For stream processing Kafka can be configured accordingly to push datapoints into a topic.
Add
Plants are added via the /add endpoint using the HTTP POST method. In order to function properly, the body must contain JSON in the following format:
{ "name": "Sample Plant", "internal_setpoint": 150, "fluctuation": 10, "ramp": 15 }
- "name" is the name of your plant.
- "capacity" is the power-level that this plant is able to generate at max. The output fluctuates around this value.
- "fluctuation" is the fluctuation running around the power in percentage
- "ramp" is the factor the plants ramps up and down per second in KW
A newly created plant always delivers the maximum power in the beginning.
The response of this endpoint contains a UID that is used to access the new created simulation.
Get current power
You can get the current power using /{UID}.
Get master data
You can get the master data using /masterdata/{UID}.
Dispatch
You can dispatch your plant (tell it to ramp to a certain powerlevel) by using the /dispatch/{UID}/{POINT} endpoint. Point is the new powerlevel your plant should ramp to. The plant ramps according to the ramp that was specified during creation.
Delete
To delete a simulator just use /delete/{UID}
MIT Licence
Copyright (c) 2016 Mark Keinhörster
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Related Skills
node-connect
342.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
84.7kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
84.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
342.0kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
