Last active
July 16, 2020 08:08
-
-
Save altavir/539d1a8fe7d3ad968048ed09ea6f6a69 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "cells": [ | |
| { | |
| "cell_type": "code", | |
| "execution_count": 1, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "%use plotly\n", | |
| "@file:Repository(\"*mavenLocal\")" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "# API" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 37, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "enum class Severity(val penalty: Double){\n", | |
| " MINOR(1.0),\n", | |
| " MAJOR(2.0),\n", | |
| " CRITICAL(3.0)\n", | |
| "}\n", | |
| "\n", | |
| "enum class State{\n", | |
| " OPEN,\n", | |
| " ASSIGNED,\n", | |
| " RESOLVED\n", | |
| "}\n", | |
| "\n", | |
| "data class Issue(val id: String, val dayCreated: Int, val severity: Severity, val complexity: Int, \n", | |
| " var state: State = State.OPEN, var dayAssigned: Int? = null, var dayResolved: Int? = null){\n", | |
| " fun activate(day: Int){ \n", | |
| " state = State.ASSIGNED\n", | |
| " dayAssigned = day\n", | |
| " }\n", | |
| " \n", | |
| " fun resolve(day: Int){\n", | |
| " state = State.RESOLVED\n", | |
| " dayResolved = day\n", | |
| " }\n", | |
| " \n", | |
| " internal fun tryResolve(day: Int){\n", | |
| " if(state == State.ASSIGNED && day >= (dayAssigned ?: 0) + complexity ){\n", | |
| " resolve(day)\n", | |
| " }\n", | |
| " }\n", | |
| "}\n", | |
| "\n", | |
| "class Worker(val name: String){\n", | |
| " var currentIssue: Issue? = null\n", | |
| " private set\n", | |
| " \n", | |
| " fun isBusy(): Boolean = currentIssue != null\n", | |
| " \n", | |
| " fun update(day: Int){\n", | |
| " currentIssue?.tryResolve(day)\n", | |
| " if(currentIssue?.state == State.RESOLVED){\n", | |
| " currentIssue = null\n", | |
| " }\n", | |
| " }\n", | |
| " \n", | |
| " fun assign(day: Int, issue: Issue){\n", | |
| " if(currentIssue != null) error(\"Can't assign work to a worker which is busy\")\n", | |
| " issue.activate(day)\n", | |
| " currentIssue = issue\n", | |
| " }\n", | |
| "}\n", | |
| "\n", | |
| "interface IssueGenerator{\n", | |
| " fun generate(day: Int): List<Issue>\n", | |
| "}\n", | |
| "\n", | |
| "interface Strategy{\n", | |
| " fun selectIssue(day: Int, issues: List<Issue>): Issue?\n", | |
| "}\n", | |
| "\n", | |
| "class WorkResult(val issues: List<Issue>, val workers: Int, val days: Int)\n", | |
| "\n", | |
| "@OptIn(kotlin.ExperimentalStdlibApi::class)\n", | |
| "fun simulate(generator: IssueGenerator, strategy: Strategy, numWorkers: Int = 10, days: Int = 100): WorkResult{\n", | |
| " val workers = (0 until numWorkers).map{Worker(\"worker $it\")}\n", | |
| " val issues = buildList<Issue>{\n", | |
| " for(day in 0 until days){\n", | |
| " //update all workers\n", | |
| " workers.forEach { it.update(day) }\n", | |
| " //generate new issues\n", | |
| " val newIssues = generator.generate(day)\n", | |
| " addAll(newIssues)\n", | |
| " //Select all free workers\n", | |
| " workers.filter { !it.isBusy() }.forEach { worker->\n", | |
| " val unasigned = filter { it.state == State.OPEN }\n", | |
| " val anIssue = strategy.selectIssue(day, unasigned) //select an issue to assign from all unassigned issues\n", | |
| " if(anIssue != null){\n", | |
| " worker.assign(day, anIssue)\n", | |
| " }\n", | |
| " }\n", | |
| " }\n", | |
| " }\n", | |
| " return WorkResult(issues, numWorkers, days)\n", | |
| "}\n", | |
| "\n", | |
| "fun WorkResult.computeLoss(): Double = issues.sumByDouble { ((it.dayResolved ?: days) - it.dayCreated)*it.severity.penalty } / days / workers / issues.size" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "# Implementations" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 72, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "import kotlin.random.Random\n", | |
| "import kotlin.math.pow\n", | |
| "\n", | |
| "/**\n", | |
| "* Generate one random issue per day\n", | |
| "*/\n", | |
| "class RandomIssueGenerator(seed: Long, val issuesPerDay: Int = 4 ) : IssueGenerator{\n", | |
| " private val random = Random(seed)\n", | |
| " override fun generate(day: Int): List<Issue>{\n", | |
| " return List(issuesPerDay){\n", | |
| " val severity = Severity.values()[random.nextInt(3)]\n", | |
| " val complexity = random.nextInt(15)\n", | |
| " Issue(\"${day}_${it}\", day, severity, complexity)\n", | |
| " }\n", | |
| " }\n", | |
| "}\n", | |
| "\n", | |
| "object TakeOldest: Strategy{\n", | |
| " override fun selectIssue(day: Int, issues: List<Issue>): Issue?{\n", | |
| " return issues.minBy { it.dayCreated }\n", | |
| " }\n", | |
| "}\n", | |
| "\n", | |
| "class TakeRandom(seed: Long): Strategy{\n", | |
| " private val random = Random(seed)\n", | |
| " override fun selectIssue(day: Int, issues: List<Issue>): Issue?{\n", | |
| " if(issues.isEmpty()) return null\n", | |
| " return issues.random(random)\n", | |
| " }\n", | |
| "}\n", | |
| "\n", | |
| "object TakeCritical: Strategy{\n", | |
| " override fun selectIssue(day: Int, issues: List<Issue>): Issue?{\n", | |
| " return issues.maxBy { it.severity.penalty*(day - it.dayCreated) }\n", | |
| " }\n", | |
| "}\n", | |
| "\n" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "# Simulate lossseverity" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 73, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "val seed = 89L\n", | |
| "val days = 100\n", | |
| "val workers = 10" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "## Take oldest" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 74, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "0.09060299999999999" | |
| ] | |
| }, | |
| "execution_count": 74, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "val result = simulate(RandomIssueGenerator(seed, workers),TakeOldest, days = days)\n", | |
| "//result.issues.forEach { println(it)}\n", | |
| "result.computeLoss()" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "## Take random" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 75, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "0.09044100000000001" | |
| ] | |
| }, | |
| "execution_count": 75, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "simulate(RandomIssueGenerator(seed, workers),TakeRandom(seed), days = days).computeLoss()" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "## Take critical" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 76, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "0.085132" | |
| ] | |
| }, | |
| "execution_count": 76, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "simulate(RandomIssueGenerator(seed, workers), TakeCritical, days = days).computeLoss()" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 77, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/html": [ | |
| "<html>\n", | |
| " <head>\n", | |
| " <meta charset=\"utf-8\">\n", | |
| " <script src=\"https://cdn.plot.ly/plotly-latest.min.js\"></script>\n", | |
| " <title>Loss distribtution</title>\n", | |
| " </head>\n", | |
| " <body>\n", | |
| " <div id=\"plot\">\n", | |
| " <script defer=\"defer\">\n", | |
| "Plotly.react(\n", | |
| " 'plot',\n", | |
| " [{\"x\":[0.08860499999999999,0.088083,0.09134,0.08905199999999999,0.088479,0.08443300000000001,0.086825,0.085707,0.09045399999999999,0.08616700000000001,0.08807000000000001,0.08692100000000001,0.089132,0.08489500000000001,0.087999,0.08764,0.08812,0.08756900000000001,0.086899,0.08819400000000001,0.086389,0.088167,0.08745599999999999,0.089793,0.089772,0.086202,0.087548,0.085652,0.087403,0.086316,0.088931,0.085066,0.087096,0.08571799999999999,0.087699,0.086012,0.08736100000000001,0.087338,0.08531,0.086279,0.085643,0.08754600000000001,0.084897,0.08767799999999999,0.085521,0.086392,0.086504,0.088267,0.088639,0.087708,0.086062,0.09,0.08820700000000001,0.086199,0.086479,0.088238,0.089676,0.088015,0.08549199999999998,0.089612,0.08974800000000001,0.08711400000000001,0.091212,0.08848099999999999,0.086228,0.088958,0.08486199999999999,0.08834499999999999,0.08794,0.088543,0.08734,0.086922,0.085632,0.091599,0.088577,0.089389,0.087385,0.088503,0.08745599999999999,0.08837300000000001,0.087137,0.087656,0.08626,0.088568,0.08667100000000001,0.09027299999999999,0.088477,0.08861100000000001,0.084262,0.08886699999999999,0.08757899999999999,0.08907899999999999,0.08849800000000001,0.086357,0.086135,0.085382,0.0874,0.086354,0.084838,0.088187,0.086391,0.08758099999999999,0.086897,0.088922,0.090401,0.086596,0.087188,0.08851200000000001,0.086719,0.08858400000000001,0.086918,0.08457,0.088665,0.087005,0.085217,0.090334,0.08842699999999999,0.088245,0.088733,0.08556799999999999,0.087518,0.09023600000000001,0.086463,0.087813,0.0889,0.087305,0.088797,0.088931,0.086545,0.086899,0.087132,0.08758200000000001,0.08845900000000001,0.08649,0.08592999999999999,0.087906,0.087684,0.08713300000000002,0.087767,0.087293,0.08624199999999999,0.086304,0.08989,0.08675,0.084285,0.08931,0.08817100000000001,0.088759,0.088479,0.086142,0.088115,0.085723,0.086199,0.087892,0.089812,0.085637,0.09109700000000001,0.085723,0.086056,0.08768,0.08985599999999999,0.08903,0.085768,0.089225,0.086773,0.087862,0.086344,0.088184,0.086176,0.087906,0.08728799999999999,0.08622400000000001,0.085865,0.085826,0.08752299999999999,0.087313,0.086806,0.088534,0.089642,0.08802000000000001,0.085937,0.091098,0.089469,0.08641599999999999,0.08577000000000001,0.090789,0.087461,0.08729600000000001,0.08705299999999999,0.08848400000000001,0.086711,0.08805199999999999,0.088997,0.086548,0.090935,0.087312,0.086775,0.086358,0.085385,0.084232,0.08558099999999999,0.088548,0.086287,0.086464,0.08799,0.08902000000000002,0.08706799999999999,0.08621799999999999,0.089062,0.08824199999999999,0.08692699999999999,0.085293,0.08882599999999999,0.088857,0.08919800000000001,0.08630199999999999,0.088115,0.086494,0.08555199999999999,0.086984,0.08739799999999999,0.084902,0.08463899999999999,0.088337,0.086766,0.087267,0.08810599999999999,0.085404,0.087265,0.086176,0.089681,0.087515,0.08539500000000001,0.087979,0.08683,0.089006,0.08817100000000001,0.088625,0.086805,0.085964,0.086957,0.086045,0.089958,0.086865,0.085405,0.087813,0.084888,0.086098,0.086554,0.089985,0.085861,0.08751,0.08647200000000001,0.086342,0.090144,0.086373,0.08452599999999999,0.087252,0.086384,0.085787,0.08612,0.087414,0.085324,0.089005,0.08720900000000001,0.088142,0.086711,0.086659,0.086482,0.08899299999999999,0.09033799999999999,0.08856,0.086351,0.087181,0.08994800000000001,0.089768,0.085983,0.086172,0.08668200000000001,0.086014,0.08775800000000002,0.086435,0.089899,0.08762899999999998,0.089046,0.088009,0.085478,0.091283,0.08844199999999999,0.08626900000000001,0.08703799999999999,0.084002,0.08337399999999999,0.088059,0.086004,0.08733500000000001,0.09003499999999999,0.087333,0.08916400000000001,0.087173,0.088453,0.087298,0.08395599999999999,0.08832899999999999,0.086744,0.088214,0.08692799999999999,0.085502,0.089283,0.08921799999999999,0.088057,0.088121,0.08808099999999999,0.086077,0.086473,0.08832300000000001,0.088358,0.08448900000000001,0.08528999999999999,0.08831699999999999,0.09004400000000001,0.086691,0.086254,0.08588599999999999,0.089676,0.08813700000000001,0.084092,0.086375,0.088533,0.087738,0.085357,0.088682,0.08555499999999999,0.087494,0.088238,0.08846000000000001,0.08795399999999999,0.086094,0.08740700000000001,0.087828,0.08739500000000001,0.086846,0.088724,0.087022,0.092244,0.090836,0.08604099999999999,0.08931499999999999,0.087816,0.08455499999999999,0.088854,0.08784299999999999,0.085713,0.089735,0.08388899999999999,0.08775800000000002,0.08510499999999999,0.09001,0.086408,0.091015,0.08580199999999999,0.08900399999999999,0.08684,0.087385,0.087463,0.086905,0.086463,0.087525,0.089214,0.088214,0.08417,0.085472,0.088989,0.086515,0.085824,0.086684,0.08702000000000001,0.08591700000000001,0.088173,0.086281,0.08835900000000001,0.08869400000000001,0.086365,0.088549,0.084625,0.089476,0.08729600000000001,0.086905,0.087822,0.09171900000000001,0.085517,0.088603,0.086063,0.087087,0.088142,0.08816299999999999,0.08867699999999999,0.08776300000000001,0.08687600000000001,0.08776300000000001,0.08719400000000001,0.08734900000000001,0.089836,0.089252,0.086793,0.08749,0.08698600000000001,0.08713300000000002,0.087109,0.089447,0.08738,0.08717699999999999,0.08848400000000001,0.08653,0.08673499999999999,0.08839799999999999,0.08645399999999999,0.08850100000000001,0.084397,0.087035,0.086668,0.08675800000000002,0.085461,0.086102,0.08665099999999999,0.088377,0.08685599999999999,0.085226,0.08553200000000001,0.08537399999999999,0.087159,0.08895,0.088729,0.08837899999999999,0.08938,0.08662600000000001,0.087771,0.09034099999999999,0.08770599999999999,0.08752000000000001,0.08538599999999999,0.085543,0.088478,0.090753,0.087034,0.089418,0.08795900000000001,0.089173,0.087577,0.089214,0.091021,0.085551,0.089374,0.08464,0.086391,0.088756,0.087985,0.08915599999999999,0.087358,0.085616,0.086534,0.084575,0.087589,0.08749199999999999,0.089214,0.09033200000000001,0.085815,0.087029,0.085859,0.089862,0.08520599999999999,0.08691,0.08919500000000001,0.087643,0.086463,0.08755,0.08887300000000001,0.087696,0.087397,0.086437,0.085217,0.083068,0.085086,0.087962,0.083983,0.086365,0.08591499999999999,0.087223,0.08830400000000001,0.088027,0.08864799999999999,0.08340299999999999,0.087473,0.087185,0.088864,0.087187,0.089798,0.087518,0.08745,0.086517,0.08879,0.086103,0.08564400000000001,0.08809900000000001,0.08727299999999999,0.092554,0.088092,0.088114,0.083797,0.088244,0.091015,0.08637399999999999,0.082905,0.08652000000000001,0.08735499999999999,0.08721999999999999,0.088905,0.08657300000000001,0.08421000000000001,0.08845499999999999,0.08637600000000001,0.087541,0.087246,0.089646,0.08962,0.08622,0.090325,0.08765,0.08870499999999999,0.086123,0.086909,0.08704400000000001,0.08992,0.088517,0.087411,0.08776300000000001,0.08366599999999999,0.08590099999999999,0.088869,0.090026,0.085163,0.087057,0.087833,0.08688599999999999,0.08667100000000001,0.084437,0.08862899999999999,0.087857,0.084118,0.09024800000000001,0.088639,0.086934,0.090935,0.089121,0.088214,0.08907899999999999,0.09111799999999999,0.089399,0.087589,0.088385,0.08906399999999999,0.085175,0.084693,0.08814,0.08728,0.088518,0.088613,0.086528,0.087551,0.086647,0.08712,0.085547,0.088199,0.08928099999999999,0.08553,0.087241,0.087455,0.08816900000000001,0.086842,0.09052000000000002,0.08713300000000002,0.088813,0.087381,0.085547,0.089764,0.08581699999999999,0.085048,0.085096,0.087512,0.088649,0.08573900000000001,0.08516900000000001,0.08744199999999999,0.08702700000000001,0.087727,0.087789,0.090487,0.084856,0.088854,0.087211,0.08790700000000001,0.087528,0.08629400000000001,0.08621000000000001,0.08479400000000001,0.08903099999999999,0.086596,0.08948099999999999,0.086487,0.087838,0.089075,0.08836,0.087446,0.089786,0.08611699999999999,0.08907000000000001,0.090302,0.086622,0.086411,0.08765200000000001,0.087029,0.087235,0.085789,0.087397,0.08889,0.08678200000000001,0.090226,0.085865,0.08697200000000001,0.08888599999999999,0.08704600000000001,0.086437,0.087202,0.090852,0.083828,0.086455,0.08562399999999999,0.08775,0.088737,0.08916,0.09028900000000001,0.08849800000000001,0.087173,0.087477,0.089886,0.088017,0.08887300000000001,0.086403,0.091519,0.08508099999999999,0.086806,0.085578,0.086517,0.085053,0.08808200000000001,0.08553999999999999,0.08447400000000001,0.09035299999999999,0.085891,0.087299,0.0846,0.088762,0.08498900000000001,0.087517,0.08583099999999999,0.085176,0.09024299999999999,0.08706799999999999,0.088995,0.085853,0.084641,0.08584,0.08563899999999999,0.086975,0.086241,0.08920399999999999,0.088168,0.087712,0.088055,0.08587600000000001,0.089905,0.084629,0.08927500000000001,0.08533099999999999,0.085527,0.087416,0.09001599999999998,0.084951,0.087936,0.08719500000000001,0.08644,0.086378,0.087801,0.087155,0.08845499999999999,0.087012,0.088882,0.086681,0.088543,0.08889799999999999,0.086822,0.08862300000000001,0.08637,0.087387,0.086516,0.088649,0.087844,0.08676099999999999,0.088905,0.09036699999999999,0.08890700000000001,0.088016,0.08702700000000001,0.09096000000000001,0.085937,0.08758099999999999,0.08731100000000001,0.088842,0.088337,0.08659,0.086286,0.08612600000000001,0.089499,0.089166,0.087035,0.08922799999999999,0.088519,0.086869,0.086744,0.086259,0.086143,0.08698900000000001,0.087484,0.08684700000000001,0.085857,0.086589,0.088925,0.08706,0.087135,0.087708,0.08817799999999999,0.08602000000000001,0.090465,0.087728,0.08622400000000001,0.088281,0.08567100000000001,0.08756399999999999,0.08683099999999999,0.088674,0.088436,0.088026,0.08735499999999999,0.08932000000000001,0.088687,0.08641499999999999,0.085604,0.086574,0.08875399999999999,0.088866,0.08914799999999999,0.08734700000000001,0.08715200000000001,0.085095,0.089202,0.089578,0.08886100000000001,0.085797,0.08723900000000001,0.090142,0.087559,0.085365,0.084097,0.09004999999999999,0.087656,0.086342,0.08881499999999999,0.08839500000000002,0.089555,0.088102,0.08868999999999999,0.08676099999999999,0.086075,0.086422,0.090277,0.089094,0.08666,0.088673,0.09125399999999999,0.08592100000000001,0.088786,0.087666,0.086437,0.088764,0.085747,0.08873400000000001,0.088012,0.08630299999999999,0.09061,0.086398,0.09040000000000001,0.086477,0.083963,0.08972200000000001,0.0882,0.08565099999999999,0.085042,0.088572,0.08820700000000001,0.088377,0.087646,0.086227,0.085503,0.084824,0.08673499999999999,0.08734,0.088165,0.0866,0.084147,0.085734,0.086935,0.090372,0.086535,0.087545,0.086519,0.087733,0.088217,0.08872999999999999,0.08568899999999999,0.087869,0.086741,0.087729,0.08598900000000001,0.087639,0.088811,0.08916400000000001,0.08633099999999999,0.086497,0.089381,0.08997799999999999,0.088756,0.087155,0.08932300000000001,0.088524,0.086287,0.085253,0.087019,0.087613,0.08756399999999999,0.08588599999999999,0.088173,0.08882599999999999,0.08759,0.088227,0.08878099999999998,0.086108,0.08741499999999999,0.08405800000000001,0.0844,0.09031600000000001,0.08916900000000001,0.08587,0.08382099999999999,0.088817,0.08459900000000001,0.08455,0.08809900000000001,0.08555,0.08634099999999999,0.089902,0.086465,0.087295,0.088135,0.09001599999999998,0.08794400000000001,0.08984299999999999,0.091048,0.088408,0.088946,0.08468600000000001,0.08421799999999999,0.08609,0.08852299999999999,0.08608099999999999,0.09014099999999999,0.089651,0.08664,0.089171,0.08696000000000001,0.08976,0.087238,0.08807899999999999,0.087528,0.08819800000000001,0.085375,0.08886100000000001,0.089586,0.08518200000000001,0.088401,0.09115599999999999,0.087517,0.08530700000000001,0.08944800000000001,0.09124600000000001,0.088338,0.08837,0.08792699999999999,0.088422,0.08706,0.08631,0.085219,0.08770900000000001,0.088146,0.08899299999999999,0.08690099999999999,0.08837600000000001,0.08594199999999999,0.087801,0.087362,0.086681,0.08669800000000001,0.090943,0.08777599999999999,0.08960499999999999,0.087589,0.088779,0.087393,0.090527,0.087295,0.08543300000000001,0.086015,0.08815,0.086763,0.087643,0.084211,0.08859299999999999,0.08726300000000001,0.091776,0.084793,0.085873,0.087641,0.088228,0.08814,0.086137,0.089089,0.086914,0.08949800000000001,0.08807000000000001,0.08866900000000001,0.08762,0.087912,0.087822,0.088364,0.08900100000000001,0.087668,0.088062,0.088083,0.08681900000000001,0.089673,0.08531699999999999,0.086539,0.084643,0.08619800000000001,0.086587,0.086592,0.08862899999999999,0.087385,0.08549199999999998,0.08793300000000001,0.084135,0.087159,0.087461,0.088547,0.086753,0.08711400000000001,0.083641,0.089259,0.087917,0.088943,0.088328,0.086326,0.086753,0.0877,0.08536,0.08520599999999999,0.086656,0.083422,0.089905,0.08642699999999999,0.089202,0.08586400000000001,0.087963,0.086531,0.088892,0.088357,0.08641299999999999,0.089133,0.086227,0.08719,0.09148099999999999],\"name\":\"oldest\",\"type\":\"histogram\"},{\"x\":[0.08972999999999999,0.08847200000000001,0.09046299999999999,0.087332,0.08899199999999999,0.08439400000000001,0.08723900000000001,0.084498,0.09021799999999999,0.085252,0.08842900000000001,0.08566,0.090055,0.083591,0.087755,0.087055,0.08835499999999999,0.088299,0.085903,0.08814500000000002,0.086485,0.088131,0.08790099999999999,0.088173,0.08868899999999999,0.08537600000000001,0.088525,0.086396,0.087259,0.08649899999999999,0.089988,0.08332099999999999,0.08618200000000001,0.08576,0.08694299999999999,0.08568300000000001,0.086097,0.087894,0.085798,0.086821,0.084941,0.086997,0.085768,0.087911,0.08662899999999998,0.086181,0.086988,0.088,0.088973,0.086339,0.085711,0.089381,0.08834299999999999,0.08619800000000001,0.085971,0.088234,0.089864,0.087771,0.086729,0.089667,0.089158,0.08656,0.09037,0.089229,0.087741,0.087874,0.08566499999999999,0.08851200000000001,0.089293,0.088299,0.086504,0.08691299999999999,0.08343300000000001,0.09097200000000001,0.089759,0.089196,0.089337,0.088779,0.08748600000000001,0.087363,0.087185,0.087551,0.085869,0.089999,0.087801,0.089682,0.087984,0.087245,0.084391,0.08866,0.08787,0.08933500000000001,0.088173,0.08658400000000001,0.085926,0.08580499999999999,0.088505,0.088711,0.084571,0.087723,0.085812,0.090127,0.086953,0.089128,0.089543,0.087799,0.087821,0.089503,0.08761,0.08845700000000001,0.086598,0.086576,0.086451,0.087108,0.08611400000000001,0.091403,0.088295,0.08707899999999999,0.08954,0.085023,0.086612,0.08934,0.085786,0.087279,0.08767799999999999,0.087291,0.08944800000000001,0.088628,0.087512,0.086109,0.08529099999999999,0.086545,0.087923,0.086535,0.085801,0.086924,0.08636,0.08728,0.086868,0.087324,0.08634700000000001,0.086437,0.089643,0.086496,0.084663,0.08893300000000001,0.087774,0.089049,0.08910299999999999,0.08551900000000001,0.087065,0.085986,0.08600100000000001,0.088508,0.08979999999999999,0.085578,0.08931399999999999,0.085,0.08566,0.087675,0.090639,0.088542,0.085449,0.087621,0.087235,0.087684,0.087476,0.08780299999999999,0.086783,0.08783099999999999,0.088061,0.084461,0.086066,0.085722,0.086941,0.08892,0.0865,0.088755,0.087654,0.08849,0.087517,0.089149,0.09029,0.08676,0.086767,0.088896,0.08856699999999999,0.085997,0.086036,0.08911799999999999,0.087208,0.088401,0.08939799999999999,0.08706799999999999,0.09009,0.087299,0.08567100000000001,0.088027,0.086609,0.085525,0.085164,0.08895700000000001,0.08758099999999999,0.085918,0.08863599999999999,0.08955400000000001,0.08684299999999999,0.085753,0.089017,0.088941,0.08755199999999999,0.08524,0.088401,0.08791299999999999,0.089007,0.086301,0.08818,0.085699,0.08405599999999999,0.088301,0.08809499999999999,0.086037,0.08466900000000001,0.088074,0.086764,0.087374,0.087215,0.083949,0.08847,0.08558299999999999,0.089,0.08892699999999999,0.084408,0.08905400000000001,0.086316,0.087863,0.089292,0.087602,0.08832899999999999,0.08595599999999999,0.087784,0.08554600000000001,0.088467,0.08555800000000001,0.08613,0.088124,0.085179,0.085891,0.086696,0.089892,0.08657000000000001,0.087813,0.086756,0.086932,0.08954999999999999,0.08645399999999999,0.08404900000000001,0.087729,0.086289,0.085025,0.087354,0.086648,0.084897,0.088864,0.08545900000000001,0.08884,0.08669299999999999,0.08516,0.085745,0.089848,0.09150499999999999,0.08970700000000001,0.08769400000000001,0.08648900000000001,0.089865,0.08933500000000001,0.08666900000000001,0.085357,0.08738300000000002,0.085029,0.087059,0.08705,0.09009600000000001,0.08708400000000001,0.08873099999999999,0.088857,0.08503999999999999,0.09053099999999999,0.087384,0.08729600000000001,0.085977,0.085279,0.083455,0.088215,0.086882,0.08744199999999999,0.089417,0.087877,0.088828,0.08698499999999999,0.08816299999999999,0.088447,0.083642,0.089628,0.087134,0.08862899999999999,0.086409,0.08612399999999999,0.08722999999999999,0.088854,0.088034,0.085125,0.08659099999999999,0.085237,0.086029,0.087655,0.08738300000000002,0.085498,0.084713,0.088779,0.08961,0.08717100000000001,0.084868,0.086571,0.089477,0.08675100000000001,0.08463,0.08686699999999999,0.087897,0.086824,0.085537,0.088094,0.086035,0.087447,0.089258,0.089351,0.08796999999999999,0.085623,0.086871,0.08783200000000001,0.08749199999999999,0.08713,0.08762600000000001,0.08599899999999999,0.09142600000000001,0.091218,0.085911,0.088732,0.086301,0.08692,0.087985,0.087838,0.08670399999999999,0.08938,0.084966,0.08794,0.08544700000000001,0.09028499999999999,0.086278,0.092369,0.08695,0.08907000000000001,0.086857,0.08684900000000001,0.087726,0.086457,0.084998,0.089184,0.08903,0.089209,0.083993,0.08530199999999999,0.08886699999999999,0.086497,0.086705,0.08646000000000001,0.08773099999999999,0.087162,0.088037,0.08737899999999998,0.08932899999999999,0.089101,0.085466,0.088533,0.084025,0.089693,0.086594,0.08697200000000001,0.087628,0.091711,0.086037,0.088756,0.08708400000000001,0.086536,0.089116,0.088997,0.08912300000000001,0.08833500000000001,0.086904,0.087358,0.08725399999999998,0.086937,0.09010599999999999,0.088578,0.08586699999999999,0.086389,0.08594700000000001,0.088168,0.08646599999999999,0.09023400000000001,0.089571,0.088397,0.088464,0.0869,0.088741,0.087104,0.087785,0.08714500000000001,0.086215,0.08808099999999999,0.086062,0.086321,0.08448900000000001,0.085858,0.087592,0.088101,0.08493099999999999,0.085872,0.08522999999999999,0.08417999999999999,0.08767699999999999,0.089863,0.088022,0.08995,0.090046,0.086685,0.089884,0.09098300000000001,0.087623,0.086934,0.084759,0.086338,0.08796799999999999,0.09108200000000001,0.085756,0.089046,0.088312,0.09011,0.08849299999999999,0.088543,0.09111,0.08491,0.088673,0.084027,0.087275,0.08926300000000001,0.08804,0.089012,0.086191,0.086408,0.08692,0.08464400000000001,0.08636,0.087382,0.08850399999999999,0.09059400000000001,0.08716900000000001,0.087787,0.086505,0.08891,0.087339,0.08706799999999999,0.089409,0.08646599999999999,0.08657899999999999,0.08837899999999999,0.088161,0.08758099999999999,0.08681,0.085668,0.085326,0.085847,0.083025,0.088012,0.085152,0.08603200000000001,0.085537,0.086862,0.087009,0.088641,0.088297,0.082953,0.088134,0.08730800000000001,0.08831399999999999,0.087184,0.090432,0.08831,0.087572,0.08688599999999999,0.08884700000000001,0.08713,0.084959,0.08743,0.087161,0.092318,0.08763300000000002,0.08910299999999999,0.08490700000000001,0.08690099999999999,0.09023400000000001,0.08895700000000001,0.08251,0.084607,0.088518,0.087414,0.087373,0.085837,0.08543600000000001,0.08767699999999999,0.08677599999999999,0.08807300000000001,0.08573900000000001,0.088312,0.08867699999999999,0.087771,0.09083200000000001,0.08673900000000001,0.08861699999999999,0.086971,0.087461,0.08618300000000001,0.090924,0.08788599999999999,0.08729200000000001,0.088735,0.084172,0.086513,0.08999299999999999,0.090991,0.08595599999999999,0.087074,0.087822,0.086288,0.08522,0.08538,0.087705,0.08806,0.08485,0.09047,0.087918,0.089259,0.090662,0.08879,0.08983799999999999,0.08912899999999999,0.08979999999999999,0.088316,0.088202,0.089499,0.089628,0.086853,0.084998,0.088711,0.08875,0.087143,0.08773600000000001,0.086217,0.087655,0.087003,0.088071,0.08465099999999999,0.088041,0.087352,0.08575100000000001,0.088393,0.088634,0.087299,0.087488,0.090304,0.088228,0.08883200000000001,0.08644800000000001,0.085628,0.09053200000000002,0.086719,0.084853,0.08443099999999999,0.085587,0.087054,0.083384,0.08635499999999999,0.088184,0.085595,0.08853,0.087506,0.091671,0.083827,0.089702,0.08641700000000001,0.088057,0.086824,0.085986,0.088024,0.085089,0.088756,0.08856399999999999,0.089171,0.086858,0.088391,0.088714,0.087797,0.08843899999999999,0.08924699999999999,0.08776,0.087554,0.08978499999999999,0.085603,0.08672,0.089238,0.08742,0.089215,0.08524,0.088316,0.088881,0.08643899999999999,0.089312,0.08622999999999999,0.08716900000000001,0.088921,0.08890700000000001,0.086399,0.08830199999999999,0.090725,0.084771,0.088298,0.08558299999999999,0.08585,0.089033,0.089568,0.09035599999999999,0.089253,0.086743,0.087779,0.090384,0.088642,0.088529,0.083881,0.090278,0.086342,0.087603,0.085231,0.087735,0.08621000000000001,0.089458,0.086872,0.084627,0.090448,0.086246,0.086732,0.08363899999999999,0.087365,0.086205,0.086871,0.08486400000000001,0.08600100000000001,0.08893899999999999,0.08614500000000001,0.089615,0.08607300000000001,0.08428400000000001,0.086505,0.085641,0.086998,0.086396,0.08925100000000001,0.088967,0.08909600000000001,0.087827,0.086368,0.090152,0.08430199999999999,0.08947200000000001,0.08461199999999999,0.086194,0.08847200000000001,0.08979999999999999,0.083745,0.08778,0.08569800000000001,0.08724199999999999,0.086991,0.08874,0.087524,0.08818,0.088264,0.088952,0.08640700000000001,0.08870700000000001,0.087497,0.08757599999999999,0.08875,0.085748,0.087285,0.08617100000000001,0.08770099999999999,0.08816900000000001,0.08535,0.089276,0.090681,0.088675,0.08835599999999999,0.088518,0.089947,0.087381,0.08815700000000001,0.088017,0.086283,0.08800399999999999,0.08779600000000001,0.08511,0.086854,0.088776,0.08904400000000001,0.08535499999999999,0.088635,0.088421,0.08629200000000001,0.08741900000000001,0.085647,0.086498,0.086862,0.089075,0.085889,0.08592100000000001,0.08574,0.086767,0.087304,0.088446,0.087414,0.08741299999999999,0.08613,0.089113,0.088525,0.086479,0.08659299999999999,0.086066,0.08705299999999999,0.086138,0.088228,0.087307,0.089673,0.086233,0.089727,0.087373,0.088162,0.085997,0.08731799999999999,0.089197,0.088269,0.088358,0.087738,0.086618,0.086312,0.090005,0.089325,0.089821,0.084726,0.087259,0.090735,0.089134,0.08636,0.085793,0.090324,0.088281,0.086923,0.088889,0.08822100000000001,0.088075,0.087712,0.088299,0.086955,0.087274,0.087371,0.088668,0.089185,0.086457,0.090288,0.09025,0.08517699999999999,0.089412,0.08732000000000001,0.087373,0.088747,0.086406,0.089382,0.087265,0.086213,0.089075,0.08531399999999999,0.089864,0.085637,0.082613,0.089006,0.08920399999999999,0.083625,0.08516900000000001,0.08677000000000001,0.088384,0.089089,0.088727,0.086872,0.08494199999999999,0.08574899999999999,0.08833099999999999,0.088525,0.087911,0.08630299999999999,0.084426,0.086533,0.0864,0.090881,0.08864,0.087738,0.086805,0.08767799999999999,0.089446,0.088641,0.084562,0.086756,0.08654600000000001,0.08676,0.085726,0.088006,0.08974299999999999,0.08797200000000001,0.08504400000000001,0.084194,0.091244,0.08907599999999999,0.088938,0.086422,0.08942699999999999,0.087811,0.086372,0.086022,0.08720399999999999,0.08774199999999999,0.088759,0.086403,0.088358,0.088643,0.08641599999999999,0.087301,0.088889,0.08662899999999998,0.08709900000000001,0.08379400000000001,0.084709,0.08946299999999999,0.086639,0.08621599999999999,0.08742699999999999,0.089762,0.085175,0.083761,0.088834,0.084662,0.08649199999999999,0.087549,0.08737899999999998,0.08780299999999999,0.088008,0.089851,0.08883500000000001,0.088047,0.090849,0.08751,0.08669299999999999,0.08520900000000001,0.084721,0.085392,0.088109,0.08778799999999999,0.09102299999999999,0.089562,0.088925,0.088962,0.088056,0.091804,0.088083,0.087632,0.08701,0.08849299999999999,0.086697,0.08745900000000001,0.091087,0.086203,0.08888,0.090537,0.089459,0.086471,0.090268,0.09172799999999999,0.087557,0.088321,0.08842799999999999,0.087363,0.08711100000000001,0.089438,0.086888,0.08720900000000001,0.088891,0.08875100000000001,0.088684,0.08825,0.086577,0.08816299999999999,0.08797999999999999,0.08701,0.08731100000000001,0.09028900000000001,0.08899299999999999,0.09104,0.086828,0.088293,0.088792,0.090146,0.08668899999999999,0.08709700000000001,0.08611699999999999,0.088344,0.088235,0.08683099999999999,0.083797,0.088627,0.08705299999999999,0.08953099999999999,0.08481,0.085213,0.088132,0.08919400000000001,0.087753,0.08794199999999999,0.089793,0.08774199999999999,0.08982899999999999,0.08834299999999999,0.088114,0.085184,0.08690099999999999,0.087793,0.088165,0.08815,0.08747999999999999,0.088172,0.087873,0.086687,0.08924699999999999,0.08684099999999999,0.087344,0.085924,0.086038,0.08760499999999999,0.08775100000000001,0.08818899999999999,0.086082,0.086047,0.089428,0.083574,0.08763,0.08885299999999999,0.088007,0.086825,0.08661100000000001,0.083944,0.08758099999999999,0.089176,0.089762,0.08805199999999999,0.087911,0.087556,0.08847100000000001,0.086578,0.085687,0.086219,0.08455499999999999,0.090336,0.08593300000000001,0.08930199999999999,0.08732599999999999,0.087531,0.087661,0.08848099999999999,0.08891900000000001,0.086747,0.08903,0.08668300000000001,0.086865,0.090279],\"name\":\"random\",\"type\":\"histogram\"},{\"x\":[0.083592,0.082608,0.086887,0.081914,0.08491599999999999,0.07954400000000002,0.08347700000000001,0.080181,0.08491499999999999,0.07962699999999999,0.08246799999999999,0.081072,0.08335200000000001,0.078926,0.08337699999999999,0.08254900000000001,0.083263,0.083259,0.082958,0.08303999999999999,0.08168600000000001,0.08401900000000001,0.081761,0.085428,0.085035,0.080285,0.084048,0.08111499999999999,0.082729,0.082045,0.082756,0.080318,0.08156100000000001,0.080347,0.08316799999999999,0.080154,0.08208099999999999,0.082136,0.079802,0.082662,0.081229,0.082518,0.080326,0.083838,0.08127200000000001,0.081535,0.08151,0.08397,0.08316599999999999,0.08127799999999999,0.080716,0.084475,0.084182,0.080367,0.082482,0.082995,0.085095,0.08391,0.080608,0.084253,0.085405,0.08226900000000001,0.08602000000000001,0.08386400000000001,0.083092,0.082513,0.07969899999999999,0.084064,0.083568,0.083224,0.08191,0.082957,0.079983,0.086556,0.083366,0.08449199999999998,0.082116,0.084491,0.083146,0.08233099999999999,0.0804,0.081729,0.07972200000000002,0.08508099999999999,0.080544,0.08529400000000001,0.082849,0.083275,0.079976,0.083152,0.083015,0.084316,0.084338,0.081829,0.080291,0.082233,0.08278200000000001,0.083004,0.080041,0.083313,0.08109999999999999,0.082356,0.080951,0.08454600000000001,0.083982,0.081088,0.081328,0.081023,0.082062,0.084523,0.081839,0.080962,0.082376,0.08129299999999999,0.07926000000000001,0.085649,0.083503,0.083576,0.08446799999999999,0.079961,0.08238,0.083991,0.08129600000000001,0.082649,0.08337,0.081291,0.08472299999999999,0.08407099999999999,0.081526,0.082036,0.082465,0.082898,0.083011,0.081795,0.08012999999999999,0.083288,0.084438,0.08176699999999999,0.082048,0.083256,0.08121900000000001,0.08287,0.083885,0.08277899999999999,0.079944,0.08398699999999999,0.082596,0.084059,0.081104,0.08240700000000001,0.08390399999999999,0.081326,0.081012,0.08266499999999999,0.08453999999999999,0.08103300000000001,0.08655700000000001,0.08123699999999999,0.08096900000000001,0.08313300000000001,0.08337399999999999,0.082441,0.080128,0.085303,0.08267100000000001,0.082467,0.08217400000000001,0.08320599999999999,0.080958,0.08353400000000001,0.081428,0.079902,0.07995599999999999,0.081176,0.082129,0.08243500000000001,0.082558,0.083777,0.084569,0.08448900000000001,0.08010900000000001,0.085173,0.085418,0.081569,0.08130499999999999,0.08367699999999999,0.08260900000000002,0.081741,0.08266,0.082841,0.08104299999999999,0.08442,0.084118,0.080743,0.085774,0.081792,0.081243,0.081712,0.08090800000000001,0.079184,0.079913,0.083641,0.081569,0.08154900000000001,0.081801,0.083662,0.081701,0.080576,0.083333,0.08319599999999999,0.08188200000000001,0.080967,0.08484799999999999,0.083719,0.084517,0.081614,0.081616,0.082222,0.079685,0.08300800000000001,0.081763,0.07966,0.080503,0.084634,0.08166799999999999,0.08382899999999999,0.08170599999999999,0.080387,0.081814,0.081095,0.08547400000000001,0.082606,0.080481,0.083376,0.082104,0.08382300000000001,0.082775,0.08312100000000001,0.082491,0.08187,0.081454,0.080571,0.084527,0.08033200000000001,0.079479,0.082827,0.080312,0.08089199999999999,0.082481,0.085137,0.082152,0.082947,0.081204,0.080917,0.08521000000000001,0.08030899999999999,0.079902,0.08235200000000001,0.083098,0.08129600000000001,0.082009,0.082574,0.080464,0.084649,0.082042,0.083777,0.081628,0.080512,0.081618,0.08471200000000001,0.084949,0.08472299999999999,0.08150199999999999,0.08228200000000001,0.08454900000000001,0.083629,0.080901,0.08163,0.08179299999999999,0.08123999999999999,0.084216,0.081551,0.083827,0.08252000000000001,0.083804,0.08194800000000001,0.08097,0.086531,0.083042,0.080751,0.080981,0.078842,0.077606,0.083285,0.081578,0.083585,0.08514400000000001,0.08312699999999999,0.08324899999999999,0.082563,0.083484,0.082881,0.07951599999999999,0.08416599999999999,0.08271200000000001,0.08278400000000001,0.081533,0.07935900000000001,0.083771,0.082804,0.083261,0.082401,0.082775,0.08077000000000001,0.08177000000000001,0.08239099999999999,0.08316599999999999,0.081374,0.079483,0.082819,0.08529400000000001,0.080453,0.081247,0.080935,0.08365500000000001,0.08130499999999999,0.078579,0.081846,0.083724,0.08330199999999999,0.081072,0.084065,0.081143,0.082955,0.084196,0.08379500000000001,0.08237699999999999,0.08046900000000001,0.08356100000000001,0.081318,0.082863,0.08379299999999999,0.082565,0.081402,0.08725,0.087018,0.082088,0.082822,0.08362399999999999,0.08052899999999999,0.081867,0.08224,0.08048699999999999,0.084785,0.078721,0.084273,0.080242,0.08421000000000001,0.081669,0.08570799999999999,0.081263,0.08399,0.08205199999999999,0.08238899999999999,0.08205899999999999,0.08176,0.081834,0.083176,0.083849,0.082044,0.079511,0.079776,0.085484,0.080527,0.079602,0.08222499999999999,0.081624,0.08073400000000001,0.082582,0.080667,0.083842,0.08283,0.08055,0.08340900000000001,0.080577,0.08567999999999999,0.083084,0.082131,0.08215399999999999,0.086137,0.079033,0.083753,0.080334,0.081521,0.082761,0.08310200000000001,0.083965,0.084384,0.08196200000000001,0.082414,0.082079,0.08190900000000001,0.08472299999999999,0.082886,0.082349,0.08174600000000001,0.082826,0.080239,0.08126599999999999,0.08436199999999999,0.08334299999999999,0.08329099999999999,0.08350800000000001,0.08228700000000001,0.08354299999999999,0.08390399999999999,0.080747,0.08317000000000001,0.078189,0.082511,0.081319,0.081503,0.081074,0.080676,0.081819,0.08422,0.08196500000000001,0.080337,0.080649,0.080244,0.08292100000000001,0.084392,0.082204,0.084926,0.084589,0.080139,0.083751,0.08419700000000001,0.081666,0.082322,0.080427,0.080462,0.083663,0.086142,0.080509,0.08522999999999999,0.0825,0.08231000000000001,0.082402,0.083601,0.085418,0.080387,0.084443,0.079789,0.08236199999999999,0.084804,0.083786,0.08415,0.082451,0.07953099999999999,0.081524,0.079575,0.081648,0.081119,0.084582,0.084865,0.081238,0.082974,0.08138,0.085578,0.081097,0.08233,0.08465099999999999,0.080697,0.081084,0.08180499999999999,0.08316,0.083287,0.082623,0.081851,0.08087899999999999,0.079038,0.07933799999999999,0.083824,0.079125,0.08165299999999999,0.080619,0.081286,0.082992,0.084022,0.08407200000000001,0.076659,0.08127899999999999,0.081722,0.08341499999999999,0.082286,0.083899,0.08338,0.083691,0.080651,0.084483,0.080451,0.081041,0.081824,0.08224,0.089803,0.08371200000000001,0.08242000000000001,0.081131,0.08409299999999999,0.084566,0.08121799999999998,0.07821900000000001,0.079702,0.082306,0.08310499999999998,0.083562,0.07990299999999999,0.079788,0.082167,0.080655,0.08331000000000001,0.081398,0.08428200000000001,0.084574,0.082304,0.08550100000000001,0.082326,0.082833,0.08025800000000001,0.08287,0.080818,0.084143,0.08421200000000001,0.082433,0.08338200000000001,0.078421,0.081745,0.08341499999999999,0.085231,0.08061199999999999,0.081553,0.081807,0.082596,0.08244199999999999,0.079056,0.08330199999999999,0.08221500000000001,0.07937899999999999,0.08660499999999999,0.084069,0.08109999999999999,0.085836,0.085076,0.08505,0.08442,0.085228,0.083824,0.081812,0.084251,0.08466599999999999,0.081833,0.07947,0.08242400000000001,0.080953,0.0848,0.084265,0.081429,0.083588,0.081562,0.081822,0.08007399999999999,0.082316,0.083336,0.081381,0.081119,0.08328999999999999,0.08315700000000001,0.082511,0.08645399999999999,0.082203,0.08458099999999999,0.082565,0.08113899999999999,0.084476,0.082617,0.07820599999999998,0.079823,0.082683,0.08303999999999999,0.08076900000000001,0.080373,0.08254500000000001,0.081388,0.08196900000000001,0.08253400000000001,0.086612,0.08029299999999999,0.085634,0.081732,0.082539,0.08155,0.082787,0.081569,0.08072,0.084267,0.082005,0.08506100000000001,0.082465,0.08244199999999999,0.08409900000000001,0.08257,0.082495,0.082521,0.081739,0.083238,0.08382899999999999,0.081396,0.08169199999999999,0.08227000000000001,0.081576,0.08253400000000001,0.081125,0.08189300000000001,0.082724,0.082092,0.084777,0.081357,0.081687,0.083676,0.081797,0.079791,0.08357300000000001,0.086309,0.079462,0.080554,0.078988,0.081564,0.084429,0.085565,0.085884,0.085016,0.081807,0.084399,0.084057,0.085517,0.083679,0.08139199999999999,0.085425,0.080195,0.081816,0.080209,0.08265299999999999,0.080429,0.08420399999999999,0.080616,0.079101,0.085753,0.081747,0.081986,0.078346,0.084106,0.07944899999999999,0.080649,0.08153999999999999,0.080564,0.085713,0.081579,0.08392699999999999,0.08234999999999999,0.07801699999999999,0.079678,0.08122,0.082365,0.080631,0.085134,0.082949,0.084199,0.083229,0.08262100000000001,0.085237,0.078069,0.083969,0.08008,0.080568,0.08075199999999999,0.084868,0.078652,0.082199,0.081804,0.080958,0.08052899999999999,0.082781,0.08216799999999999,0.08303999999999999,0.08139,0.084832,0.08203700000000001,0.083601,0.083741,0.083368,0.083577,0.081076,0.08319199999999999,0.08241499999999999,0.08382899999999999,0.08282500000000001,0.081086,0.085035,0.086213,0.083637,0.08487600000000001,0.08189,0.08494800000000001,0.081634,0.083398,0.082835,0.083309,0.083912,0.081928,0.081444,0.080046,0.08447400000000001,0.085702,0.080579,0.083577,0.083661,0.08117100000000001,0.081967,0.080323,0.08252799999999999,0.081974,0.084631,0.080458,0.082135,0.08257500000000001,0.08383099999999999,0.08239199999999999,0.082223,0.083162,0.082672,0.080985,0.08469800000000001,0.080901,0.081277,0.08329299999999999,0.081481,0.082841,0.080316,0.081788,0.08257500000000001,0.083224,0.08325,0.083598,0.08339400000000001,0.08253999999999999,0.081539,0.081578,0.08267999999999999,0.082301,0.084985,0.082221,0.081342,0.08021799999999998,0.084885,0.08390900000000001,0.08267999999999999,0.080303,0.081616,0.08489000000000001,0.083385,0.080236,0.07845300000000001,0.084469,0.083637,0.08247999999999998,0.084382,0.08337100000000001,0.08407200000000001,0.081873,0.083675,0.080079,0.08194599999999999,0.081658,0.084082,0.085199,0.08249,0.08516900000000001,0.08558099999999999,0.08117999999999999,0.084298,0.083167,0.08259400000000001,0.08449600000000002,0.080854,0.084441,0.08255,0.08228999999999999,0.084411,0.080872,0.08545900000000001,0.08121500000000001,0.07836699999999999,0.083588,0.08379099999999999,0.081419,0.07992,0.08215399999999999,0.08415700000000001,0.083341,0.082816,0.082172,0.08065900000000001,0.080511,0.08216799999999999,0.08328,0.08382,0.081363,0.07902200000000001,0.08220599999999999,0.083103,0.085707,0.08176599999999999,0.08273699999999999,0.081481,0.082373,0.08358,0.08301599999999999,0.08027200000000001,0.08156100000000001,0.082231,0.08295599999999999,0.07969,0.083353,0.084146,0.083375,0.081583,0.079452,0.08387100000000001,0.085402,0.084378,0.083023,0.083945,0.08291,0.081091,0.079914,0.08220000000000001,0.082913,0.082308,0.081663,0.083684,0.083147,0.08237100000000001,0.081857,0.08478999999999999,0.081243,0.08101,0.078248,0.07926599999999999,0.084501,0.083038,0.081597,0.079072,0.08540099999999999,0.078241,0.0799,0.083047,0.07943399999999999,0.082886,0.082199,0.083591,0.081774,0.08331699999999999,0.085195,0.082425,0.08491,0.08591700000000001,0.083244,0.082423,0.077819,0.07946500000000001,0.080657,0.08227000000000001,0.082557,0.085497,0.085244,0.082455,0.08396799999999999,0.08269599999999999,0.086274,0.081785,0.084104,0.083402,0.084135,0.080497,0.08269199999999999,0.08613599999999999,0.08286400000000001,0.082804,0.08591700000000001,0.083248,0.08147999999999998,0.086426,0.0868,0.083221,0.08314500000000001,0.083209,0.082364,0.082986,0.08238300000000001,0.080047,0.082229,0.08347700000000001,0.08162100000000001,0.08140900000000001,0.08311400000000001,0.080032,0.082673,0.083255,0.082056,0.082148,0.08549,0.08330800000000001,0.086037,0.08167400000000001,0.08432200000000001,0.081869,0.08574,0.082976,0.082004,0.081204,0.08289500000000001,0.081997,0.080756,0.07866200000000001,0.08507300000000001,0.08048400000000001,0.08555,0.080999,0.079012,0.082004,0.083747,0.084449,0.081247,0.083635,0.08206699999999999,0.08463300000000001,0.083969,0.08360499999999998,0.08173400000000001,0.083414,0.083818,0.08381,0.082945,0.082274,0.083475,0.08276,0.082066,0.084445,0.079644,0.081876,0.080067,0.082158,0.080858,0.082308,0.083473,0.081341,0.080824,0.08467100000000001,0.07983200000000001,0.08276399999999999,0.082445,0.083251,0.08126599999999999,0.082819,0.077774,0.08335200000000001,0.08353999999999999,0.086205,0.083485,0.080454,0.081203,0.08155899999999999,0.080881,0.08046299999999999,0.080888,0.078726,0.08531100000000001,0.08051699999999999,0.083591,0.08038200000000001,0.08333700000000001,0.081001,0.085111,0.082315,0.08286400000000001,0.083891,0.080896,0.082728,0.086505],\"name\":\"critical\",\"type\":\"histogram\"}],\n", | |
| " {\"xaxis\":{\"title\":\"Loss\"},\"title\":\"Loss distribtution\"},\n", | |
| " {\"responsive\":true}\n", | |
| ");\n", | |
| "</script>\n", | |
| " </div>\n", | |
| " </body>\n", | |
| "</html>\n" | |
| ] | |
| }, | |
| "execution_count": 77, | |
| "metadata": { | |
| "text/html": { | |
| "isolated": true | |
| } | |
| }, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "val seeds = List(1000){Random.nextLong()}\n", | |
| "\n", | |
| "Plotly.plot2D{\n", | |
| " trace{\n", | |
| " x.numbers = seeds.map{ seed -> simulate(RandomIssueGenerator(seed, workers), TakeOldest, days = days).computeLoss()}\n", | |
| " name = \"oldest\"\n", | |
| " type = TraceType.histogram\n", | |
| " }\n", | |
| " trace{\n", | |
| " x.numbers = seeds.map{ seed -> simulate(RandomIssueGenerator(seed, workers), TakeRandom(seed), days = days).computeLoss()}\n", | |
| " name = \"random\"\n", | |
| " type = TraceType.histogram\n", | |
| " }\n", | |
| " trace{\n", | |
| " x.numbers = seeds.map{ seed -> simulate(RandomIssueGenerator(seed, workers), TakeCritical, days = days).computeLoss()}\n", | |
| " name = \"critical\"\n", | |
| " type = TraceType.histogram\n", | |
| " }\n", | |
| " layout{\n", | |
| " title = \"Loss distribtution\"\n", | |
| " xaxis {\n", | |
| " title = \"Loss\"\n", | |
| " }\n", | |
| " }\n", | |
| "}" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": null, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": null, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [] | |
| } | |
| ], | |
| "metadata": { | |
| "kernelspec": { | |
| "display_name": "Kotlin", | |
| "language": "kotlin", | |
| "name": "kotlin" | |
| }, | |
| "language_info": { | |
| "codemirror_mode": "text/x-kotlin", | |
| "file_extension": ".kt", | |
| "mimetype": "text/x-kotlin", | |
| "name": "kotlin", | |
| "pygments_lexer": "kotlin", | |
| "version": "1.4.20-dev-1121" | |
| } | |
| }, | |
| "nbformat": 4, | |
| "nbformat_minor": 4 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "imports": [ | |
| "scientifik.plotly.*", | |
| "scientifik.plotly.models.*", | |
| "hep.dataforge.meta.*" | |
| ], | |
| "repositories": [ | |
| "https://dl.bintray.com/mipt-npm/dataforge", | |
| "https://dl.bintray.com/mipt-npm/scientifik", | |
| "https://dl.bintray.com/mipt-npm/dev" | |
| ], | |
| "renderers": { | |
| "scientifik.plotly.Plot2D": "HTML($it.toHTML(config = PlotlyConfig{responsive = true}), true)" | |
| }, | |
| "link": "https://github.com/mipt-npm/plotly.kt", | |
| "properties": { | |
| "v": "0.2.0-dev-7" | |
| }, | |
| "dependencies": [ | |
| "scientifik:plotlykt-server:$v" | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
plotly.jsonshould be put into~/.jupyter_kotlin/libraries/