{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Algorithm quickstart\n", "\n", "SIMULATION ONLY. NOT IDENTIFIED FROM REAL HARDWARE. NOT A PHYSICAL VALIDATION MODEL." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from hth_sdk import HTH\n", "\n", "hth = HTH.demo(scenario=\"normal\", seed=1, speed=20)\n", "state = hth.read()\n", "print(len(state.temperatures_c), state.max_temperature_c)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "curve = []\n", "for st in hth.watch(period=0.02, count=5):\n", " r = hth.set(fan=20, heater=20, door=0)\n", " curve.append(st.max_temperature_c)\n", " assert r.ok\n", "print(curve)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "hth.close()\n", "with HTH.demo(scenario=\"coupled_4chamber\", seed=1, speed=20) as other:\n", " print(other.read().ready)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 5 }