1
Fork 0
mirror of https://github.com/Steffo99/unisteffo.git synced 2024-11-23 00:14:21 +00:00
triennale-appunti-steffo/docs/route-ottimizzazioneLineare.chunk.9e341.js.map
2020-05-24 00:54:19 +02:00

1 line
No EOL
25 KiB
Text
Generated

{"version":3,"sources":["webpack:///./routes/ottimizzazioneLineare.js","webpack:///./components/old/todo.css","webpack:///./components/old/plus.css","webpack:///./components/old/timer.js","webpack:///./components/old/timer.less","webpack:///./components/Latex.js","webpack:///./components/old/minus.js","webpack:///./components/old/plus.js","webpack:///./components/old/todo.js","webpack:///./components/old/minus.css","webpack:///./components/Latex.css","webpack:///./contexts/LatexDefaultInline.js","webpack:///./components/Image.js"],"names":["r","String","raw","OttimizzazioneLineare","render","title","href","to","class","src","Component","module","exports","Timer","state","Date","now","timer","componentDidMount","this","setInterval","setState","componentWillUnmount","clearInterval","dateTo","className","style","parts","milliseconds","seconds","minutes","hours","days","props","timeLeft","Math","floor","expired","unknown","count","text","remaining","renderColor","useContext","LatexRenderColor","defaultInline","LatexDefaultInline","undefined","inline","children","alt","latex","Minus","minus","Plus","plus","Todo","todo","createContext","target"],"mappings":"47FAYMA,EAAIC,OAAOC,IAEIC,E,gLACjBC,OAAA,WACI,OACI,aACI,6CACA,EAAC,IAAD,CAAOC,MAAO,WACV,EAAC,IAAD,CAAOA,MAAO,2BACV,wFAGA,WACI,WAAG,OAAGC,KAAM,4EAAT,4BAGX,EAAC,IAAD,CAAOD,MAAO,oBACV,YACI,YAAI,EAAC,IAAD,CAAOE,GAAI,gBACf,YAAI,EAAC,IAAD,CAAOA,GAAI,gBACf,YAAI,EAAC,IAAD,CAAOA,GAAI,mBAI3B,EAAC,IAAD,CAAOF,MAAO,WACV,EAAC,IAAD,CAAOA,MAAO,sBACV,+EAGA,WACI,EAAC,IAAD,KAAQL,EAAR,QAGR,EAAC,IAAD,CAAOK,MAAO,aACV,oGAGA,WACI,EAAC,IAAD,KAAQL,EAAR,OAEJ,WACI,EAAC,IAAD,KAAQA,EA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AAQlC,KAAKc,MAAMgB,W,aAFZvC,a,kICAd4C,E,gLACpBlD,OAAA,WACC,OAAO,UAAMI,MAAOkB,IAAM6B,MAAOpC,KAAKc,MAAMgB,W,aAFZvC,a,kICAb8C,E,gLACpBpD,OAAA,WACC,OAAO,UAAMI,MAAOkB,IAAM+B,MAAOtC,KAAKc,MAAMgB,W,aAFZvC,a,yCCFlCC,EAAOC,QAAU,CAAC,MAAQ,iB,iBCA1BD,EAAOC,QAAU,CAAC,MAAQ,iB,kCCD1B,gBAEe8C,6BAAc,I,mCCF7B,YAAe,aAASzB,GACpB,OACI,OAAG3B,KAAM2B,EAAMxB,IAAKJ,MAAO4B,EAAMiB,IAAKS,OAAQ,UAAU,SAAKlD,IAAKwB,EAAMxB,IAAKyC,IAAKjB,EAAMiB,U","file":"route-ottimizzazioneLineare.chunk.9e341.js","sourcesContent":["import {Component} from 'preact'\nimport Split from \"../components/old/split\";\nimport Latex from \"../components/Latex\";\nimport Panel from \"../components/old/panel\";\nimport Example from \"../components/example\";\nimport Todo from \"../components/old/todo\";\nimport Minus from \"../components/old/minus\";\nimport Plus from \"../components/old/plus\";\nimport Code from \"../components/old/code\";\nimport Timer from \"../components/old/timer\";\nimport Image from \"../components/Image\";\n\nconst r = String.raw;\n\nexport default class OttimizzazioneLineare extends Component {\n render() {\n return (\n <div>\n <h1>Ottimizzazione lineare intera</h1>\n <Split title={\"Unimore\"}>\n <Panel title={\"Videolezioni su YouTube\"}>\n <p>\n Ho rimosso il rumore in sottofondo da tutti i video di Ricerca Operativa!\n </p>\n <p>\n <b><a href={\"https://www.youtube.com/playlist?list=PLh93e8qjTszffkHNn-19CqUOhHFbhBlBh\"}>Guardate i video qui!</a></b>\n </p>\n </Panel>\n <Panel title={\"Prossimi appelli\"}>\n <ol>\n <li><Timer to={\"2020-06-08\"}/></li>\n <li><Timer to={\"2020-06-25\"}/></li>\n <li><Timer to={\"2020-07-14\"}/></li>\n </ol>\n </Panel>\n </Split>\n <Split title={\"Le basi\"}>\n <Panel title={\"Funzione obiettivo\"}>\n <p>\n La funzione obiettivo è la funzione con valore noto sconosciuto:\n </p>\n <p>\n <Latex>{r`z = C_1 \\cdot x_1 + C_2 \\cdot x_2 + C_n \\cdot x_n`}</Latex>\n </p>\n </Panel>\n <Panel title={\"Gradiente\"}>\n <p>\n Funzione della funzione obiettivo che indica la direzione del suo aumento più veloce.\n </p>\n <p>\n <Latex>{r`\\nabla f = \\frac{\\delta f}{\\delta x_1} e_1 + \\frac{\\delta f}{\\delta x_2} e_2 + \\frac{\\delta f}{\\delta x_n} e_n`}</Latex>\n </p>\n <p>\n <Latex>{r`e_i`}</Latex> è la direzione della coordinata i-esima.\n </p>\n <Example>\n Se <Latex>{r`n = 3`}</Latex>, allora:\n <ul>\n <li><Latex>{r`e_1 = (1, 0, 0)`}</Latex></li>\n <li><Latex>{r`e_2 = (0, 1, 0)`}</Latex></li>\n <li><Latex>{r`e_3 = (0, 0, 1)`}</Latex></li>\n </ul>\n </Example>\n <Example>\n Se la funzione obiettivo è <Latex>z = 2w + 3x + 4y</Latex>, il suo gradiente è <Latex>{r`\\nabla z = (2, 3, 4)`}</Latex>.\n </Example>\n </Panel>\n </Split>\n <Split title={\"Forme di un sistema\"}>\n <Panel title={\"Forma standard\"}>\n <ul>\n <li><Minus>Solo equazioni</Minus></li>\n <li><Minus>Tutte le variabili maggiori di zero</Minus></li>\n </ul>\n </Panel>\n <Panel title={\"Forma canonica\"}>\n <ul>\n <li><Plus>Equazioni e disequazioni</Plus></li>\n <li><Minus>Tutte le variabili maggiori di zero</Minus></li>\n </ul>\n </Panel>\n <Panel title={\"Forma generale\"}>\n <ul>\n <li><Plus>Equazioni e disequazioni</Plus></li>\n <li><Plus>Variabili con qualsiasi valore</Plus></li>\n </ul>\n </Panel>\n </Split>\n <Split title={\"Equivalenza di forma\"}>\n <Panel title={\"Da standard a generale\"}>\n <p>\n Convertiamo ogni equazione <Latex>{r`=`}</Latex> in due disequazioni <Latex>{r`\\leq`}</Latex> e <Latex>{r`\\geq`}</Latex>,\n </p>\n <Example>Why would you ever do that?!</Example>\n </Panel>\n <Panel title={\"Da canonica a standard\"}>\n <p>\n Convertiamo le disequazioni in equazioni aggiungendo una variabile slack.\n </p>\n <Example>\n <Latex>{r`a \\leq 3`}</Latex> diventa <Latex>{r`a + s_1 = 3`}</Latex>.\n </Example>\n </Panel>\n <Panel title={\"Da generale a canonica\"}>\n <p>\n Sostituiamo le variabili potenzialmente negative (unconstrained) <Latex>{r`x_j`}</Latex> con due variabili <Latex>{r`x_j^+`}</Latex> e <Latex>{r`x_j^-`}</Latex>.\n </p>\n <Example>\n <Latex>{r`a \\in \\mathbb{Z}`}</Latex> diventa <Latex>{r`a^+ \\in \\mathbb{N}`}</Latex> e <Latex>{r`-a^- \\in \\mathbb{N}`}</Latex>.\n </Example>\n </Panel>\n </Split>\n <Split title={\"La forma standard\"}>\n <Panel title={\"Funzione obiettivo\"}>\n <p>\n La funzione da minimizzare/massimizzare, tipicamente indicata con una <Latex>{r`z`}</Latex> al termine noto.\n </p>\n </Panel>\n <Panel title={\"Tableu\"}>\n <p>\n Un modo per rappresentare sistemi in forma standard, anche noto come <b>matrice equivalente completa</b> del sistema.\n </p>\n <Example>\n Il sistema:<br/><br/>\n <Latex>{r`\n \\begin{cases}\n 2000A + 1000B = z\\\\\n 1A \\leq 3\\\\\n 1B \\leq 3\\\\\n 2A + 2B \\leq 7\n \\end{cases}\n `}</Latex><br/><br/>\n Diventa in forma di tableau:<br/><br/>\n <table class={\"right\"}>\n <thead>\n <tr>\n <th><abbr title={\"Termine noto\"}>TN</abbr></th>\n <th><Latex>x_1</Latex></th>\n <th><Latex>x_2</Latex></th>\n <th><Latex>s_1</Latex></th>\n <th><Latex>s_2</Latex></th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><Latex>z</Latex></td>\n <td><Latex>2000</Latex></td>\n <td><Latex>1000</Latex></td>\n <td><Latex>0</Latex></td>\n <td><Latex>0</Latex></td>\n </tr>\n <tr>\n <td><Latex>3</Latex></td>\n <td><Latex>1</Latex></td>\n <td><Latex>0</Latex></td>\n <td><Latex>1</Latex></td>\n <td><Latex>0</Latex></td>\n </tr>\n <tr>\n <td><Latex>3</Latex></td>\n <td><Latex>0</Latex></td>\n <td><Latex>1</Latex></td>\n <td><Latex>0</Latex></td>\n <td><Latex>1</Latex></td>\n </tr>\n <tr>\n <td><Latex>7</Latex></td>\n <td><Latex>2</Latex></td>\n <td><Latex>2</Latex></td>\n <td><Latex>0</Latex></td>\n <td><Latex>0</Latex></td>\n </tr>\n </tbody>\n </table>\n </Example>\n </Panel>\n <Panel title={\"Variabili di base\"}>\n <p>\n Variabili che hanno tutti 0 e un 1 nella loro colonna del tableu.\n </p>\n <p>\n La loro controparte sono le <i>variabili fuori base</i>.\n </p>\n <p>\n Un sistema lineare è risolto quando tutte le variabili originali (<Latex>x_n</Latex>) sono nella base.\n </p>\n </Panel>\n </Split>\n <Split title={\"Simplex\"}>\n <Panel title={\"Cos'è?\"}>\n <p>\n Un algoritmo per massimizzare efficientemente variabili di sistemi lineari, derivato da Gauss-Jordan.\n </p>\n <Example>\n E' spiegato semplicemente <a href={\"https://web.archive.org/web/20200523052252/https://www.cs.cmu.edu/~15451-f17/handouts/simplex.pdf\"}>qui</a>.\n </Example>\n </Panel>\n <Panel title={\"I passi\"}>\n <ol>\n <li>Trasforma il sistema in <b>forma standard</b>.</li>\n <li>Finchè ci sono variabili con coefficienti positivi nella funzione obiettivo:\n <ol>\n <li><b>Scegli</b> una variabile della funzione obiettivo, chiamandola <i>variabile entrante</i>. <Example>Come? Vedi nel prossimo pannello.</Example></li>\n <li>Trova la variabile di base (detta <i>variabile uscente</i>) con il <b>valore minore</b> per il rapporto <Latex>{r`\\frac{termine\\ noto}{coeff.\\ variabile\\ entrante}`}</Latex></li>\n <li><b>Riscrivi</b> tutte le funzioni del sistema in termini della variabile entrante.</li>\n </ol>\n </li>\n <li>Il <b>termine noto</b> della funzione obiettivo è il tuo risultato.</li>\n </ol>\n </Panel>\n <Panel title={\"Sotto forma di tableau\"}>\n <p>\n Se il problema è rappresentato in forma di tableau, allora esso è risolvibile applicando l'algoritmo di Gauss-Jordan, in aggiunta tenendo conto delle regole per la selezione delle variabili entranti e uscenti.\n </p>\n </Panel>\n <Panel title={\"Criteri per la variabile entrante\"}>\n <ul>\n <li>Coefficiente maggiore nella funzione obiettivo.</li>\n <li>Incremento maggiore della funzione obiettivo.</li>\n <li>A caso.</li>\n <li><i>Regola di Bland</i>: scegli variabili entranti e uscenti con indice minore (ovvero, prendi le prime possibili). <Example>È usato nella teoria perchè impedisce i cicli infiniti!</Example></li>\n </ul>\n </Panel>\n <Panel title={\"Esempio\"}>\n <Example>\n Ho risolto il problema 3 del file <a href={\"https://dolly.fim.unimore.it/2019/mod/resource/view.php?id=2716\"}><code>Ex_LP_testo</code></a> con il Simplex:\n <p>\n <Image src={\"https://i.imgur.com/1r405Mb.jpg\"}/>\n </p>\n </Example>\n </Panel>\n </Split>\n <Split title={\"Metodo delle due fasi\"}>\n <Panel title={\"Metodo delle due fasi\"}>\n <p>\n Un estensione del Simplex per permettere la risoluzione di problemi con termini noti negativi.\n </p>\n <p>\n Prevede l'introduzione di un <b>problema ausiliario</b>.\n </p>\n </Panel>\n </Split>\n </div>\n )\n }\n}\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"todo\":\"todo__1UVRh\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"plus\":\"plus__2u13i\"};","import {Component} from 'preact'\nimport style from \"./timer.less\"\n\n\nexport default class Timer extends Component {\n constructor() {\n super();\n this.state = {\n \"now\": Date.now()\n };\n this.timer = null;\n }\n\n componentDidMount() {\n this.timer = setInterval(() => {\n this.setState({\"now\": Date.now()})\n }, 1000)\n }\n\n componentWillUnmount() {\n if(this.timer !== null) {\n clearInterval(this.timer)\n }\n }\n\n render() {\n let dateTo = \"Unknown date\";\n let className = style.timer;\n\n let parts = {\n milliseconds: \"?\",\n seconds: \"?\",\n minutes: \"?\",\n hours: \"?\",\n days: \"?\",\n };\n\n if(this.props.to) {\n dateTo = new Date(this.props.to);\n let timeLeft = dateTo - this.state.now;\n\n if(timeLeft > 0) {\n parts = {\n milliseconds: timeLeft % 1000,\n seconds: Math.floor(timeLeft / 1000) % 60,\n minutes: Math.floor(timeLeft / 60000) % 60,\n hours: Math.floor(timeLeft / 3600000) % 24,\n days: Math.floor(timeLeft / 86400000),\n };\n }\n\n else {\n parts = {\n milliseconds: 0,\n seconds: 0,\n minutes: 0,\n hours: 0,\n days: 0,\n };\n\n className += \" \" + style.expired;\n }\n }\n else {\n className += \" \" + style.unknown;\n }\n\n return (\n <div class={className} title={dateTo}>\n <div class={style.days + \" \" + style.count}>\n {parts.days}\n </div>\n <div className={style.days + \" \" + style.text}>\n giorni\n </div>\n <div class={style.hours + \" \" + style.count}>\n {parts.hours}\n </div>\n <div className={style.hours + \" \" + style.text}>\n ore\n </div>\n <div class={style.minutes + \" \" + style.count}>\n {parts.minutes}\n </div>\n <div className={style.minutes + \" \" + style.text}>\n minuti\n </div>\n <div class={style.seconds + \" \" + style.count}>\n {parts.seconds}\n </div>\n <div class={style.seconds + \" \" + style.text}>\n secondi\n </div>\n <div class={style.remaining}>\n rimasti\n </div>\n </div>\n )\n }\n}\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"timer\":\"timer__K0K_h\",\"days\":\"days__vN3tf\",\"hours\":\"hours__3v0KX\",\"minutes\":\"minutes__vkYk7\",\"seconds\":\"seconds__3gJ99\",\"count\":\"count__1VV4k\",\"text\":\"text__khS4i\",\"remaining\":\"remaining__zUECg\",\"unknown\":\"unknown__af307\",\"expired\":\"expired__1rtHB\"};","import style from './Latex.css';\nimport {useContext} from \"preact/hooks\";\nimport LatexRenderColor from \"../contexts/LatexRenderColor\";\nimport LatexDefaultInline from \"../contexts/LatexDefaultInline\";\n\nexport default function(props) {\n\t// black, blue, brown, cyan, darkgray, gray, green, lightgray, lime, magenta, olive, orange, pink, purple, red, teal, violet, white, yellow\n\tlet renderColor = useContext(LatexRenderColor);\n\tlet defaultInline = useContext(LatexDefaultInline);\n\n\tlet is_inline;\n\tif(props.inline === undefined) {\n\t\tis_inline = defaultInline;\n\t}\n\telse {\n\t\tis_inline = props.inline;\n\t}\n\n\tlet inline = is_inline ? `\\\\inline` : \"\";\n\tlet equation = `${inline} {\\\\color{${renderColor}} ${props.children} }`;\n\n\treturn (\n\t\t<img src={`https://latex.codecogs.com/svg.latex?${equation}`}\n\t\t\t alt={props.children}\n\t\t\t title={props.children}\n\t\t\t class={style.latex}\n\t\t/>\n\t);\n}\n","import style from \"./minus.css\";\nimport { Component } from 'preact';\n\nexport default class Minus extends Component {\n\trender() {\n\t\treturn <span class={style.minus}>{this.props.children}</span>;\n\t}\n}\n","import style from \"./plus.css\";\nimport { Component } from 'preact';\n\nexport default class Plus extends Component {\n\trender() {\n\t\treturn <span class={style.plus}>{this.props.children}</span>;\n\t}\n}\n","import style from \"./todo.css\";\nimport { Component } from 'preact';\n\nexport default class Todo extends Component {\n\trender() {\n\t\treturn <span class={style.todo}>{this.props.children}</span>;\n\t}\n}\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"minus\":\"minus__2EaF0\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"latex\":\"latex__3zlIu\"};","import {createContext} from \"preact\";\r\n\r\nexport default createContext(true);\r\n","export default function(props) {\r\n return (\r\n <a href={props.src} title={props.alt} target={\"_blank\"}><img src={props.src} alt={props.alt}/></a>\r\n )\r\n}\r\n"],"sourceRoot":""}