From 0eeed616e0784073d517fd818d1206f101c96792 Mon Sep 17 00:00:00 2001 From: "Joshua E. Jodesty" Date: Mon, 7 Jan 2019 20:42:42 -0500 Subject: [PATCH] put back notebooks/test.ipynb --- notebooks/test.ipynb | 78 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 notebooks/test.ipynb diff --git a/notebooks/test.ipynb b/notebooks/test.ipynb new file mode 100644 index 0000000..4814a4a --- /dev/null +++ b/notebooks/test.ipynb @@ -0,0 +1,78 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print(\"Simulation Run 2: Pairwise Execution\")\n", + "print()\n", + "multi_proc_ctx = ExecutionContext(exec_mode.multi_proc)\n", + "run2 = Executor(multi_proc_ctx, configs)\n", + "run2_raw_results = run2.main()\n", + "for raw_result in run2_raw_results:\n", + " result = pd.DataFrame(raw_result)\n", + " print(tabulate(result, headers='keys', tablefmt='psql'))\n", + "print()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "print(\"Simulation Run 1\")\n", + "print()\n", + "single_config = [configs[0]]\n", + "single_proc_ctx = ExecutionContext(exec_mode.single_proc)\n", + "run1 = Executor(single_proc_ctx, single_config)\n", + "run1_raw_result = run1.main()\n", + "result = pd.DataFrame(run1_raw_result)\n", + "result" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "import pandas as pd\n", + "from tabulate import tabulate\n", + "\n", + "from SimCAD.engine import ExecutionMode, ExecutionContext, Executor\n", + "from sandboxUX import config1, config2\n", + "from SimCAD import configs\n", + "\n", + "# ToDo: pass ExecutionContext with execution method as ExecutionContext input\n", + "\n", + "exec_mode = ExecutionMode()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +}