modified:   docs/runningeplus.ipynb
"https://github.com/pyenergyplus/zeppy"
]
},
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Make idf.run() work like EPLaunch"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "I like the function ``make_eplaunch_options``. Can I use it to do a single run ?\n",
+ "\n",
+ "Yes! You can. \n",
+ "\n",
+ "**An Explanation:** EPLaunch is an application that comes with EnergyPlus on the Windows Platform. It has a default functionality that people become familiar with and come to expect. ``make_eplaunch_options`` set up the idf.run() arguments so that it behaves in the same way as EPLaunch.\n",
+ "\n",
+ "Here is the Sample code below. Modify and use it for your needs"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "\"\"\"single run EPLaunch style\"\"\"\n",
+ "\n",
+ "\n",
+ "import os \n",
+ "from eppy.modeleditor import IDF\n",
+ "from eppy.runner.run_functions import runIDFs\n",
+ "\n",
+ "def make_eplaunch_options(idf):\n",
+ " \"\"\"Make options for run, so that it runs like EPLaunch on Windows\"\"\"\n",
+ " idfversion = idf.idfobjects['version'][0].Version_Identifier.split('.')\n",
+ " idfversion.extend([0] * (3 - len(idfversion)))\n",
+ " idfversionstr = '-'.join([str(item) for item in idfversion])\n",
+ " fname = idf.idfname\n",
+ " options = {\n",
+ " # 'ep_version':idfversionstr, # runIDFs needs the version number\n",
+ " # idf.run does not need the above arg\n",
+ " # you can leave it there and it will be fine :-)\n",
+ " 'output_prefix':os.path.basename(fname).split('.')[0],\n",
+ " 'output_suffix':'C',\n",
+ " 'output_directory':os.path.dirname(fname),\n",
+ " 'readvars':True,\n",
+ " 'expandobjects':True\n",
+ " }\n",
+ " return options\n",
+ "\n",
+ "\n",
+ "def main():\n",
+ " iddfile = \"/Applications/EnergyPlus-9-3-0/Energy+.idd\" # change this for your operating system and E+ version\n",
+ " IDF.setiddname(iddfile)\n",
+ " epwfile = \"USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw\"\n",
+ "\n",
+ "\n",
+ "\n",
+ " # File is from the Examples Folder\n",
+ " idfname = \"HVACTemplate-5ZoneBaseboardHeat.idf\"\n",
+ " idf = IDF(idfname, epwfile)\n",
+ " theoptions = make_eplaunch_options(idf)\n",
+ " idf.run(**theoptions)\n",
+ "\n",
+ "\n",
+ "if __name__ == '__main__':\n",
+ " main()"
+ ]
+ },
{
"cell_type": "markdown",
"metadata": {},
