{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Use eppy3000 with eppy" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "#ignore the 3 lines below\n", "import sys\n", "pathnameto_eppy3000 = '../'\n", "sys.path.append(pathnameto_eppy3000)" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import eppy\n", "idffile = '../eppy3000/resources/snippets/V9_1/Minimal.idf'\n", "idf = eppy.openidf(idffile)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "import eppy3000.oldeppy as oldeppy\n", "epschema = '../eppy3000/resources/schema/V9_0/Energy+.schema.epJSON'\n", "epj = oldeppy.idf2epj(idf, open(epschema, 'r'))" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "idfbuilding = idf.idfobjects['building']" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "epjbuilding = epj.epobjects['Building']" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[\n", "Building,\n", " None, !- Name\n", " 0, !- North Axis\n", " Suburbs, !- Terrain\n", " 0.04, !- Loads Convergence Tolerance Value\n", " 0.4, !- Temperature Convergence Tolerance Value\n", " FullInteriorAndExterior, !- Solar Distribution\n", " 25, !- Maximum Number of Warmup Days\n", " 6; !- Minimum Number of Warmup Days\n", "]\n" ] } ], "source": [ "print(idfbuilding)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[\n", "Building !- EP_KEY\n", " None !- EPJOBJECT_NAME\n", " 0 !- north_axis\n", " Suburbs !- terrain\n", " 0.04 !- loads_convergence_tolerance_value\n", " 0.4 !- temperature_convergence_tolerance_value\n", " FullInteriorAndExterior !- solar_distribution\n", " 25 !- maximum_number_of_warmup_days\n", " 6 !- minimum_number_of_warmup_days\n", " 3 !- idf_order]\n" ] } ], "source": [ "print(epjbuilding)" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{\n", " \"Version\": {\n", " \"Version 1\": {\n", " \"version_identifier\": \"9.1\",\n", " \"idf_order\": 1\n", " }\n", " },\n", " \"SimulationControl\": {\n", " \"SimulationControl 1\": {\n", " \"do_zone_sizing_calculation\": \"No\",\n", " \"do_system_sizing_calculation\": \"No\",\n", " \"do_plant_sizing_calculation\": \"No\",\n", " \"run_simulation_for_sizing_periods\": \"Yes\",\n", " \"run_simulation_for_weather_file_run_periods\": \"No\",\n", " \"idf_order\": 2\n", " }\n", " },\n", " \n" ] } ], "source": [ "print(epj.jsonstr()[:500])" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" } }, "nbformat": 4, "nbformat_minor": 4 }