This repository has been archived by the owner on Mar 31, 2023. It is now read-only.
forked from snaptec/openWB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
minundpv.sh
67 lines (66 loc) · 1.52 KB
/
minundpv.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
########################
#Min Ladung + PV Uberschussregelung lademodus 1
minundpvlademodus(){
if (( ladestatus == 0 )); then
runs/set-current.sh $minimalampv all
if [[ $debug == "1" ]]; then
echo "starte min + pv ladung mit $minimalampv"
fi
else
if (( ladeleistung < 500 )); then
llneu=$minimalampv
#runs/set-current.sh $llneu all
else
if (( uberschuss < pvregelungm )); then
if (( llalt > minimalampv )); then
if (( uberschuss < -1380 )); then
if (( anzahlphasen < 4 )); then
llneu=$((llalt - 6 ))
else
llneu=$((llalt - 2 ))
fi
if (( uberschuss < -2760 )); then
if (( anzahlphasen < 4 )); then
llneu=$((llalt - 12 ))
else
llneu=$((llalt - 4 ))
fi
fi
if (( llneu < minimalampv )); then
llneu=$minimalampv
fi
else
llneu=$((llalt - 1 ))
fi
#runs/set-current.sh $llneu all
else
llneu=$minimalampv
#runs/set-current.sh $llneu all
fi
fi
if (( uberschuss > schaltschwelle )); then
if (( uberschuss > 1380 )); then
if (( anzahlphasen < 4 )); then
llneu=$((llalt + 5 ))
else
llneu=$((llalt + 2 ))
fi
if (( uberschuss > 2760 )); then
if (( anzahlphasen < 4 )); then
llneu=$((llalt + 11 ))
else
llneu=$((llalt + 3 ))
fi
fi
if (( llneu > maximalstromstaerke )); then
llneu=$maximalstromstaerke
fi
else
llneu=$((llalt + 1 ))
fi
fi
fi
fi
runs/set-current.sh $llneu all
}