Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷 Enable python virtual environment for generating power curves #96

Closed
wants to merge 2 commits into from

Conversation

shankari
Copy link
Collaborator

@shankari shankari commented Nov 20, 2024

Code contributed by @the-bay-kay in #95

Summary from there:
Charging sessions without an ISO15118-2 Departure Time now have a preview graph that showcases the charging behavior.

See Issue #92 for additional context, and #92 (comment) comment specifically for a demo of this functionality!

@shankari
Copy link
Collaborator Author

Build failed with error

#25 6.794 Collecting scipy>=1.8 (from control)
#25 6.816   Downloading scipy-1.14.1.tar.gz (58.6 MB)
#25 9.509      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.6/58.6 MB 22.2 MB/s eta 0:00:00
#25 32.75   Installing build dependencies: started
#25 93.87   Installing build dependencies: still running...
#25 135.9   Installing build dependencies: finished with status 'done'
#25 135.9   Getting requirements to build wheel: started
#25 137.0   Getting requirements to build wheel: finished with status 'done'
#25 137.1   Installing backend dependencies: started
#25 141.3   Installing backend dependencies: finished with status 'done'
#25 141.3   Preparing metadata (pyproject.toml): started
#25 157.0   Preparing metadata (pyproject.toml): finished with status 'error'
#25 157.0   error: subprocess-exited-with-error
#25 157.0   
#25 157.0   × Preparing metadata (pyproject.toml) did not run successfully.
#25 157.0   │ exit code: 1
#25 157.0   ╰─> [23 lines of output]
#25 157.0       + meson setup /tmp/pip-install-r79h3ig2/scipy_e331a22c7f254547b3ca4a32a3f77f8d /tmp/pip-install-r79h3ig2/scipy_e331a22c7f254547b3ca4a32a3f77f8d/.mesonpy-e1i0u239 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/tmp/pip-install-r79h3ig2/scipy_e331a22c7f254547b3ca4a32a3f77f8d/.mesonpy-e1i0u239/meson-python-native-file.ini
#25 157.0       The Meson build system
#25 157.0       Version: 1.6.0
#25 157.0       Source dir: /tmp/pip-install-r79h3ig2/scipy_e331a22c7f254547b3ca4a32a3f77f8d
#25 157.0       Build dir: /tmp/pip-install-r79h3ig2/scipy_e331a22c7f254547b3ca4a32a3f77f8d/.mesonpy-e1i0u239
#25 157.0       Build type: native build
#25 157.0       Project name: scipy
#25 157.0       Project version: 1.14.1
#25 157.0       C compiler for the host machine: cc (gcc 13.2.1 "cc (Alpine 13.2.1_git20240309) 13.2.1 20240309")
#25 157.0       C linker for the host machine: cc ld.bfd 2.42
#25 157.0       C++ compiler for the host machine: c++ (gcc 13.2.1 "c++ (Alpine 13.2.1_git20240309) 13.2.1 20240309")
#25 157.0       C++ linker for the host machine: c++ ld.bfd 2.42
#25 157.0       Cython compiler for the host machine: cython (cython 3.0.11)
#25 157.0       Host machine cpu family: aarch64
#25 157.0       Host machine cpu: aarch64
#25 157.0       Program python found: YES (/usr/src/node-red/python_environments/everest/bin/python3)
#25 157.0       Did not find pkg-config by name 'pkg-config'
#25 157.0       Found pkg-config: NO
#25 157.0       Run-time dependency python found: NO (tried pkgconfig, pkgconfig and sysconfig)
#25 157.0       
#25 157.0       ../meson.build:22:14: ERROR: Python dependency not found
#25 157.0       
#25 157.0       A full log can be found at /tmp/pip-install-r79h3ig2/scipy_e331a22c7f254547b3ca4a32a3f77f8d/.mesonpy-e1i0u239/meson-logs/meson-log.txt
#25 157.0       [end of output]
#25 157.0   
#25 157.0   note: This error originates from a subprocess, and is likely not a problem with pip.
#25 157.9 
#25 157.9 [notice] A new release of pip is available: 24.2 -> 24.3.1
#25 157.9 [notice] To update, run: python3 -m pip install --upgrade pip
#25 157.9 error: metadata-generation-failed
#25 157.9 
#25 157.9 × Encountered error while generating package metadata.
#25 157.9 ╰─> See above for output.
#25 157.9 

Will try to install manually, and then switch to conda so we don't have to compile

@shankari
Copy link
Collaborator Author

Can confirm that this works on my x86 machine. But apparently does not work on arm.
I don't have time to investigate aarm versus x86 now.
But I am also not convinced that we need/should generate the power curve in node-red.
Who cares about a power curve that is negotiated every 24 minutes? Not any user.

Instead, let's have the charts in node-red populated from the car simulator using MQTT,
So this serves more of a debug function than a confirmation function.

~ $ /usr/src/node-red/python_environments/everest/bin/pip3 install numpy control
Collecting numpy
  Downloading numpy-2.1.3-cp312-cp312-musllinux_1_1_x86_64.whl.metadata (62 kB)
Collecting control
  Downloading control-0.10.1-py3-none-any.whl.metadata (7.6 kB)
Collecting scipy>=1.8 (from control)
  Downloading scipy-1.14.1-cp312-cp312-musllinux_1_2_x86_64.whl.metadata (60 kB)
Collecting matplotlib>=3.6 (from control)
  Downloading matplotlib-3.9.2-cp312-cp312-musllinux_1_2_x86_64.whl.metadata (11 kB)
Collecting contourpy>=1.0.1 (from matplotlib>=3.6->control)
  Downloading contourpy-1.3.1-cp312-cp312-musllinux_1_2_x86_64.whl.metadata (5.4 kB)
Collecting cycler>=0.10 (from matplotlib>=3.6->control)
  Downloading cycler-0.12.1-py3-none-any.whl.metadata (3.8 kB)
Collecting fonttools>=4.22.0 (from matplotlib>=3.6->control)
  Downloading fonttools-4.55.0-cp312-cp312-musllinux_1_2_x86_64.whl.metadata (164 kB)
Collecting kiwisolver>=1.3.1 (from matplotlib>=3.6->control)
  Downloading kiwisolver-1.4.7-cp312-cp312-musllinux_1_2_x86_64.whl.metadata (6.3 kB)
Collecting packaging>=20.0 (from matplotlib>=3.6->control)
  Downloading packaging-24.2-py3-none-any.whl.metadata (3.2 kB)
Collecting pillow>=8 (from matplotlib>=3.6->control)
  Downloading pillow-11.0.0-cp312-cp312-musllinux_1_2_x86_64.whl.metadata (9.1 kB)
Collecting pyparsing>=2.3.1 (from matplotlib>=3.6->control)
  Downloading pyparsing-3.2.0-py3-none-any.whl.metadata (5.0 kB)
Collecting python-dateutil>=2.7 (from matplotlib>=3.6->control)
  Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
Collecting six>=1.5 (from python-dateutil>=2.7->matplotlib>=3.6->control)
  Downloading six-1.16.0-py2.py3-none-any.whl.metadata (1.8 kB)
Downloading numpy-2.1.3-cp312-cp312-musllinux_1_1_x86_64.whl (16.4 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.4/16.4 MB 1.2 MB/s eta 0:00:00
Downloading control-0.10.1-py3-none-any.whl (549 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 549.6/549.6 kB 1.1 MB/s eta 0:00:00
Downloading matplotlib-3.9.2-cp312-cp312-musllinux_1_2_x86_64.whl (9.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.1/9.1 MB 1.1 MB/s eta 0:00:00
Downloading scipy-1.14.1-cp312-cp312-musllinux_1_2_x86_64.whl (42.5 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.5/42.5 MB 1.0 MB/s eta 0:00:00
Downloading contourpy-1.3.1-cp312-cp312-musllinux_1_2_x86_64.whl (1.3 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 1.1 MB/s eta 0:00:00
Downloading cycler-0.12.1-py3-none-any.whl (8.3 kB)
Downloading fonttools-4.55.0-cp312-cp312-musllinux_1_2_x86_64.whl (5.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.0/5.0 MB 1.0 MB/s eta 0:00:00
Downloading kiwisolver-1.4.7-cp312-cp312-musllinux_1_2_x86_64.whl (2.3 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.3/2.3 MB 1.5 MB/s eta 0:00:00
Downloading packaging-24.2-py3-none-any.whl (65 kB)
Downloading pillow-11.0.0-cp312-cp312-musllinux_1_2_x86_64.whl (4.4 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 1.1 MB/s eta 0:00:00
Downloading pyparsing-3.2.0-py3-none-any.whl (106 kB)
Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: six, pyparsing, pillow, packaging, numpy, kiwisolver, fonttools, cycler, scipy, python-dateutil, contourpy, matplotlib, control
Successfully installed contourpy-1.3.1 control-0.10.1 cycler-0.12.1 fonttools-4.55.0 kiwisolver-1.4.7 matplotlib-3.9.2 numpy-2.1.3 packaging-24.2 pillow-11.0.0 pyparsing-3.2.0 python-dateutil-2.9.0.post0 scipy-1.14.1 six-1.16.0

[notice] A new release of pip is available: 24.2 -> 24.3.1
[notice] To update, run: python3 -m pip install --upgrade pip
~ $ 

- Do not throttle the SASchedule from the EV based on departure time, only
  transmit the composite pmax schedule. The EV will deareate based on
  departure time
- Show the values in the current power delivery request instead of the
  progress towards the eamount so that we can see the impact of curtailing the
  pmax
- Pass in the pmax to the power curve computation algo, although it is
  currently a NOP

This fixes: EVerest#92 (comment)

Signed-off-by: Shankari <[email protected]>
@shankari
Copy link
Collaborator Author

Closing as wontfix.

@shankari shankari closed this Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant