From d8d91e1cdaea071b4b305d6265095b9f5b428a8e Mon Sep 17 00:00:00 2001 From: Einar Baumann Date: Thu, 24 Nov 2016 10:41:36 +0100 Subject: [PATCH] Add a new notebook --- .../python3/LogPlotter.ipynb | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 tools/ipython_notebooks/python3/LogPlotter.ipynb diff --git a/tools/ipython_notebooks/python3/LogPlotter.ipynb b/tools/ipython_notebooks/python3/LogPlotter.ipynb new file mode 100644 index 000000000..f0aa21670 --- /dev/null +++ b/tools/ipython_notebooks/python3/LogPlotter.ipynb @@ -0,0 +1,96 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:04e93c75a12ec21f1ab4c75eb40d6cb9d455d9821f45edfe5f1146aa0d403d4b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "APPS" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from LogReader import PropertyUuidNameMapLog, CaseLog, SimulationLog, OptimizationLog, ProductionDataLog\n", + "from LogDataStructures import CaseContainer, Optimizer\n", + "\n", + "output_path=\"/home/einar/fo_out_20161122_apps/\"\n", + "name_map = PropertyUuidNameMapLog(output_path + \"log_property_uuid_name_map.csv\")\n", + "case_log = CaseLog(output_path + \"log_cases.csv\")\n", + "sim_log_1 = SimulationLog(output_path + \"rank1/log_simulation.csv\")\n", + "opt_log = OptimizationLog(output_path + \"log_optimization.csv\")\n", + "prod_log = ProductionDataLog(output_path + \"rank1/log_production_data.txt\")\n", + "\n", + "case_container = CaseContainer(case_log, name_map)\n", + "optimizer = Optimizer(opt_log, case_container)\n", + "\n", + "y1 = []\n", + "for case in optimizer.best_case_pr_iteration:\n", + " y1.append(case.objective_function_value)\n", + " \n", + "from matplotlib import pyplot as plt\n", + "plt.plot(y1)\n", + "plt.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 11 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "output_path=\"/home/einar/fo_out_20161118/\"\n", + "name_map = PropertyUuidNameMapLog(output_path + \"log_property_uuid_name_map.csv\")\n", + "case_log = CaseLog(output_path + \"log_cases.csv\")\n", + "sim_log_1 = SimulationLog(output_path + \"log_simulation.csv\")\n", + "opt_log = OptimizationLog(output_path + \"log_optimization.csv\")\n", + "prod_log = ProductionDataLog(output_path + \"log_production_data.txt\")\n", + "\n", + "case_container = CaseContainer(case_log, name_map)\n", + "optimizer = Optimizer(opt_log, case_container)\n", + "\n", + "y2 = []\n", + "for case in optimizer.best_case_pr_iteration:\n", + " y2.append(case.objective_function_value)\n", + " \n", + "from matplotlib import pyplot as plt\n", + "plt.plot(y2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "metadata": {}, + "output_type": "pyout", + "prompt_number": 12, + "text": [ + "[]" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file