User Component
Names and locations
| Item | Value |
|---|---|
| Link to source code | https://github.com/EVCommunities/Components/tree/main/user_component |
| Management type | Platform managed |
| Docker image name | ghcr.io/evcommunities/user-component |
| Location of manifest file | https://github.com/EVCommunities/Components/blob/main/component_manifest_user.yml |
Description
A component used to simulate a user that requests charging for an electric vehicle from stations. Holds information of a user, user’s car. Requests for charging of the car. Provides information on the state of charge.
Messaging
Subscribe
| Topic | Payload |
|---|---|
| PowerOutputTopic | Actual power provided from station. |
Publish
| Topic | Payload |
|---|---|
| Init.User.CarMetadata | Car info of the user. |
| User.UserState | User’s request details for charging. |
| User.CarState | State of charge of the car battery. |
Warnings
This component has no documentation about the publishing of warnings in result messages.
Startup parameters
This component uses the block "UserComponent" in startup parameters.
Input parameters
| Property | Datatype | Unit | Example |
|---|---|---|---|
| UserId | Integer | 1 | |
| UserName | String | testUser1 | |
| CarModel | String | testModel1 | |
| CarBatteryCapacity | Float | kWh | 120.0 |
| CarMaxPower | Float (> 0) | kW | 22.0 |
| StationId | String | 1 | |
| StateOfCharge | Float (0-100) | % | 20.0 |
| TargetStateOfCharge | Float (0-100) | % | 80.0 |
| ArrivalTime | ISO 8601 datetime | 2023-01-11T12:00:00.000Z | |
| TargetTime | ISO 8601 datetime | 2023-01-11T14:00:00.000Z |
Input files
This component does not take any input file.
Initialization workflow
This component does not have any initialization workflow.
Epoch workflow
In each epoch, the component does the following:
- User receives an
Epochmessage for a new epoch. The epoch number for the first epoch is 1. - User publishes
User.CarMetaDatamessage if it is the epoch 1, the Intelligence Control component is the recipient of the message. - User publishes
User.UserStatemessage which contains epoch no, user id, target SoC, target time. - User listens for
Station.PowerOutputmessage from the Station component which contains the actual power provided by the station. - After receiving
Station.PowerOutputmessage, user publishesUser.CarStatemessage which contains the epoch number, station id, user id, and the state of charge at the end of the epoch. - User sends a
Statusmessage with value "ready".
Implementation details
Language
| Property | Value |
|---|---|
| Programming language | Python 3.7.9 |
External packages
The following packages are needed.
| Package | Version | Why needed | URL |
|---|---|---|---|
| Simulation Tools | Component implementation based on AbstractSimulationComponent. | https://github.com/simcesplatform/simulation-tools |