You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importrandomrandom.randint(22, 38) # random int between 22 and 38random.uniform(40.0, 90.0) # random floatrandom.choice([True, False]) # pick one randomlyrandom.choices([1, 0], weights=[70, 30])[0] # weighted random pick
Project File Map
File
Class
Key Method
config.py
— (constants only)
—
sensor.py
SensorSimulator
get_data(ac_state)
engine.py
DecisionEngine
evaluate(data, threshold, buffer, ...)
calculator.py
EnergyCalculator
compute(ac_state)
logger.py
DataLogger
store(record), get_latest(n)
main.py
— (runner)
main()
dashboard.py
— (UI)
main()
Run Commands
# Terminal simulation
python3 src/main.py
# Dashboard
streamlit run src/dashboard.py