Skip to content

Instantly share code, notes, and snippets.

@MaStr
MaStr / 1-test3-mit-solar2.py
Last active October 19, 2024 13:34
Another MILP test
import pulp as pl
import numpy as np
# Zeitfenster definieren (z.B. 24 Stunden)
time_steps = list(range(24))
# Strompreis pro Stunde (in €/kWh)
#strompreise = [0.2, 0.15, 0.18, 0.22, 0.25, 0.3, 0.28, 0.26, 0.22, 0.18, 0.14, 0.12,
# 0.1, 0.1, 0.12, 0.15, 0.18, 0.22, 0.28, 0.30, 0.25, 0.22, 0.18, 0.16]
strompreise = [ 0.299, 0.294, 0.291, 0.285, 0.286, 0.287, 0.291 , 0.305, 0.303, 0.296,
@MaStr
MaStr / 1-test3.py
Last active October 19, 2024 07:48
Comparison between linear battery consumption and dynamic pricing + adjusting usage
import pulp as pl
import numpy as np
# Zeitfenster definieren (z.B. 24 Stunden)
time_steps = list(range(24))
# Strompreis pro Stunde (in €/kWh)
#strompreise = [0.2, 0.15, 0.18, 0.22, 0.25, 0.3, 0.28, 0.26, 0.22, 0.18, 0.14, 0.12,
# 0.1, 0.1, 0.12, 0.15, 0.18, 0.22, 0.28, 0.30, 0.25, 0.22, 0.18, 0.16]
strompreise = [ 0.299, 0.294, 0.291, 0.285, 0.286, 0.287, 0.291 , 0.305, 0.303, 0.296,
@MaStr
MaStr / opp_summary.sh
Created September 19, 2023 10:20
Print cpu opp details from OPP driver from /sys/kernel/debugfs
#!/bin/bash
# Needs kernel/debugsfs enabled
#
# Simple script, that creates an table based output of the opp values
# from every physical cpu.
#
# (c)2023 Matthias Strubel <matthias.strubel@aod-rpg.de>
# License GPL-2.0
#

Keybase proof

I hereby claim:

  • I am Mastr on github.
  • I am mastr (https://keybase.io/mastr) on keybase.
  • I have a public key whose fingerprint is B691 5594 02C6 AB44 468E E9B7 A112 0B7D 99B8 BD2E

To claim this, I am signing this object: