Create presence_demo.py
Browse files- tools/presence_demo.py +15 -0
tools/presence_demo.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# presence_demo.py
|
| 2 |
+
# Minimal stub: computes a dummy Presence Index p(t)
|
| 3 |
+
# Replace with real logic when ready.
|
| 4 |
+
|
| 5 |
+
def presence_dummy():
|
| 6 |
+
cra_sim = 0.7
|
| 7 |
+
A = 0.6
|
| 8 |
+
inertia = 0.1
|
| 9 |
+
reset = 0
|
| 10 |
+
z = cra_sim + A - inertia - reset
|
| 11 |
+
p = 1 / (1 + pow(2.718, -z)) # sigmoid
|
| 12 |
+
print(f"Dummy Presence Index p(t) = {p:.2f}")
|
| 13 |
+
|
| 14 |
+
if __name__ == "__main__":
|
| 15 |
+
presence_dummy()
|