(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 8.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 157, 7] NotebookDataLength[ 981231, 21445] NotebookOptionsPosition[ 808060, 17409] NotebookOutlinePosition[ 956220, 20642] CellTagsIndexPosition[ 955708, 20625] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[TextData[StyleBox["Dynamo 4S (v. 1.3)\nDiagrams for Evolutionary Game \ Dynamics", FontFamily->"Palatino"]], "Title", CellChangeTimes->{{3.511176603344358*^9, 3.511176655163392*^9}, 3.511176733945574*^9, {3.523732762536275*^9, 3.523732762664701*^9}, 3.557826538540789*^9, 3.562355484500728*^9, 3.580469683035265*^9, 3.582114035955565*^9, 3.582291377721766*^9}, TextAlignment->Center, FontSize->32, FontColor->GrayLevel[1], Background->RGBColor[0.4088197146562905, 0.7171587701228351, 1.], CellTags->"opengroup"], Cell[CellGroupData[{ Cell["\<\ When you have finished specifying parameters, click on the rightmost vertical \ bar and press Enter (or Shift-Enter) to run the program.\ \>", "Text", Evaluatable->False, FontFamily->"Palatino", FontSize->14], Cell[BoxData[{ RowBox[{ RowBox[{"avoiderroronremove", "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Unprotect", "[", "Xt", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Remove", "[", "\"\\"", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", " ", "\"\\"", ",", " ", "All", ",", " ", "CellTags", ",", " ", RowBox[{"AutoScroll", " ", "->", " ", "False"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"FrontEndExecute", "[", RowBox[{"FrontEndToken", "[", "\"\\"", "]"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", " ", "\"\\"", ",", " ", "All", ",", " ", "CellTags", ",", " ", RowBox[{"AutoScroll", " ", "->", " ", "False"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"FrontEndExecute", "[", RowBox[{"FrontEndToken", "[", "\"\\"", "]"}], "]"}], ";"}]}], "Input", CellOpen->False, CellChangeTimes->{ 3.4883772540497675`*^9, {3.4883773166698103`*^9, 3.4883773200546775`*^9}, { 3.4883775117534704`*^9, 3.488377528692562*^9}, 3.4883776090481634`*^9, { 3.488377972862069*^9, 3.4883780643035555`*^9}, {3.488378297794034*^9, 3.488378299646698*^9}, 3.488378823900538*^9, 3.488385795853469*^9, { 3.4883859813501997`*^9, 3.4883860020099072`*^9}, {3.4883860528430014`*^9, 3.4883860905972896`*^9}, 3.488416188408044*^9, {3.58048713342305*^9, 3.580487137997472*^9}}, CellTags->"notopen"], Cell[BoxData[{ RowBox[{ RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", " ", "\"\\"", ",", " ", "All", ",", " ", "CellTags", ",", " ", RowBox[{"AutoScroll", " ", "->", " ", "False"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"FrontEndExecute", "[", RowBox[{"FrontEndToken", "[", "\"\\"", "]"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Off", "[", RowBox[{"General", "::", "spell1"}], "]"}], ";"}]}], "Input", CellOpen->False, CellChangeTimes->{ 3.4883772540497675`*^9, {3.4883773166698103`*^9, 3.4883773200546775`*^9}, { 3.4883775117534704`*^9, 3.488377528692562*^9}, 3.4883776090481634`*^9, { 3.488377972862069*^9, 3.4883780643035555`*^9}, {3.488378297794034*^9, 3.488378299646698*^9}, 3.488378823900538*^9, 3.488385795853469*^9, { 3.4883859813501997`*^9, 3.4883860020099072`*^9}, {3.4883860528430014`*^9, 3.4883860905972896`*^9}, 3.488416188408044*^9}, CellTags->"notopen"] }, Closed]], Cell[CellGroupData[{ Cell["User-defined Parameters", "Subtitle", CellDingbat->None, CellChangeTimes->{{3.5406674114052305`*^9, 3.540667411627243*^9}}, CellTags->{"corecell", "opengroup"}], Cell[CellGroupData[{ Cell[TextData[StyleBox["Choice of game", "Section"]], "Section", Evaluatable->False, CellChangeTimes->{{3.4749174046079693`*^9, 3.4749174059098415`*^9}}, ImageRegion->{{0, 1}, {0, 1}}, CellTags->{"corecell", "opengroup"}], Cell[CellGroupData[{ Cell["Functional form", "Subsection", CellChangeTimes->{ 3.4816700476457615`*^9, {3.4818116260860605`*^9, 3.481811629100395*^9}, 3.51006963366746*^9}, CellTags->"corecell"], Cell[TextData[{ StyleBox["Select the Functional form of the game. To choose a nonlinear gam", Evaluatable->True], "e, you must define ", StyleBox["F[x_]", FontWeight->"Bold"], " accordingly. In doing so, the components of x should be entered as \ x[[1]], x[[2]], x[[3]] and x[[4]]. To help with the structure of the \ definition general presets are built in the buttons below. By hitting the \ congestion or quadratic buttons the structure appears after \"F[x_]:=\" \ below. The default value of F[x_] is A.x, the payoff vector field for the \ normal form game with payoff matrix A." }], "Text", Evaluatable->False, CellChangeTimes->{{3.481416137684971*^9, 3.481416148370336*^9}, { 3.481416185764106*^9, 3.481416344882907*^9}, 3.481416391519968*^9, { 3.481815812928955*^9, 3.481815825497027*^9}, {3.481815888277301*^9, 3.4818160139780493`*^9}, {3.4818888098052845`*^9, 3.481888810716595*^9}, 3.481894204638324*^9, 3.488628426477378*^9, {3.5130191827495327`*^9, 3.513019183580728*^9}, 3.5212850123925147`*^9, {3.580469725628174*^9, 3.58046973192781*^9}, {3.580469795806739*^9, 3.58046980065595*^9}, 3.580470250720288*^9}, ImageRegion->{{0, 1}, {0, 1}}, FontFamily->"Palatino", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"matrixButtons", "[", "rowsize_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "namesl", ",", "textsl", ",", "names", " ", ",", "texts", ",", "buttons", ",", "row", ",", "butrow", ",", "rown", ",", "rowt", ",", "name", ",", "text", ",", "but", ",", "button"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"namesl", " ", "=", " ", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"textsl", " ", "=", " ", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"names", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"texts", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"rown", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"rowt", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"row", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{"row", "<=", RowBox[{ RowBox[{"Dimensions", "[", "namesl", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"rown", "=", RowBox[{"Join", "[", RowBox[{"rown", ",", RowBox[{"{", RowBox[{"namesl", "[", RowBox[{"[", "row", "]"}], "]"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"rowt", "=", RowBox[{"Join", "[", RowBox[{"rowt", ",", RowBox[{"{", RowBox[{"textsl", "[", RowBox[{"[", "row", "]"}], "]"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"Or", "[", RowBox[{ RowBox[{"IntegerQ", "[", RowBox[{"row", "/", "rowsize"}], "]"}], ",", RowBox[{"row", "==", RowBox[{ RowBox[{"Dimensions", "[", "namesl", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"names", "=", RowBox[{"Join", "[", RowBox[{"names", ",", RowBox[{"{", "rown", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"texts", "=", RowBox[{"Join", "[", RowBox[{"texts", ",", RowBox[{"{", "rowt", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"rown", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"rowt", "=", RowBox[{"{", "}"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"row", "++"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"buttons", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"row", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{"row", "<=", RowBox[{ RowBox[{"Dimensions", "[", "names", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"butrow", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"but", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", " ", RowBox[{ RowBox[{"but", "<=", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"names", "[", RowBox[{"[", "row", "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"button", ":=", "\[IndentingNewLine]", RowBox[{"Button", "[", RowBox[{ RowBox[{"Column", "[", RowBox[{ RowBox[{"{", "name", "}"}], ",", RowBox[{"Alignment", "\[Rule]", RowBox[{"{", "Center", "}"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{ "NotebookLocate", "[", "\"\\"", "]"}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", "\"\\"", ",", "Next", ",", "CellTags", ",", RowBox[{"AutoScroll", "->", "False"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"SelectionMove", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", "All", ",", "CellContents", ",", RowBox[{"AutoScroll", "->", "False"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"NotebookWrite", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", RowBox[{"RowBox", "[", RowBox[{"{", "text", "}"}], "]"}], ",", RowBox[{"AutoScroll", "->", "False"}]}], "]"}], ";"}]}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{",", RowBox[{"ImageSize", "\[Rule]", RowBox[{"{", RowBox[{"120", ",", "30"}], "}"}]}]}], "*)"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"button", "=", RowBox[{ RowBox[{ RowBox[{"Style", "[", RowBox[{"button", ",", RowBox[{ "ControlsRendering", "\[Rule]", "\"\\""}]}], "]"}], " ", "/.", RowBox[{"text", "->", RowBox[{ RowBox[{"texts", "[", RowBox[{"[", "row", "]"}], "]"}], "[", RowBox[{"[", "but", "]"}], "]"}]}]}], "/.", RowBox[{"name", "->", RowBox[{ RowBox[{"names", "[", RowBox[{"[", "row", "]"}], "]"}], "[", RowBox[{"[", "but", "]"}], "]"}]}]}]}], ";", "\[IndentingNewLine]", RowBox[{"butrow", "=", RowBox[{"Join", "[", RowBox[{"butrow", ",", RowBox[{"{", "button", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"butrow", "=", RowBox[{"Join", "[", RowBox[{"butrow", ",", RowBox[{"{", RowBox[{ RowBox[{"Row", "[", RowBox[{"{", "\"\< \>\"", "}"}], "]"}], ",", "button"}], "}"}]}], "]"}]}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{"but", "++"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"buttons", "=", RowBox[{"Join", "[", RowBox[{"buttons", ",", RowBox[{"{", "butrow", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"row", "++"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"TableForm", " ", "[", " ", RowBox[{"buttons", ",", RowBox[{"TableAlignments", "->", RowBox[{"{", RowBox[{"Left", ",", "Top"}], "}"}]}], ",", RowBox[{"TableSpacing", "\[Rule]", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}]}]}], "]"}]}]}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Column", "[", "buttons", "]"}], "*)"}], "\[IndentingNewLine]", "]"}]}], ";"}], "\n", RowBox[{"matrixButtons", "[", "3", "]"}]}], "Input", Evaluatable->False, CellOpen->False, CellChangeTimes->{{3.4813040162966223`*^9, 3.4813041889350376`*^9}, { 3.481304234246958*^9, 3.481304348854866*^9}, {3.4813044130259194`*^9, 3.4813044667127323`*^9}, {3.481304497212342*^9, 3.481304516258973*^9}, { 3.481304591711132*^9, 3.481304623616974*^9}, {3.481304658444653*^9, 3.481304715787669*^9}, {3.481304754318426*^9, 3.481304856879613*^9}, { 3.481304924394374*^9, 3.481304929097439*^9}, {3.4813049637844944`*^9, 3.481305049955267*^9}, {3.481305109251383*^9, 3.4813052103282137`*^9}, { 3.4813052726867905`*^9, 3.4813054179505563`*^9}, {3.4813054936370873`*^9, 3.481305606760639*^9}, {3.481305668931719*^9, 3.4813057399464345`*^9}, { 3.4813058200547843`*^9, 3.4813059389126377`*^9}, {3.481305992286955*^9, 3.4813059950056696`*^9}, {3.4813060594423447`*^9, 3.4813061026605415`*^9}, {3.4813061575348396`*^9, 3.4813061668159704`*^9}, 3.4813062421118817`*^9, 3.4813062726896152`*^9, {3.481306358922887*^9, 3.481306400750476*^9}, {3.481306526514491*^9, 3.4813065369518576`*^9}, { 3.4813065678420877`*^9, 3.481306572404529*^9}, 3.481306608185321*^9, { 3.4813066523878803`*^9, 3.481306668168928*^9}, {3.481306704777835*^9, 3.4813067154651976`*^9}, 3.481306939040461*^9, {3.4813069856961136`*^9, 3.4813069858836117`*^9}, 3.481307054163987*^9, {3.481307101772753*^9, 3.4813071138350983`*^9}, {3.481307407643838*^9, 3.4813077466394987`*^9}, { 3.4813077909826813`*^9, 3.48130781959169*^9}, {3.4813078599192986`*^9, 3.481307957918044*^9}, {3.481308040010743*^9, 3.481308046416911*^9}, 3.4813080794633636`*^9, 3.4813081524936786`*^9, {3.481308210524186*^9, 3.481308338163177*^9}, 3.4813083718189964`*^9, {3.4813085571447487`*^9, 3.481308586503748*^9}, {3.4813086184408393`*^9, 3.481308738251806*^9}, { 3.481308930858715*^9, 3.4813091517777624`*^9}, {3.4813091950740833`*^9, 3.481309202620862*^9}, {3.4813099727203794`*^9, 3.4813100351414557`*^9}, { 3.4813100751096935`*^9, 3.4813101295777464`*^9}, {3.481310159749235*^9, 3.4813101717647066`*^9}, {3.4813102025768123`*^9, 3.481310210326713*^9}, { 3.4813102772946057`*^9, 3.4813103037630167`*^9}, {3.4813103642778673`*^9, 3.4813104031523695`*^9}, {3.4813110125508194`*^9, 3.48131103905048*^9}, { 3.4813110842686515`*^9, 3.4813111395023193`*^9}, {3.4813117891346292`*^9, 3.481311813509317*^9}, {3.4813118455401573`*^9, 3.481311848555743*^9}, { 3.481311983491516*^9, 3.481311996303852*^9}, {3.481312245331915*^9, 3.481312262878565*^9}, {3.4813124766258287`*^9, 3.4813124780789356`*^9}, { 3.481312562234108*^9, 3.4813125631559715`*^9}, {3.481313376067441*^9, 3.4813133832704735`*^9}, {3.4813140008563185`*^9, 3.4813141425888796`*^9}, {3.481314173932228*^9, 3.4813141780571756`*^9}, { 3.481314220525382*^9, 3.4813142451031923`*^9}, {3.4813143191022453`*^9, 3.481314320055358*^9}, {3.481314353383056*^9, 3.481314360445466*^9}, { 3.4813144028980474`*^9, 3.481314405194893*^9}, {3.4813144915531626`*^9, 3.4813145915675077`*^9}, {3.4813146929724593`*^9, 3.481314706347288*^9}, { 3.4813148354706354`*^9, 3.4813148468611145`*^9}, {3.4813157963547544`*^9, 3.4813158533558493`*^9}, {3.481315901981783*^9, 3.481315960669737*^9}, { 3.481316084544737*^9, 3.481316093107237*^9}, {3.481316151857237*^9, 3.481316184232237*^9}, {3.481316289559544*^9, 3.481316322527872*^9}, { 3.4813163535431004`*^9, 3.481316372355359*^9}, {3.481316418932888*^9, 3.481316420276621*^9}, {3.4813164900569777`*^9, 3.481316570165327*^9}, { 3.48131666333601*^9, 3.481316718241557*^9}, 3.4813167995217667`*^9, { 3.4813168815207167`*^9, 3.4813168975517616`*^9}, {3.4813169714570656`*^9, 3.481316996425496*^9}, {3.4813170544403787`*^9, 3.481317077674456*^9}, { 3.481317108767808*^9, 3.4813171147208567`*^9}, {3.481317148236053*^9, 3.481317162079626*^9}, {3.4813172156883144`*^9, 3.4813172161570587`*^9}, { 3.4813172564065437`*^9, 3.4813172577815256`*^9}, {3.481317415967001*^9, 3.4813174182013474`*^9}, {3.481318095723925*^9, 3.481318181488452*^9}, 3.481318284596507*^9, {3.481318343611377*^9, 3.4813184077043066`*^9}, { 3.481318575702156*^9, 3.481318581561456*^9}, {3.4813186265921297`*^9, 3.4813186395294642`*^9}, {3.481319531174301*^9, 3.4813195706269207`*^9}, { 3.4813301870935183`*^9, 3.481330195575715*^9}, {3.481330234031011*^9, 3.481330240229925*^9}, {3.4813303413653507`*^9, 3.481330348635805*^9}, 3.481381740593504*^9, {3.48138186256188*^9, 3.4813818701868315`*^9}, 3.4814015869376*^9, {3.481405450326758*^9, 3.4814055598442364`*^9}, { 3.4814056617908287`*^9, 3.481405789714774*^9}, {3.4814058901191483`*^9, 3.4814059033681993`*^9}, {3.481405941803467*^9, 3.481405984975545*^9}, { 3.481406077548659*^9, 3.481406079601611*^9}, 3.481406131906822*^9, { 3.4814061894595785`*^9, 3.4814061927543163`*^9}, {3.481406239131003*^9, 3.481406257597556*^9}, {3.481406398980856*^9, 3.481406411659086*^9}, { 3.4814064803979273`*^9, 3.481406480728403*^9}, {3.481406518092129*^9, 3.4814066497113886`*^9}, {3.4814066834098444`*^9, 3.48140673647615*^9}, { 3.481408508784604*^9, 3.4814085588966618`*^9}, {3.481408601387761*^9, 3.481408603090209*^9}, {3.4814086420261965`*^9, 3.4814087494506655`*^9}, { 3.4814087986514125`*^9, 3.481408857345811*^9}, {3.4814089003977165`*^9, 3.4814089629676876`*^9}, 3.4814131600728283`*^9, 3.4814132208702507`*^9, { 3.4814132796547785`*^9, 3.481413291952462*^9}, {3.481413334613806*^9, 3.481413495364955*^9}, {3.4814135595772877`*^9, 3.4814136320014286`*^9}, { 3.4814137487793465`*^9, 3.481413779022835*^9}, {3.481414435946512*^9, 3.481414512348054*^9}, {3.4814148679674177`*^9, 3.48141493700995*^9}, { 3.481415020183816*^9, 3.4814150755877504`*^9}, {3.481415141352315*^9, 3.481415154190776*^9}, {3.4814151844943504`*^9, 3.4814152094502354`*^9}, { 3.481415278549595*^9, 3.4814152928501587`*^9}, {3.481415420553787*^9, 3.4814154999078927`*^9}, {3.481415562497893*^9, 3.481415584309256*^9}, { 3.481415703060011*^9, 3.481415703450573*^9}, 3.4814158990017614`*^9, { 3.4814171364611406`*^9, 3.4814171462952814`*^9}, {3.481424072987533*^9, 3.4814241197147236`*^9}, {3.4814832782005634`*^9, 3.4814832867829046`*^9}, 3.4816703314238143`*^9, {3.481670369408434*^9, 3.4816704575852256`*^9}, { 3.4816706146811185`*^9, 3.4816707845954432`*^9}, {3.4816708405859537`*^9, 3.481670920480837*^9}, {3.4816709715042048`*^9, 3.4816709719949102`*^9}, { 3.4816711094525647`*^9, 3.4816711098431263`*^9}, {3.4816711965377874`*^9, 3.481671238237749*^9}, {3.4816713148579235`*^9, 3.481671340214384*^9}, { 3.4816713745737906`*^9, 3.4816716260353746`*^9}, {3.481671755331293*^9, 3.481671785134147*^9}, {3.4816718832952957`*^9, 3.4816719397865267`*^9}, 3.4816719758984528`*^9, {3.481673176244466*^9, 3.4816732875745506`*^9}, 3.4816733183988733`*^9, {3.481673362101715*^9, 3.4816733707441425`*^9}, 3.481673653340496*^9, {3.4816745940231314`*^9, 3.4816746022149105`*^9}, { 3.4817346006152563`*^9, 3.481734607925768*^9}, {3.481736647042942*^9, 3.481736703093539*^9}, 3.4817375426908207`*^9, {3.4818119966889615`*^9, 3.481812002957976*^9}, {3.481812105737727*^9, 3.481812272981318*^9}, { 3.4818124484235916`*^9, 3.481812457366451*^9}, {3.481812498485577*^9, 3.481812523040886*^9}, {3.4818125683860893`*^9, 3.4818125706493435`*^9}, { 3.481812612139003*^9, 3.481812639708646*^9}, {3.4818128485990157`*^9, 3.481812864662113*^9}, {3.4818129721767116`*^9, 3.4818130553963757`*^9}, { 3.4818132379588876`*^9, 3.4818133245333757`*^9}, {3.481813355407771*^9, 3.4818133663935676`*^9}, 3.4818134196132183`*^9, {3.4818134879827776`*^9, 3.481813489202236*^9}, {3.4818136452104654`*^9, 3.481813661273563*^9}, { 3.4818137634451456`*^9, 3.481813778596933*^9}, {3.4818140028480997`*^9, 3.481814031477353*^9}, {3.481814092975784*^9, 3.4818141259632177`*^9}, { 3.4818141856590557`*^9, 3.4818141929395247`*^9}, {3.4818142536968894`*^9, 3.481814383273211*^9}, {3.4818144211176286`*^9, 3.4818145387768145`*^9}, { 3.4818146624446397`*^9, 3.4818146646778507`*^9}, {3.48181469749504*^9, 3.4818147106439466`*^9}, {3.4818888661262703`*^9, 3.481888873416754*^9}, { 3.481893160246562*^9, 3.481893161117815*^9}, {3.4818932673806133`*^9, 3.481893309060546*^9}, {3.481893407021407*^9, 3.481893454229288*^9}, 3.4818939490808496`*^9, {3.5079816438177133`*^9, 3.507981644418577*^9}, { 3.5079816830090675`*^9, 3.507981699893346*^9}, {3.5079830585369797`*^9, 3.5079830589876275`*^9}, {3.507983372878981*^9, 3.507983373329629*^9}, { 3.5079854894925766`*^9, 3.5079854921514*^9}, {3.507985524718229*^9, 3.507985682595245*^9}, {3.539692463930496*^9, 3.5396924918480587`*^9}, { 3.539692593214583*^9, 3.539692593706407*^9}, {3.5397198530389843`*^9, 3.539719856519926*^9}, {3.56500177685438*^9, 3.565001777448216*^9}, { 3.569266244310647*^9, 3.569266261725143*^9}, {3.569280032875381*^9, 3.569280105706233*^9}, {3.5692801380666*^9, 3.569280250659495*^9}, { 3.569280657752921*^9, 3.56928065965056*^9}, {3.569280753871719*^9, 3.569280797333408*^9}, {3.569670654366118*^9, 3.569670667328805*^9}, { 3.571861959311717*^9, 3.571861961216567*^9}, 3.571862485631228*^9, 3.580648218346193*^9, 3.580648255404313*^9, {3.580648317854068*^9, 3.580648388939804*^9}, {3.580650229858484*^9, 3.58065023473296*^9}, { 3.580650648322659*^9, 3.58065067586012*^9}, {3.580652774830849*^9, 3.580652775725724*^9}, {3.580653852131587*^9, 3.58065385290289*^9}, { 3.580662840171053*^9, 3.580662841798962*^9}, 3.614426702790621*^9, { 3.614428036961805*^9, 3.61442804117262*^9}}, CellTags->{"buttoncell", "corecell", "notopen", "differentacrossnotebooks"}], Cell[BoxData[ TagBox[GridBox[{ { StyleBox[ ButtonBox[ TagBox[GridBox[{ {"\<\"Normal Form/Linear\"\>"} }, GridBoxAlignment->{"Columns" -> {{Center}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"], Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_payofffunction", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"F[x_]:=A.x;\ngamekind=NormalGame;"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False], StyleBox[ ButtonBox[ TagBox[GridBox[{ {"\<\"Quadratic\"\>"} }, GridBoxAlignment->{"Columns" -> {{Center}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"], Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_payofffunction", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"F[x_]:=Table[x.Q[[j]].x,{j,Dimensions[x][[1]]}]+L.x+\ Transpose[B][[1]];\ngamekind=QuadraticGame;"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False], StyleBox[ ButtonBox[ TagBox[GridBox[{ {"\<\"Congestion\"\>"} }, GridBoxAlignment->{"Columns" -> {{Center}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"], Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_payofffunction", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"F[x_]:=Table[-Table[Sum[congestionCost[\[CapitalPhi][p][j][\ [k]]][u[\[CapitalPhi][j][k],x]],{k,Dimensions[\[CapitalPhi][p][j]][[1]]}],{j,\ dim[[p]]}],{p,pop}];\ngamekind=CongestionGame;"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Top}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Function[BoxForm`e$, TableForm[ BoxForm`e$, TableAlignments -> {Left, Top}, TableSpacing -> {1, 1}]]]], "Output", CellOpen->True, CellChangeTimes->{3.614428045460796*^9}, CellTags->{"buttoncell", "corecell", "notopen", "differentacrossnotebooks"}] }, {2}]], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"F", "[", "x_", "]"}], ":=", RowBox[{"A", ".", "x"}]}], ";"}], "\n", RowBox[{ RowBox[{"gamekind", "=", "NormalGame"}], ";"}]}], "Input", CellChangeTimes->{{3.481406901042785*^9, 3.481406903496313*^9}, 3.48141121375416*^9, 3.481411283644657*^9, 3.4814113150498157`*^9, 3.4814114013038425`*^9, {3.4814114367147613`*^9, 3.4814114648952827`*^9}, { 3.4814115342850604`*^9, 3.4814115771667213`*^9}, {3.481411716106507*^9, 3.4814117225557804`*^9}, 3.481411785155795*^9, {3.4814118307914157`*^9, 3.48141185408491*^9}, 3.4814119277007647`*^9, {3.4814158208293552`*^9, 3.4814158268179665`*^9}, {3.48141641760748*^9, 3.4814164204215264`*^9}, { 3.481422160477479*^9, 3.4814221633616257`*^9}, {3.4814831639763174`*^9, 3.4814831655385637`*^9}, {3.4818146408836365`*^9, 3.4818146715877867`*^9}, 3.481818277853342*^9, 3.481888879785912*^9, 3.481894604823762*^9, { 3.4818954094607735`*^9, 3.4818954163506804`*^9}, {3.539692497795765*^9, 3.5396924992956142`*^9}, 3.5396926163873453`*^9, {3.554551373113027*^9, 3.554551394400234*^9}, 3.5575846681359797`*^9, {3.569280273232998*^9, 3.569280366586455*^9}, {3.569280429513154*^9, 3.569280438437691*^9}, { 3.569280818346901*^9, 3.569280825670629*^9}, {3.569411067724975*^9, 3.569411072753472*^9}, {3.569666972487743*^9, 3.569666973277941*^9}, { 3.569670636783333*^9, 3.569670642980488*^9}, {3.569670829858846*^9, 3.569670841413362*^9}, 3.569672755846156*^9, {3.569672799307453*^9, 3.569672804663286*^9}, {3.571861968444797*^9, 3.571861969945713*^9}, { 3.571862489412906*^9, 3.571862503397761*^9}, {3.580470224526356*^9, 3.580470230190245*^9}, {3.580648455062255*^9, 3.580648481847501*^9}, { 3.580650988434879*^9, 3.580650991892552*^9}, {3.580653218250408*^9, 3.580653226357442*^9}, {3.580663092863348*^9, 3.580663095434207*^9}, 3.614426583578159*^9, {3.614426714262326*^9, 3.614426717966827*^9}, { 3.614427788790375*^9, 3.614427815453252*^9}, 3.614428053659881*^9, 3.614428112267831*^9}, CellTags->{"corecell", "unique_payofffunction"}], Cell[CellGroupData[{ Cell[TextData[StyleBox["Payoff-related definitions", FontSlant->"Italic"]], "SmallText", CellTags->"corecell"], Cell[CellGroupData[{ Cell["The multi population payoff", "Subsubsection", CellChangeTimes->{{3.569672869024912*^9, 3.569672871980207*^9}}, CellTags->{"corecell", "differentacrossnotebooks"}], Cell[BoxData[ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"Or", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"gamekind", "==", "NormalGame"}], ",", "\[IndentingNewLine]", RowBox[{"gamekind", "==", "QuadraticGame"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Fmp", "[", "x_", "]"}], ":=", RowBox[{"{", RowBox[{"F", "[", RowBox[{"x", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "}"}]}], ";"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Fmp", "[", "x_", "]"}], ":=", RowBox[{"F", "[", "x", "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]], "Input", CellChangeTimes->{{3.569672332033369*^9, 3.569672375334008*^9}, { 3.569672722192605*^9, 3.569672783584934*^9}, {3.569746199920973*^9, 3.569746286903942*^9}, 3.580651245522876*^9}, CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[CellGroupData[{ Cell["The population's average payoff", "Subsubsection", CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"Fbar", "[", RowBox[{"x_", ",", "F_"}], "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], " ", RowBox[{ RowBox[{"F", "[", "x", "]"}], "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], " ", ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{ 3.4928186346660337`*^9, {3.5079830590026493`*^9, 3.5079830590176706`*^9}, { 3.5079833733596725`*^9, 3.507983373374694*^9}, {3.5079857066448264`*^9, 3.507985711947451*^9}, {3.5130192630850496`*^9, 3.5130192769249506`*^9}, { 3.569256279151948*^9, 3.569256301093805*^9}, {3.569280862449428*^9, 3.569280879492904*^9}, {3.569751811772345*^9, 3.569751812525134*^9}}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Excess payoff vector", "Subsubsection", CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"Fhat", "[", RowBox[{"x_", ",", "F_"}], "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"F", "[", "x", "]"}], "[", RowBox[{"[", "p", "]"}], "]"}], " ", "-", " ", RowBox[{ RowBox[{"Fbar", "[", RowBox[{"x", ",", "F"}], "]"}], "[", RowBox[{"[", "p", "]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.5130192670407376`*^9, 3.513019275382733*^9}, { 3.569256440317245*^9, 3.569256489508461*^9}}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Vector of positive parts of excess payoffs", "Subsubsection", CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"Fhatplus", "[", RowBox[{"x_", ",", "F_"}], "]"}], ":=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"Max", "[", RowBox[{"0", ",", RowBox[{ RowBox[{"Fhat", "[", RowBox[{"x", ",", "F"}], "]"}], "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ",", " ", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.4928186554258847`*^9, 3.4928186955636*^9}, 3.5079830590326924`*^9, 3.5079833734047375`*^9, {3.569256479840192*^9, 3.569256504533733*^9}, {3.571823388323414*^9, 3.571823389596136*^9}}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Projected payoff vector", "Subsubsection", CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"PhiF", "[", RowBox[{"x_", ",", "F_"}], "]"}], ":=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"projectionMatrix", "[", RowBox[{"{", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}], "}"}], "]"}], ".", RowBox[{ RowBox[{"F", "[", "x", "]"}], "[", RowBox[{"[", "p", "]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.4923823666875*^9, 3.49238242565625*^9}, { 3.492382666359375*^9, 3.492382796125*^9}, {3.49238283375*^9, 3.492382916234375*^9}, {3.492382972734375*^9, 3.492383074765625*^9}, { 3.492383106296875*^9, 3.49238313746875*^9}, {3.5079817044599123`*^9, 3.5079817047603445`*^9}, {3.515956822883526*^9, 3.5159568282968354`*^9}, { 3.569405579312506*^9, 3.569405622074248*^9}, 3.569405690461629*^9, { 3.569411273367159*^9, 3.569411324126257*^9}}, CellTags->"corecell"] }, Closed]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Specification of payoff parameters", "Subsection", CellChangeTimes->{ 3.4816700476457615`*^9, {3.4818116260860605`*^9, 3.481811629100395*^9}, { 3.4818152985993853`*^9, 3.481815299991387*^9}, {3.481816053845376*^9, 3.4818160546865854`*^9}, {3.4818162696456814`*^9, 3.4818162731507215`*^9}, {3.481891966159549*^9, 3.4818919684127893`*^9}}, CellTags->{"corecell", "opengroup"}], Cell[CellGroupData[{ Cell["Specification of Normal Form Game", "Subsubsection", CellChangeTimes->{ 3.4816700476457615`*^9, {3.4818116260860605`*^9, 3.481811629100395*^9}, { 3.4818152985993853`*^9, 3.481815299991387*^9}, {3.481816053845376*^9, 3.4818160546865854`*^9}, {3.4818162696456814`*^9, 3.4818162731507215`*^9}}, CellTags->{"corecell", "opengroup"}], Cell[TextData[{ "Choose a normal form game here by editing the payoff matrix below. To use \ one of the built-in payoff matrices, click the corresponding button and the \ expression below where \"", StyleBox["A", FontWeight->"Bold"], " = .\" appears will be updated." }], "Text", Evaluatable->False, CellChangeTimes->{{3.4814160902467585`*^9, 3.481416118357179*^9}, 3.4818153754699197`*^9, {3.4818154184817677`*^9, 3.481815456005725*^9}, { 3.539882179983562*^9, 3.5398821806825047`*^9}}, ImageRegion->{{0, 1}, {0, 1}}, FontFamily->"Palatino", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[CellGroupData[{ Cell[TextData[StyleBox["Some standard normal form games", FontSlant->"Italic"]], "SmallText", CellChangeTimes->{{3.481815336003169*^9, 3.48181536170012*^9}}, CellTags->{"corecell", "opengroup"}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"matrixButtons", "[", "rowsize_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "namesl", ",", "matsl", ",", "names", " ", ",", "mats", ",", "buttons", ",", "row", ",", "butrow", ",", "rown", ",", "rowm", ",", "name", ",", "mat", ",", "but", ",", "button"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"namesl", " ", "=", " ", RowBox[{"{", RowBox[{ "\"\\"", ",", " ", "\"\\"", ",", "\"\\"", " ", ",", "\"\\"", ",", " ", "\"\\""}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"matsl", " ", "=", " ", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", "1"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"1", ",", " ", "0", ",", " ", "0", ",", "0"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"0", ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "1", ",", "0"}], "}"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", " ", "0", ",", " ", "0", ",", "0"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"0", ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0", ",", "1"}], "}"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", " ", RowBox[{"-", "1"}], ",", " ", "1", ",", "1"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"1", ",", "0", ",", RowBox[{"-", "1"}], ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1", ",", "0", ",", "0"}], "}"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", " ", "0", ",", " ", RowBox[{"-", "1"}], ",", ".1"}], "}"}], ",", " ", RowBox[{"{", RowBox[{".1", ",", "0", ",", "0", ",", RowBox[{"-", "1"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", ".1", ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", RowBox[{"-", "1"}], ",", ".1", ",", "0"}], "}"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", " ", RowBox[{"-", "12"}], ",", " ", "0", ",", "22"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"20", ",", "0", ",", "0", ",", RowBox[{"-", "10"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "21"}], ",", RowBox[{"-", "4"}], ",", "0", ",", "35"}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", RowBox[{"-", "2"}], ",", "2", ",", "0"}], "}"}]}], "}"}]}], "\n", " ", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"names", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"mats", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"rown", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"rowm", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"row", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{"row", "<=", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"namesl", ",", "1"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"rown", "=", RowBox[{"Join", "[", RowBox[{"rown", ",", RowBox[{"{", RowBox[{"namesl", "[", RowBox[{"[", "row", "]"}], "]"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"rowm", "=", RowBox[{"Join", "[", RowBox[{"rowm", ",", RowBox[{"{", RowBox[{"matsl", "[", RowBox[{"[", "row", "]"}], "]"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"Or", "[", RowBox[{ RowBox[{"IntegerQ", "[", RowBox[{"row", "/", "rowsize"}], "]"}], ",", RowBox[{"row", "==", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"namesl", ",", "1"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"names", "=", RowBox[{"Join", "[", RowBox[{"names", ",", RowBox[{"{", "rown", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"mats", "=", RowBox[{"Join", "[", RowBox[{"mats", ",", RowBox[{"{", "rowm", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"rown", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"rowm", "=", RowBox[{"{", "}"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"row", "++"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"buttons", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"row", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{"row", "<=", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"names", ",", "1"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"butrow", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"but", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", " ", RowBox[{ RowBox[{"but", "<=", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{ RowBox[{"names", "[", RowBox[{"[", "row", "]"}], "]"}], ",", "1"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"button", ":=", "\[IndentingNewLine]", RowBox[{"Button", "[", RowBox[{ RowBox[{"Column", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"MatrixForm", "[", "mat", "]"}], ",", "name"}], "}"}], ",", RowBox[{"Alignment", "\[Rule]", RowBox[{"{", "Center", "}"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{ "NotebookLocate", "[", "\"\\"", "]"}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", "\"\\"", ",", "Next", ",", "CellTags", ",", RowBox[{"AutoScroll", "->", "False"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"SelectionMove", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", "All", ",", "CellContents", ",", RowBox[{"AutoScroll", "->", "False"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"NotebookWrite", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", RowBox[{"RowBox", "[", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"ToBoxes", "[", RowBox[{"MatrixForm", "[", "mat", "]"}], "]"}], ",", "\"\<;\>\""}], "}"}], "]"}], ",", RowBox[{"AutoScroll", "->", "False"}]}], "]"}], ";"}]}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{",", RowBox[{"ImageSize", "\[Rule]", RowBox[{"{", RowBox[{"150", ",", "80"}], "}"}]}]}], "*)"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"button", "=", RowBox[{ RowBox[{ RowBox[{"Style", "[", RowBox[{"button", ",", RowBox[{ "ControlsRendering", "\[Rule]", "\"\\""}]}], "]"}], " ", "/.", RowBox[{"mat", "->", RowBox[{ RowBox[{"mats", "[", RowBox[{"[", "row", "]"}], "]"}], "[", RowBox[{"[", "but", "]"}], "]"}]}]}], "/.", RowBox[{"name", "->", RowBox[{ RowBox[{"names", "[", RowBox[{"[", "row", "]"}], "]"}], "[", RowBox[{"[", "but", "]"}], "]"}]}]}]}], ";", "\[IndentingNewLine]", RowBox[{"butrow", "=", RowBox[{"Join", "[", RowBox[{"butrow", ",", RowBox[{"{", "button", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"butrow", "=", RowBox[{"Join", "[", RowBox[{"butrow", ",", RowBox[{"{", RowBox[{ RowBox[{"Row", "[", RowBox[{"{", "\"\< \>\"", "}"}], "]"}], ",", "button"}], "}"}]}], "]"}]}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{"but", "++"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"buttons", "=", RowBox[{"Join", "[", RowBox[{"buttons", ",", RowBox[{"{", "butrow", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"row", "++"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ RowBox[{"TableForm", "[", RowBox[{"buttons", ",", RowBox[{"TableAlignments", "->", RowBox[{"{", RowBox[{"Left", ",", "Top"}], "}"}]}], ",", RowBox[{"TableSpacing", "\[Rule]", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}]}]}], "]"}], ",", RowBox[{"FromCharacterCode", "[", "10", "]"}]}], "]"}]}]}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Column", "[", "buttons", "]"}], "*)"}], "\[IndentingNewLine]", "]"}]}], ";"}], "\n", RowBox[{"matrixButtons", "[", "8", "]"}]}], "Input", Evaluatable->False, CellOpen->False, CellChangeTimes->{{3.4813040162966223`*^9, 3.4813041889350376`*^9}, { 3.481304234246958*^9, 3.481304348854866*^9}, {3.4813044130259194`*^9, 3.4813044667127323`*^9}, {3.481304497212342*^9, 3.481304516258973*^9}, { 3.481304591711132*^9, 3.481304623616974*^9}, {3.481304658444653*^9, 3.481304715787669*^9}, {3.481304754318426*^9, 3.481304856879613*^9}, { 3.481304924394374*^9, 3.481304929097439*^9}, {3.4813049637844944`*^9, 3.481305049955267*^9}, {3.481305109251383*^9, 3.4813052103282137`*^9}, { 3.4813052726867905`*^9, 3.4813054179505563`*^9}, {3.4813054936370873`*^9, 3.481305606760639*^9}, {3.481305668931719*^9, 3.4813057399464345`*^9}, { 3.4813058200547843`*^9, 3.4813059389126377`*^9}, {3.481305992286955*^9, 3.4813059950056696`*^9}, {3.4813060594423447`*^9, 3.4813061026605415`*^9}, {3.4813061575348396`*^9, 3.4813061668159704`*^9}, 3.4813062421118817`*^9, 3.4813062726896152`*^9, {3.481306358922887*^9, 3.481306400750476*^9}, {3.481306526514491*^9, 3.4813065369518576`*^9}, { 3.4813065678420877`*^9, 3.481306572404529*^9}, 3.481306608185321*^9, { 3.4813066523878803`*^9, 3.481306668168928*^9}, {3.481306704777835*^9, 3.4813067154651976`*^9}, 3.481306939040461*^9, {3.4813069856961136`*^9, 3.4813069858836117`*^9}, 3.481307054163987*^9, {3.481307101772753*^9, 3.4813071138350983`*^9}, {3.481307407643838*^9, 3.4813077466394987`*^9}, { 3.4813077909826813`*^9, 3.48130781959169*^9}, {3.4813078599192986`*^9, 3.481307957918044*^9}, {3.481308040010743*^9, 3.481308046416911*^9}, 3.4813080794633636`*^9, 3.4813081524936786`*^9, {3.481308210524186*^9, 3.481308338163177*^9}, 3.4813083718189964`*^9, {3.4813085571447487`*^9, 3.481308586503748*^9}, {3.4813086184408393`*^9, 3.481308738251806*^9}, { 3.481308930858715*^9, 3.4813091517777624`*^9}, {3.4813091950740833`*^9, 3.481309202620862*^9}, {3.4813099727203794`*^9, 3.4813100351414557`*^9}, { 3.4813100751096935`*^9, 3.4813101295777464`*^9}, {3.481310159749235*^9, 3.4813101717647066`*^9}, {3.4813102025768123`*^9, 3.481310210326713*^9}, { 3.4813102772946057`*^9, 3.4813103037630167`*^9}, {3.4813103642778673`*^9, 3.4813104031523695`*^9}, {3.4813110125508194`*^9, 3.48131103905048*^9}, { 3.4813110842686515`*^9, 3.4813111395023193`*^9}, {3.4813117891346292`*^9, 3.481311813509317*^9}, {3.4813118455401573`*^9, 3.481311848555743*^9}, { 3.481311983491516*^9, 3.481311996303852*^9}, {3.481312245331915*^9, 3.481312262878565*^9}, {3.4813124766258287`*^9, 3.4813124780789356`*^9}, { 3.481312562234108*^9, 3.4813125631559715`*^9}, {3.481313376067441*^9, 3.4813133832704735`*^9}, {3.4813140008563185`*^9, 3.4813141425888796`*^9}, {3.481314173932228*^9, 3.4813141780571756`*^9}, { 3.481314220525382*^9, 3.4813142451031923`*^9}, {3.4813143191022453`*^9, 3.481314320055358*^9}, {3.481314353383056*^9, 3.481314360445466*^9}, { 3.4813144028980474`*^9, 3.481314405194893*^9}, {3.4813144915531626`*^9, 3.4813145915675077`*^9}, {3.4813146929724593`*^9, 3.481314706347288*^9}, { 3.4813148354706354`*^9, 3.4813148468611145`*^9}, {3.4813157963547544`*^9, 3.4813158533558493`*^9}, {3.481315901981783*^9, 3.481315960669737*^9}, { 3.481316084544737*^9, 3.481316093107237*^9}, {3.481316151857237*^9, 3.481316184232237*^9}, {3.481316289559544*^9, 3.481316322527872*^9}, { 3.4813163535431004`*^9, 3.481316372355359*^9}, {3.481316418932888*^9, 3.481316420276621*^9}, {3.4813164900569777`*^9, 3.481316570165327*^9}, { 3.48131666333601*^9, 3.481316718241557*^9}, 3.4813167995217667`*^9, { 3.4813168815207167`*^9, 3.4813168975517616`*^9}, {3.4813169714570656`*^9, 3.481316996425496*^9}, {3.4813170544403787`*^9, 3.481317077674456*^9}, { 3.481317108767808*^9, 3.4813171147208567`*^9}, {3.481317148236053*^9, 3.481317162079626*^9}, {3.4813172156883144`*^9, 3.4813172161570587`*^9}, { 3.4813172564065437`*^9, 3.4813172577815256`*^9}, {3.481317415967001*^9, 3.4813174182013474`*^9}, {3.481318095723925*^9, 3.481318181488452*^9}, 3.481318284596507*^9, {3.481318343611377*^9, 3.4813184077043066`*^9}, { 3.481318575702156*^9, 3.481318581561456*^9}, {3.4813186265921297`*^9, 3.4813186395294642`*^9}, {3.481319531174301*^9, 3.4813195706269207`*^9}, { 3.4813301870935183`*^9, 3.481330195575715*^9}, {3.481330234031011*^9, 3.481330240229925*^9}, {3.4813303413653507`*^9, 3.481330348635805*^9}, 3.481381740593504*^9, {3.48138186256188*^9, 3.4813818701868315`*^9}, 3.4814015869376*^9, {3.481405450326758*^9, 3.4814055598442364`*^9}, { 3.4814056617908287`*^9, 3.481405789714774*^9}, {3.4814058901191483`*^9, 3.4814059033681993`*^9}, {3.481405941803467*^9, 3.481405984975545*^9}, { 3.481406077548659*^9, 3.481406079601611*^9}, 3.481406131906822*^9, { 3.4814061894595785`*^9, 3.4814061927543163`*^9}, {3.481406239131003*^9, 3.481406257597556*^9}, {3.481406398980856*^9, 3.481406411659086*^9}, { 3.4814064803979273`*^9, 3.481406480728403*^9}, {3.481406518092129*^9, 3.4814066497113886`*^9}, {3.4814066834098444`*^9, 3.48140673647615*^9}, { 3.481408508784604*^9, 3.4814085588966618`*^9}, {3.481408601387761*^9, 3.481408603090209*^9}, {3.4814086420261965`*^9, 3.4814087494506655`*^9}, { 3.4814087986514125`*^9, 3.481408857345811*^9}, {3.4814089003977165`*^9, 3.4814089629676876`*^9}, 3.4814131600728283`*^9, 3.4814132208702507`*^9, { 3.4814132796547785`*^9, 3.481413291952462*^9}, {3.481413334613806*^9, 3.481413495364955*^9}, {3.4814135595772877`*^9, 3.4814136320014286`*^9}, { 3.4814137487793465`*^9, 3.481413779022835*^9}, {3.481414435946512*^9, 3.481414512348054*^9}, {3.4814148679674177`*^9, 3.48141493700995*^9}, { 3.481415020183816*^9, 3.4814150755877504`*^9}, {3.481415141352315*^9, 3.481415154190776*^9}, {3.4814151844943504`*^9, 3.4814152094502354`*^9}, { 3.481415278549595*^9, 3.4814152928501587`*^9}, {3.481415420553787*^9, 3.4814154999078927`*^9}, {3.481415562497893*^9, 3.481415584309256*^9}, { 3.481415703060011*^9, 3.481415703450573*^9}, 3.4814158990017614`*^9, { 3.4814171364611406`*^9, 3.4814171462952814`*^9}, {3.481424072987533*^9, 3.4814241197147236`*^9}, {3.4814832782005634`*^9, 3.4814832867829046`*^9}, 3.4816703314238143`*^9, {3.481670369408434*^9, 3.4816704575852256`*^9}, { 3.4816706146811185`*^9, 3.4816707845954432`*^9}, {3.4816708405859537`*^9, 3.481670920480837*^9}, {3.4816709715042048`*^9, 3.4816709719949102`*^9}, { 3.4816711094525647`*^9, 3.4816711098431263`*^9}, {3.4816711965377874`*^9, 3.481671238237749*^9}, {3.4816713148579235`*^9, 3.481671340214384*^9}, { 3.4816713745737906`*^9, 3.4816716260353746`*^9}, {3.481671755331293*^9, 3.481671785134147*^9}, {3.4816718832952957`*^9, 3.4816719397865267`*^9}, 3.4816719758984528`*^9, {3.481673176244466*^9, 3.4816732875745506`*^9}, 3.4816733183988733`*^9, {3.481673362101715*^9, 3.4816733707441425`*^9}, 3.481673653340496*^9, {3.4816745940231314`*^9, 3.4816746022149105`*^9}, { 3.4817346006152563`*^9, 3.481734607925768*^9}, {3.481736647042942*^9, 3.481736703093539*^9}, 3.4817375426908207`*^9, {3.4818122976768284`*^9, 3.481812298417894*^9}, {3.481812350362587*^9, 3.481812357372667*^9}, { 3.4818128664446764`*^9, 3.481812875197262*^9}, {3.4818129301963468`*^9, 3.4818129355740795`*^9}, {3.4818143148348017`*^9, 3.4818143212440176`*^9}, {3.481814414818571*^9, 3.481814415068931*^9}, { 3.482499882130601*^9, 3.482499918617347*^9}, {3.4824999498159657`*^9, 3.4825001861311827`*^9}, {3.482500694734828*^9, 3.4825007038551826`*^9}, 3.4825007832288857`*^9, {3.482501048378593*^9, 3.4825011054625*^9}, 3.4825011388107977`*^9, {3.511640997443566*^9, 3.5116410199359083`*^9}, { 3.539719596415397*^9, 3.5397196012625127`*^9}, {3.565001742198155*^9, 3.565001743470468*^9}}, CellTags->{"buttoncell", "corecell", "differentacrossnotebooks", "notopen"}], Cell[BoxData[ InterpretationBox[ RowBox[{ TagBox[GridBox[{ { StyleBox[ ButtonBox[ TagBox[GridBox[{ { TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", "0", "1"}, {"1", "0", "0", "0"}, {"0", "1", "0", "0"}, {"0", "0", "1", "0"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]}, {"\<\"Hypercycle\"\>"} }, GridBoxAlignment->{"Columns" -> {{Center}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"], Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_payoffmatrix", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"A=", ToBoxes[ MatrixForm[{{0, 0, 0, 1}, {1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}}]], ";"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False], StyleBox[ ButtonBox[ TagBox[GridBox[{ { TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"1", "0", "0", "0"}, {"0", "1", "0", "0"}, {"0", "0", "1", "0"}, {"0", "0", "0", "1"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]}, {"\<\"Coordination\"\>"} }, GridBoxAlignment->{"Columns" -> {{Center}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"], Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_payoffmatrix", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"A=", ToBoxes[ MatrixForm[{{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}]], ";"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False], StyleBox[ ButtonBox[ TagBox[GridBox[{ { TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", RowBox[{"-", "1"}], "1", "1"}, {"1", "0", RowBox[{"-", "1"}], RowBox[{"-", "1"}]}, { RowBox[{"-", "1"}], "1", "0", "0"}, { RowBox[{"-", "1"}], "1", "0", "0"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]}, {"\<\"RPS+Twin\"\>"} }, GridBoxAlignment->{"Columns" -> {{Center}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"], Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_payoffmatrix", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"A=", ToBoxes[ MatrixForm[{{0, -1, 1, 1}, {1, 0, -1, -1}, {-1, 1, 0, 0}, {-1, 1, 0, 0}}]], ";"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False], StyleBox[ ButtonBox[ TagBox[GridBox[{ { TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", RowBox[{"-", "1"}], "0.1`"}, {"0.1`", "0", "0", RowBox[{"-", "1"}]}, { RowBox[{"-", "1"}], "0.1`", "0", "0"}, {"0", RowBox[{"-", "1"}], "0.1`", "0"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]}, {"\<\"Hofbauer-Swinkels\"\>"} }, GridBoxAlignment->{"Columns" -> {{Center}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"], Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_payoffmatrix", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"A=", ToBoxes[ MatrixForm[{{0, 0, -1, 0.1}, { 0.1, 0, 0, -1}, {-1, 0.1, 0, 0}, {0, -1, 0.1, 0}}]], ";"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False], StyleBox[ ButtonBox[ TagBox[GridBox[{ { TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", RowBox[{"-", "12"}], "0", "22"}, {"20", "0", "0", RowBox[{"-", "10"}]}, { RowBox[{"-", "21"}], RowBox[{"-", "4"}], "0", "35"}, {"10", RowBox[{"-", "2"}], "2", "0"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]}, {"\<\"Arneodo-Coullet-Tresser\"\>"} }, GridBoxAlignment->{"Columns" -> {{Center}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"], Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_payoffmatrix", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"A=", ToBoxes[ MatrixForm[{{0, -12, 0, 22}, {20, 0, 0, -10}, {-21, -4, 0, 35}, {10, -2, 2, 0}}]], ";"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Top}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Function[BoxForm`e$, TableForm[ BoxForm`e$, TableAlignments -> {Left, Top}, TableSpacing -> {1, 1}]]], "\[InvisibleSpace]", "\<\"\\n\"\>"}], SequenceForm[ TableForm[{{ Style[ Button[ Column[{ MatrixForm[{{0, 0, 0, 1}, {1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}}], "Hypercycle"}, Alignment -> {Center}], NotebookFind[ SelectedNotebook[], "unique_payoffmatrix", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"A=", ToBoxes[ MatrixForm[{{0, 0, 0, 1}, {1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}}]], ";"}], AutoScroll -> False]; Null], ControlsRendering -> "Generic"], Style[ Button[ Column[{ MatrixForm[{{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}], "Coordination"}, Alignment -> {Center}], NotebookFind[ SelectedNotebook[], "unique_payoffmatrix", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"A=", ToBoxes[ MatrixForm[{{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}]], ";"}], AutoScroll -> False]; Null], ControlsRendering -> "Generic"], Style[ Button[ Column[{ MatrixForm[{{0, -1, 1, 1}, {1, 0, -1, -1}, {-1, 1, 0, 0}, {-1, 1, 0, 0}}], "RPS+Twin"}, Alignment -> {Center}], NotebookFind[ SelectedNotebook[], "unique_payoffmatrix", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"A=", ToBoxes[ MatrixForm[{{0, -1, 1, 1}, {1, 0, -1, -1}, {-1, 1, 0, 0}, {-1, 1, 0, 0}}]], ";"}], AutoScroll -> False]; Null], ControlsRendering -> "Generic"], Style[ Button[ Column[{ MatrixForm[{{0, 0, -1, 0.1}, {0.1, 0, 0, -1}, {-1, 0.1, 0, 0}, { 0, -1, 0.1, 0}}], "Hofbauer-Swinkels"}, Alignment -> {Center}], NotebookFind[ SelectedNotebook[], "unique_payoffmatrix", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"A=", ToBoxes[ MatrixForm[{{0, 0, -1, 0.1}, {0.1, 0, 0, -1}, {-1, 0.1, 0, 0}, { 0, -1, 0.1, 0}}]], ";"}], AutoScroll -> False]; Null], ControlsRendering -> "Generic"], Style[ Button[ Column[{ MatrixForm[{{0, -12, 0, 22}, {20, 0, 0, -10}, {-21, -4, 0, 35}, { 10, -2, 2, 0}}], "Arneodo-Coullet-Tresser"}, Alignment -> {Center}], NotebookFind[ SelectedNotebook[], "unique_payoffmatrix", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"A=", ToBoxes[ MatrixForm[{{0, -12, 0, 22}, {20, 0, 0, -10}, {-21, -4, 0, 35}, { 10, -2, 2, 0}}]], ";"}], AutoScroll -> False]; Null], ControlsRendering -> "Generic"]}}, TableAlignments -> {Left, Top}, TableSpacing -> {1, 1}], "\n"], Editable->False]], "Print", Evaluatable->False, CellOpen->True, CellChangeTimes->{3.539691328628796*^9, 3.5397154731353073`*^9, 3.539719605659571*^9, 3.580490214781043*^9}, CellTags->{"buttoncell", "corecell", "differentacrossnotebooks", "notopen"}] }, {2}]] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"A", "=", TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"9", "0", "12", "2"}, {"12", "9", "0", "2"}, {"0", "12", "9", "2"}, {"9", "9", "9", "0"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]}], ";"}]], "Input", CellChangeTimes->{{3.4807914455931883`*^9, 3.4807914669051423`*^9}, { 3.480791789209391*^9, 3.4807917977404227`*^9}, 3.4807940301207724`*^9, 3.480859076992506*^9, 3.480864043008131*^9, {3.480865480008131*^9, 3.480865513508131*^9}, 3.480944241448495*^9, 3.4812465820055056`*^9, 3.4813021571797943`*^9, {3.4813023589584618`*^9, 3.481302362677164*^9}, { 3.4813026530171976`*^9, 3.481302666579524*^9}, {3.481302702610313*^9, 3.4813027138757935`*^9}, {3.4813027893592024`*^9, 3.4813028076714683`*^9}, {3.4813029176388106`*^9, 3.4813029292324123`*^9}, 3.4813030583401346`*^9, 3.4813061973624544`*^9, 3.4813062596272826`*^9, 3.4813064264376473`*^9, 3.4813065417486715`*^9, 3.481306624575736*^9, 3.481306679575032*^9, 3.481306727090049*^9, 3.4813070602576594`*^9, { 3.4813072989577293`*^9, 3.481307323738662*^9}, 3.4813095813972635`*^9, 3.4813101426869535`*^9, 3.4813101761865253`*^9, 3.4813102138891673`*^9, 3.4813103080598373`*^9, {3.4813104098866587`*^9, 3.481310424652095*^9}, 3.481311817743638*^9, {3.481311989928934*^9, 3.48131200235065*^9}, { 3.481312255316162*^9, 3.481312269315983*^9}, 3.4813123243152785`*^9, 3.481312355189883*^9, {3.4813125150628366`*^9, 3.4813125343907146`*^9}, { 3.481312567265294*^9, 3.4813125711402445`*^9}, 3.4813133889891505`*^9, 3.481313435316683*^9, 3.481314323086569*^9, 3.4813143631016817`*^9, 3.4813144088198466`*^9, {3.481314571833385*^9, 3.481314593676855*^9}, 3.481315789760878*^9, {3.4813158232458963`*^9, 3.481315856324656*^9}, 3.481315926279112*^9, 3.481316189044737*^9, {3.481316559946708*^9, 3.481316587571355*^9}, {3.4813166670234623`*^9, 3.48131666724221*^9}, { 3.4813166977261944`*^9, 3.4813166979449415`*^9}, 3.481316900504849*^9, 3.481316999191086*^9, 3.4813186422950535`*^9, 3.481319400613472*^9, { 3.4813195747049937`*^9, 3.4813195783455725`*^9}, 3.481329551359378*^9, 3.481334621489485*^9, 3.481336034025562*^9, 3.4813365135662985`*^9, 3.4814055733736906`*^9, {3.481405797455905*^9, 3.4814058068494124`*^9}, { 3.4814068175927896`*^9, 3.4814068317130938`*^9}, 3.4814158153815217`*^9, 3.4814195977302723`*^9, {3.481472827843325*^9, 3.481472855684579*^9}, { 3.481671080691208*^9, 3.481671084216277*^9}, {3.4816719070895104`*^9, 3.4816719104743776`*^9}, {3.4816735327771344`*^9, 3.481673534759986*^9}, 3.481736297109763*^9, 3.4817372901877394`*^9, {3.4818136137151775`*^9, 3.4818136167695694`*^9}, 3.4818157647296476`*^9, 3.4818182756401596`*^9, 3.4818967232661815`*^9, 3.4818967578459044`*^9, 3.4919286370626774`*^9, 3.4922604120748067`*^9, 3.4922813760617304`*^9, 3.492282420353348*^9, 3.492287500003594*^9, 3.4922920232027025`*^9, 3.4925108522131824`*^9, 3.4925114253773518`*^9, 3.4925191338515935`*^9, {3.492520443314509*^9, 3.4925204456178207`*^9}, 3.492600688454246*^9, 3.492636908581485*^9, 3.4928275145546865`*^9, 3.492828151510584*^9, 3.492828403753291*^9, 3.4928285694315248`*^9, 3.492892215656488*^9, 3.4932158663051214`*^9, { 3.493268713208069*^9, 3.4932687373628016`*^9}, 3.4932693842029123`*^9, 3.4932706727457457`*^9, 3.493413892173255*^9, 3.4934181901985793`*^9, 3.49341954831145*^9, 3.4934259528607397`*^9, 3.4934262524515295`*^9, 3.493474128937461*^9, {3.5074006517377553`*^9, 3.5074006578156977`*^9}, { 3.5074007492273192`*^9, 3.5074007633497143`*^9}, 3.508013272854101*^9, 3.5087864724279823`*^9, {3.5087962491583247`*^9, 3.5087962632986574`*^9}, { 3.508796964306484*^9, 3.5087969658487015`*^9}, 3.50919783937002*^9, 3.510066695551895*^9, {3.510066933151305*^9, 3.510066943869555*^9}, 3.510067020893757*^9, 3.5100696642033453`*^9, 3.5100697601558037`*^9, 3.510667786049495*^9, 3.510924572285383*^9, 3.510925057403319*^9, 3.511039225676178*^9, {3.5110956805166407`*^9, 3.511095685479405*^9}, 3.511175763490273*^9, 3.511279486461564*^9, 3.511280192199608*^9, 3.511280520312344*^9, 3.5130120070714145`*^9, {3.5130267978481426`*^9, 3.5130268172059774`*^9}, 3.5159558751713195`*^9, 3.5159559852876177`*^9, 3.5159570056509795`*^9, 3.515958865769372*^9, 3.515959366763027*^9, 3.515959551455591*^9, 3.5160382237423887`*^9, 3.516387128016509*^9, 3.519382385307869*^9, 3.519461216169551*^9, 3.539459235914659*^9, 3.539619739978017*^9, {3.539719926432804*^9, 3.53971995813433*^9}, { 3.5397236431752706`*^9, 3.539723643910864*^9}, {3.557748873732992*^9, 3.5577488849636345`*^9}, 3.557830694851338*^9, 3.557830781604845*^9, { 3.557833866271459*^9, 3.55783387598132*^9}, 3.557834057154661*^9, 3.557835076215402*^9, 3.557922458792365*^9, {3.558807818248766*^9, 3.558807829762751*^9}, 3.559160953114755*^9, 3.559170145487546*^9, { 3.564854739556765*^9, 3.564854754865901*^9}, 3.564911692511483*^9, 3.564994973391324*^9, 3.564996380655744*^9, 3.56500658587393*^9, { 3.57281651008741*^9, 3.572816531751606*^9}, {3.572963277949404*^9, 3.572963284346855*^9}, 3.572966068778873*^9, {3.572966107403465*^9, 3.572966119779882*^9}, 3.578924025371532*^9, 3.578924068509542*^9, { 3.580470085721237*^9, 3.580470092157171*^9}, 3.606654144854679*^9, { 3.606654915046209*^9, 3.606654918338125*^9}, {3.630164634720022*^9, 3.630164674605239*^9}}, CellTags->{"corecell", "unique_payoffmatrix"}], Cell[BoxData[ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"gamekind", "==", "NormalGame"}], ",", RowBox[{"A", "=", RowBox[{"A", "-", RowBox[{"ConstantArray", "[", RowBox[{ RowBox[{ RowBox[{"Min", "[", "A", "]"}], "-", "1"}], ",", RowBox[{"{", RowBox[{"dim", ",", "dim"}], "}"}]}], "]"}]}]}]}], "]"}], ";"}]], "Input", Evaluatable->False, CellOpen->False, CellChangeTimes->{ 3.508788030659297*^9, {3.50878807825774*^9, 3.508788124153735*^9}, { 3.508788193523757*^9, 3.5087882581114244`*^9}, 3.5087883250576887`*^9, { 3.5087883998151846`*^9, 3.508788416258829*^9}, {3.5087887248525653`*^9, 3.508788800831818*^9}, {3.5087889592596264`*^9, 3.508788983664719*^9}, { 3.580648539653288*^9, 3.580648547118126*^9}, {3.580651211424344*^9, 3.580651216956601*^9}}, CellTags->{"corecell", "notopen", "singlepopulation"}] }, Open ]], Cell[CellGroupData[{ Cell["Specification of nonlinear game", "Subsubsection", CellChangeTimes->{ 3.4816700476457615`*^9, {3.4818116260860605`*^9, 3.481811629100395*^9}, { 3.4818152985993853`*^9, 3.481815299991387*^9}, {3.4818160457537403`*^9, 3.48181605160215*^9}, {3.4818162757043934`*^9, 3.481816305417118*^9}, 3.510068844399316*^9}, CellTags->"corecell"], Cell[CellGroupData[{ Cell[TextData[StyleBox["Definition of Quadratic Game", FontSlant->"Italic"]], "SmallText", CellChangeTimes->{{3.481815336003169*^9, 3.48181536170012*^9}, { 3.4818163391456175`*^9, 3.4818163441127596`*^9}, {3.4818163908499646`*^9, 3.481816392382168*^9}}, CellTags->{"corecell", "singlepopulation"}], Cell[BoxData[{ RowBox[{ RowBox[{"Q", "=", RowBox[{"{", RowBox[{ TagBox[ RowBox[{"\[IndentingNewLine]", RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", "0", "0"}, {"0", "0", "0", "0"}, {"0", "0", "0", "0"}, {"0", "0", "0", "0"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}]}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]], ",", "\[IndentingNewLine]", RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", "0", "0"}, {"0", "0", "0", "0"}, {"0", "0", "0", "0"}, {"0", "0", "0", "0"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], ",", "\[IndentingNewLine]", RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", "0", "0"}, {"0", "0", "0", "0"}, {"0", "0", "0", "0"}, {"0", "0", "0", "0"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], ",", "\[IndentingNewLine]", RowBox[{"(", "\[NoBreak]", GridBox[{ {"0", "0", "0", "0"}, {"0", "0", "0", "0"}, {"0", "0", "0", "0"}, {"0", "0", "0", "0"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}]}], "\[IndentingNewLine]", "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"L", "=", "A"}], ";"}], "\n", RowBox[{ RowBox[{"B", "=", TagBox[ RowBox[{"(", "\[NoBreak]", GridBox[{ {"0"}, {"0"}, {"0"}, {"0"} }, GridBoxAlignment->{ "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]}], ";"}]}], "Input", CellChangeTimes->{{3.481816422695757*^9, 3.481816579310958*^9}, { 3.4818170340648623`*^9, 3.4818170366686063`*^9}, 3.4818170885031404`*^9, { 3.4818933148288403`*^9, 3.4818933381223345`*^9}, {3.4818942896605797`*^9, 3.48189429182369*^9}, {3.4818944159922357`*^9, 3.481894441739258*^9}, 3.539688365091631*^9, 3.580470122539473*^9}, CellTags->{"corecell", "differentacrossnotebooks", "singlepopulation"}] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Definition of Congestion Game", FontSlant->"Italic"]], "SmallText", CellChangeTimes->{{3.481815336003169*^9, 3.48181536170012*^9}, { 3.4818163391456175`*^9, 3.4818163441127596`*^9}}, CellTags->"corecell"], Cell["\<\ Cost functions for facilities as functions of utilization levels.\ \>", "Text", FontFamily->"Palatino", CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"congestionCost", "[", "1", "]"}], "[", "u_", "]"}], " ", ":=", RowBox[{"4", "+", RowBox[{"20", "u"}]}]}], " ", ";"}], " "}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"congestionCost", "[", "2", "]"}], "[", "u_", "]"}], " ", ":=", RowBox[{"2", "+", RowBox[{"30", RowBox[{"u", "^", "2"}]}]}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"congestionCost", "[", "3", "]"}], "[", "u_", "]"}], " ", ":=", RowBox[{"2", "+", RowBox[{"30", RowBox[{"u", "^", "2"}]}]}]}], ";"}], " "}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"congestionCost", "[", "4", "]"}], "[", "u_", "]"}], " ", ":=", RowBox[{"4", "+", RowBox[{"20", "u"}]}]}], ";"}], " "}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"congestionCost", "[", "5", "]"}], "[", "u_", "]"}], " ", ":=", RowBox[{"1", "+", RowBox[{"20", "u"}]}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"congestionCost", "[", "6", "]"}], "[", "u_", "]"}], " ", ":=", "0"}], " ", ";"}], " "}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"congestionCost", "[", "7", "]"}], "[", "u_", "]"}], " ", ":=", "0"}], " ", ";"}]}], "Input", CellChangeTimes->{{3.56926619303037*^9, 3.569266222747615*^9}, { 3.569279860581643*^9, 3.569279900265885*^9}}, CellTags->{"corecell", "differentacrossnotebooks"}], Cell["Which strategies use which facilities.", "Text", FontFamily->"Palatino", CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", "\[CapitalPhi]", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"\[CapitalPhi]", "[", "1", "]"}], "[", "1", "]"}], "=", RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}]}], ";"}], " "}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"\[CapitalPhi]", "[", "1", "]"}], "[", "2", "]"}], "=", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"\[CapitalPhi]", "[", "1", "]"}], "[", "3", "]"}], "=", RowBox[{"{", RowBox[{"2", ",", "3", ",", "5"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"\[CapitalPhi]", "[", "1", "]"}], "[", "4", "]"}], "=", RowBox[{"{", RowBox[{"1", ",", "4"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"\[Rho]", "[", "\[Phi]_", "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{"DeleteCases", "[", RowBox[{ RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"MemberQ", "[", RowBox[{ RowBox[{ RowBox[{"\[CapitalPhi]", "[", "p", "]"}], "[", "j", "]"}], ",", "\[Phi]"}], "]"}], ",", "j"}], "]"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], " ", ",", "Null"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"u", "[", RowBox[{"\[Phi]_", ",", "x_"}], "]"}], ":=", RowBox[{"Sum", "[", RowBox[{ RowBox[{"Sum", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", RowBox[{ RowBox[{"\[Rho]", "[", "\[Phi]", "]"}], "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}]}], "]"}], "]"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{ RowBox[{"\[Rho]", "[", "\[Phi]", "]"}], "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], " ", ";"}]}], "Input", CellChangeTimes->{{3.4928187528159246`*^9, 3.4928187532565584`*^9}, { 3.507985720134223*^9, 3.507985733818901*^9}, {3.569264046507162*^9, 3.569264096595187*^9}, {3.569264154908149*^9, 3.56926417366321*^9}, { 3.569268735455526*^9, 3.569268735863632*^9}, {3.569279052944103*^9, 3.569279142100319*^9}, 3.569279920642762*^9, {3.569280892025758*^9, 3.569280927998333*^9}, {3.571864521471311*^9, 3.57186453054066*^9}, { 3.580470270982782*^9, 3.580470297234886*^9}}, CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Names of strategies", "Subsection", CellChangeTimes->{ 3.4816700476457615`*^9, {3.4818116260860605`*^9, 3.481811629100395*^9}, { 3.4818152985993853`*^9, 3.481815299991387*^9}, {3.4818160457537403`*^9, 3.48181605160215*^9}, {3.4818162757043934`*^9, 3.481816305417118*^9}, { 3.4818185096266155`*^9, 3.48181851273108*^9}, 3.510069635539062*^9}, CellTags->{"corecell", "opengroup"}], Cell["\<\ Give the strategies names to be printed on the phase diagram. Vertices are \ ordered counterclockwise.\ \>", "Text", CellChangeTimes->{3.571865154341907*^9}, FontFamily->"Palatino", CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"strategy", "[", "1", "]"}], "=", "\"\\""}], ";"}], " "}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"strategy", "[", "2", "]"}], "=", "\"\\""}], ";"}], " "}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"strategy", "[", "3", "]"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"strategy", "[", "4", "]"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"font", "=", "\"\\""}], ";"}]}], "Input", CellChangeTimes->{{3.474919131005475*^9, 3.474919134730832*^9}, 3.5194218593864717`*^9, {3.5194612363537054`*^9, 3.519461240877964*^9}, { 3.54047923471346*^9, 3.540479236948658*^9}, {3.568667927496173*^9, 3.568667932564085*^9}, {3.570141486091269*^9, 3.570141497680617*^9}, { 3.580470352929894*^9, 3.580470358838703*^9}, {3.580491228252902*^9, 3.580491231134703*^9}, {3.63016471417649*^9, 3.630164722430387*^9}}, CellTags->{"corecell", "differentacrossnotebooks"}] }, Open ]], Cell[CellGroupData[{ Cell["Computation of Nash equilibria", "Subsection", CellChangeTimes->{ 3.4816700476457615`*^9, {3.4818116260860605`*^9, 3.481811629100395*^9}, { 3.4818152985993853`*^9, 3.481815299991387*^9}, {3.4818160457537403`*^9, 3.48181605160215*^9}, {3.4818162757043934`*^9, 3.481816305417118*^9}, { 3.4818185317784686`*^9, 3.481818537646907*^9}, 3.510069637051261*^9}, CellTags->"corecell"], Cell[TextData[{ "If the game you consider has a nontrivial component of Nash equilibria, the \ program will find a random subset of this component. If you'd prefer not to \ compute the Nash equilibria, set ", StyleBox["findnashequilibria", FontWeight->"Bold"], " to 0. Similarly, you may skip finding the regular ESSs of the game by \ setting ", StyleBox["findESSs ", FontWeight->"Bold"], "to 0. The option ", StyleBox["maxdenominator ", FontWeight->"Bold"], "allows to control how the equilibria are displayed in the output. The \ output is presented in either decimal or rational form. If a fraction has a \ denominator that is bigger than maxdenominator, the number is presented in \ decimal form. This helps avoid having fractions with big denominators that \ are visually not appealing, but can be problematic if analytic results are \ desired. Setting the maximum denominator to \[OpenCurlyDoubleQuote]Infinity\ \[CloseCurlyDoubleQuote], without quotes, makes the program display the exact \ rational numbers." }], "Text", CellChangeTimes->{ 3.4932159353741026`*^9, {3.510663392352625*^9, 3.5106634820697594`*^9}, 3.5106651666120124`*^9, {3.5109251561115*^9, 3.510925156502658*^9}, { 3.511176242525011*^9, 3.5111762733979197`*^9}, {3.521204612234915*^9, 3.521204612952956*^9}, {3.578833685348306*^9, 3.578833999588247*^9}}, FontFamily->"Palatino", CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{"findnashequilibria", "=", "1"}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"findESSs", "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"maxdenominator", "=", "20"}], ";"}]}], "Input", CellChangeTimes->{{3.510663315294881*^9, 3.51066331622622*^9}, { 3.5106651715390973`*^9, 3.5106651749039354`*^9}, {3.5106655345711117`*^9, 3.510665534811457*^9}, {3.578833665354003*^9, 3.578833682844714*^9}, { 3.578833896428572*^9, 3.578833899611676*^9}, {3.578834106236645*^9, 3.578834106553512*^9}}, CellTags->"corecell"] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Choice of dynamic", "Section", Evaluatable->False, CellChangeTimes->{3.4883859890412593`*^9, 3.488386264557432*^9}, ImageRegion->{{0, 1}, {0, 1}}, CellTags->{"corecell", "opengroup"}], Cell["\<\ To specify a dynamic, press the button corresponding to the dynamic you \ desire. Definitions of the dynamics can be found in the closed group at the \ end of this section. Details: If you use Logit[eta] or ILogit[eta], be sure to enter a value for \ the noise parameter eta in the closed group below. The best response dynamic \ is actually the Logit[.001] dynamic, but with a different method of \ determining stability of rest points. When using the SampleBR[k] dynamic, \ set an integer value of k > 1 in the closed group below. SampleBR is most \ noticeably different from a best response dynamic only for values of k below \ 5.\ \>", "Text", CellChangeTimes->{ 3.4747151313883057`*^9, 3.474715257539703*^9, 3.4812474147760963`*^9, 3.4812474492912793`*^9, {3.481416554834803*^9, 3.48141681718204*^9}, { 3.4814168565586605`*^9, 3.481416945035885*^9}, {3.4814169932752495`*^9, 3.481416994306733*^9}, {3.481487401447174*^9, 3.481487410144681*^9}, { 3.481488265581498*^9, 3.481488269712858*^9}, {3.5072092451307364`*^9, 3.5072092562867775`*^9}, {3.510068899782366*^9, 3.510068960429554*^9}, 3.510069035442367*^9, {3.5130192962928*^9, 3.5130192974144125`*^9}, 3.521285140607848*^9, {3.5237325976760817`*^9, 3.523732640195251*^9}, { 3.539882288350531*^9, 3.539882304181365*^9}}, FontFamily->"Palatino", CellTags->"corecell"], Cell[CellGroupData[{ Cell["Some standard dynamics", "Subsection", CellTags->{"corecell", "opengroup"}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"matrixButtons", "[", "rowsize_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "namesl", ",", "matsl", ",", "names", " ", ",", "buttons", ",", "row", ",", "butrow", ",", "rown", ",", "name", ",", "but", ",", "button"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"namesl", " ", "=", " ", RowBox[{"{", RowBox[{"Replicator", ",", "BR", ",", RowBox[{"Defer", "[", RowBox[{"Logit", "[", "eta", "]"}], "]"}], ",", "MSReplicator", ",", RowBox[{"TemperedBR", "[", "tQ", "]"}], ",", "BNN", ",", RowBox[{"Defer", "[", RowBox[{"ILogit", "[", "eta", "]"}], "]"}], ",", RowBox[{"Defer", "[", RowBox[{"SampleBR", "[", "k", "]"}], "]"}], ",", "Smith"}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"names", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"rown", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"row", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{"row", "<=", RowBox[{ RowBox[{"Dimensions", "[", "namesl", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"rown", "=", RowBox[{"Join", "[", RowBox[{"rown", ",", RowBox[{"{", RowBox[{"namesl", "[", RowBox[{"[", "row", "]"}], "]"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"Or", "[", RowBox[{ RowBox[{"IntegerQ", "[", RowBox[{"row", "/", "rowsize"}], "]"}], ",", RowBox[{"row", "==", RowBox[{ RowBox[{"Dimensions", "[", "namesl", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"names", "=", RowBox[{"Join", "[", RowBox[{"names", ",", RowBox[{"{", "rown", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"rown", "=", RowBox[{"{", "}"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"row", "++"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"buttons", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"row", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{"row", "<=", RowBox[{ RowBox[{"Dimensions", "[", "names", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"butrow", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"but", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", " ", RowBox[{ RowBox[{"but", "<=", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"names", "[", RowBox[{"[", "row", "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"button", ":=", "\[IndentingNewLine]", RowBox[{"Button", "[", RowBox[{"name", ",", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{ "NotebookLocate", "[", "\"\\"", "]"}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", "\"\\"", ",", "Next", ",", "CellTags", ",", RowBox[{"AutoScroll", "->", "False"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"SelectionMove", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", "All", ",", "CellContents", ",", RowBox[{"AutoScroll", "->", "False"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"NotebookWrite", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", RowBox[{"RowBox", "[", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"ToBoxes", "[", "name", "]"}], ",", "\"\<;\>\""}], "}"}], "]"}], ",", RowBox[{"AutoScroll", "->", "False"}]}], "]"}], ";"}]}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{",", RowBox[{"ImageSize", "\[Rule]", RowBox[{"{", RowBox[{"100", ",", "30"}], "}"}]}]}], "*)"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"button", "=", RowBox[{ RowBox[{"Style", "[", RowBox[{"button", ",", RowBox[{"ControlsRendering", "\[Rule]", "\"\\""}]}], "]"}], "/.", RowBox[{"name", "->", RowBox[{ RowBox[{"names", "[", RowBox[{"[", "row", "]"}], "]"}], "[", RowBox[{"[", "but", "]"}], "]"}]}]}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"butrow", "=", RowBox[{"Join", "[", RowBox[{"butrow", ",", RowBox[{"{", RowBox[{ RowBox[{"Row", "[", RowBox[{"{", "\"\< \>\"", "}"}], "]"}], ",", "button"}], "}"}]}], "]"}]}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"ToString", "[", RowBox[{ RowBox[{"names", "[", RowBox[{"[", "row", "]"}], "]"}], "[", RowBox[{"[", "but", "]"}], "]"}], "]"}], "==", " ", "\"\< \>\""}], ",", RowBox[{"butrow", "=", RowBox[{"Join", "[", RowBox[{"butrow", ",", RowBox[{"{", "\"\<\>\"", "}"}]}], "]"}]}], ",", RowBox[{"butrow", "=", RowBox[{"Join", "[", RowBox[{"butrow", ",", RowBox[{"{", "button", "}"}]}], "]"}]}]}], "]"}], ";", RowBox[{"(*", RowBox[{ RowBox[{"butrow", "=", RowBox[{"Join", "[", RowBox[{"butrow", ",", RowBox[{"{", "button", "}"}]}], "]"}]}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{"but", "++"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"buttons", "=", RowBox[{"Join", "[", RowBox[{"buttons", ",", RowBox[{"{", "butrow", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"row", "++"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"TableForm", "[", RowBox[{"buttons", ",", RowBox[{"TableAlignments", "->", RowBox[{"{", RowBox[{"Left", ",", "Top"}], "}"}]}], ",", RowBox[{"TableSpacing", "\[Rule]", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}]}]}], "]"}]}]}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Column", "[", "buttons", "]"}], "*)"}], "\[IndentingNewLine]", "]"}]}], ";"}], "\n", RowBox[{"matrixButtons", "[", "3", "]"}]}], "Input", Evaluatable->False, CellOpen->False, CellChangeTimes->{{3.4813040162966223`*^9, 3.4813041889350376`*^9}, { 3.481304234246958*^9, 3.481304348854866*^9}, {3.4813044130259194`*^9, 3.4813044667127323`*^9}, {3.481304497212342*^9, 3.481304516258973*^9}, { 3.481304591711132*^9, 3.481304623616974*^9}, {3.481304658444653*^9, 3.481304715787669*^9}, {3.481304754318426*^9, 3.481304856879613*^9}, { 3.481304924394374*^9, 3.481304929097439*^9}, {3.4813049637844944`*^9, 3.481305049955267*^9}, {3.481305109251383*^9, 3.4813052103282137`*^9}, { 3.4813052726867905`*^9, 3.4813054179505563`*^9}, {3.4813054936370873`*^9, 3.481305606760639*^9}, {3.481305668931719*^9, 3.4813057399464345`*^9}, { 3.4813058200547843`*^9, 3.4813059389126377`*^9}, {3.481305992286955*^9, 3.4813059950056696`*^9}, {3.4813060594423447`*^9, 3.4813061026605415`*^9}, {3.4813061575348396`*^9, 3.4813061668159704`*^9}, 3.4813062421118817`*^9, 3.4813062726896152`*^9, {3.481306358922887*^9, 3.481306400750476*^9}, {3.481306526514491*^9, 3.4813065369518576`*^9}, { 3.4813065678420877`*^9, 3.481306572404529*^9}, 3.481306608185321*^9, { 3.4813066523878803`*^9, 3.481306668168928*^9}, {3.481306704777835*^9, 3.4813067154651976`*^9}, 3.481306939040461*^9, {3.4813069856961136`*^9, 3.4813069858836117`*^9}, 3.481307054163987*^9, {3.481307101772753*^9, 3.4813071138350983`*^9}, {3.481307407643838*^9, 3.4813077466394987`*^9}, { 3.4813077909826813`*^9, 3.48130781959169*^9}, {3.4813078599192986`*^9, 3.481307957918044*^9}, {3.481308040010743*^9, 3.481308046416911*^9}, 3.4813080794633636`*^9, 3.4813081524936786`*^9, {3.481308210524186*^9, 3.481308338163177*^9}, 3.4813083718189964`*^9, {3.4813085571447487`*^9, 3.481308586503748*^9}, {3.4813086184408393`*^9, 3.481308738251806*^9}, { 3.481308930858715*^9, 3.4813091517777624`*^9}, {3.4813091950740833`*^9, 3.481309202620862*^9}, {3.4813099727203794`*^9, 3.4813100351414557`*^9}, { 3.4813100751096935`*^9, 3.4813101295777464`*^9}, {3.481310159749235*^9, 3.4813101717647066`*^9}, {3.4813102025768123`*^9, 3.481310210326713*^9}, { 3.4813102772946057`*^9, 3.4813103037630167`*^9}, {3.4813103642778673`*^9, 3.4813104031523695`*^9}, {3.4813110125508194`*^9, 3.48131103905048*^9}, { 3.4813110842686515`*^9, 3.4813111395023193`*^9}, {3.4813117891346292`*^9, 3.481311813509317*^9}, {3.4813118455401573`*^9, 3.481311848555743*^9}, { 3.481311983491516*^9, 3.481311996303852*^9}, {3.481312245331915*^9, 3.481312262878565*^9}, {3.4813124766258287`*^9, 3.4813124780789356`*^9}, { 3.481312562234108*^9, 3.4813125631559715`*^9}, {3.481313376067441*^9, 3.4813133832704735`*^9}, {3.4813140008563185`*^9, 3.4813141425888796`*^9}, {3.481314173932228*^9, 3.4813141780571756`*^9}, { 3.481314220525382*^9, 3.4813142451031923`*^9}, {3.4813143191022453`*^9, 3.481314320055358*^9}, {3.481314353383056*^9, 3.481314360445466*^9}, { 3.4813144028980474`*^9, 3.481314405194893*^9}, {3.4813144915531626`*^9, 3.4813145915675077`*^9}, {3.4813146929724593`*^9, 3.481314706347288*^9}, { 3.4813148354706354`*^9, 3.4813148468611145`*^9}, {3.4813157963547544`*^9, 3.4813158533558493`*^9}, {3.481315901981783*^9, 3.481315960669737*^9}, { 3.481316084544737*^9, 3.481316093107237*^9}, {3.481316151857237*^9, 3.481316184232237*^9}, {3.481316289559544*^9, 3.481316322527872*^9}, { 3.4813163535431004`*^9, 3.481316372355359*^9}, {3.481316418932888*^9, 3.481316420276621*^9}, {3.4813164900569777`*^9, 3.481316570165327*^9}, { 3.48131666333601*^9, 3.481316718241557*^9}, 3.4813167995217667`*^9, { 3.4813168815207167`*^9, 3.4813168975517616`*^9}, {3.4813169714570656`*^9, 3.481316996425496*^9}, {3.4813170544403787`*^9, 3.481317077674456*^9}, { 3.481317108767808*^9, 3.4813171147208567`*^9}, {3.481317148236053*^9, 3.481317162079626*^9}, {3.4813172156883144`*^9, 3.4813172161570587`*^9}, { 3.4813172564065437`*^9, 3.4813172577815256`*^9}, {3.481317415967001*^9, 3.4813174182013474`*^9}, {3.481318095723925*^9, 3.481318181488452*^9}, 3.481318284596507*^9, {3.481318343611377*^9, 3.4813184077043066`*^9}, { 3.481318575702156*^9, 3.481318581561456*^9}, {3.4813186265921297`*^9, 3.4813186395294642`*^9}, {3.481319531174301*^9, 3.4813195706269207`*^9}, { 3.4813301870935183`*^9, 3.481330195575715*^9}, {3.481330234031011*^9, 3.481330240229925*^9}, {3.4813303413653507`*^9, 3.481330348635805*^9}, 3.481381740593504*^9, {3.48138186256188*^9, 3.4813818701868315`*^9}, 3.4814015869376*^9, {3.481405450326758*^9, 3.4814055598442364`*^9}, { 3.4814056617908287`*^9, 3.481405789714774*^9}, {3.4814058901191483`*^9, 3.4814059033681993`*^9}, {3.481405941803467*^9, 3.481405984975545*^9}, { 3.481406077548659*^9, 3.481406079601611*^9}, 3.481406131906822*^9, { 3.4814061894595785`*^9, 3.4814061927543163`*^9}, {3.481406239131003*^9, 3.481406257597556*^9}, {3.481406398980856*^9, 3.481406411659086*^9}, { 3.4814064803979273`*^9, 3.481406480728403*^9}, {3.481406518092129*^9, 3.4814066497113886`*^9}, {3.4814066834098444`*^9, 3.48140673647615*^9}, { 3.481408508784604*^9, 3.4814085588966618`*^9}, {3.481408601387761*^9, 3.481408603090209*^9}, {3.4814086420261965`*^9, 3.4814087494506655`*^9}, { 3.4814087986514125`*^9, 3.481408857345811*^9}, {3.4814089003977165`*^9, 3.4814089629676876`*^9}, 3.4814131600728283`*^9, 3.4814132208702507`*^9, { 3.4814132796547785`*^9, 3.481413291952462*^9}, {3.481413334613806*^9, 3.481413495364955*^9}, {3.4814135595772877`*^9, 3.4814136320014286`*^9}, { 3.4814137487793465`*^9, 3.481413779022835*^9}, {3.481414435946512*^9, 3.481414512348054*^9}, {3.4814148679674177`*^9, 3.48141493700995*^9}, { 3.481415020183816*^9, 3.4814150755877504`*^9}, {3.481415141352315*^9, 3.481415154190776*^9}, {3.4814151844943504`*^9, 3.4814152094502354`*^9}, { 3.481415278549595*^9, 3.4814152928501587`*^9}, {3.481415420553787*^9, 3.4814154999078927`*^9}, {3.481415562497893*^9, 3.481415584309256*^9}, { 3.481415703060011*^9, 3.481415703450573*^9}, 3.4814158990017614`*^9, { 3.4814171364611406`*^9, 3.4814171462952814`*^9}, {3.481424072987533*^9, 3.4814241197147236`*^9}, {3.4814832782005634`*^9, 3.4814832867829046`*^9}, 3.4816703314238143`*^9, {3.481670369408434*^9, 3.4816704575852256`*^9}, { 3.4816706146811185`*^9, 3.4816707845954432`*^9}, {3.4816708405859537`*^9, 3.481670920480837*^9}, {3.4816709715042048`*^9, 3.4816709719949102`*^9}, { 3.4816711094525647`*^9, 3.4816711098431263`*^9}, {3.4816711965377874`*^9, 3.481671238237749*^9}, {3.4816713148579235`*^9, 3.481671340214384*^9}, { 3.4816713745737906`*^9, 3.4816716260353746`*^9}, {3.481671755331293*^9, 3.481671785134147*^9}, {3.4816718832952957`*^9, 3.4816719397865267`*^9}, 3.4816719758984528`*^9, {3.481673176244466*^9, 3.4816732875745506`*^9}, 3.4816733183988733`*^9, {3.481673362101715*^9, 3.4816733707441425`*^9}, 3.481673653340496*^9, {3.4816745940231314`*^9, 3.4816746022149105`*^9}, { 3.4817346006152563`*^9, 3.481734607925768*^9}, 3.481735615579771*^9, { 3.481735646874771*^9, 3.4817356922600317`*^9}, 3.4817357345808864`*^9, 3.4817357949476895`*^9, {3.481735861463334*^9, 3.4817358750528755`*^9}, { 3.4817359228315773`*^9, 3.481735925495408*^9}, {3.4817374335538893`*^9, 3.4817374686543617`*^9}, {3.4817375128579235`*^9, 3.4817375183257856`*^9}, {3.481812891450633*^9, 3.481812899642412*^9}, 3.481812942794462*^9, 3.4818349201208076`*^9, {3.482098521470656*^9, 3.4820985290114994`*^9}, {3.4888030563125*^9, 3.488803075015625*^9}, { 3.507209279970834*^9, 3.5072092822240734`*^9}, {3.5079818150489316`*^9, 3.5079818286434793`*^9}, {3.5212044815394397`*^9, 3.521204514042299*^9}, { 3.5397199809372253`*^9, 3.539719985117756*^9}, {3.5398577932252765`*^9, 3.5398578158685713`*^9}, {3.5398578871726503`*^9, 3.5398579091269054`*^9}, {3.565001819786562*^9, 3.565001820377301*^9}, { 3.571744193063739*^9, 3.571744197092472*^9}}, CellTags->{"buttoncell", "corecell", "notopen"}], Cell[BoxData[ TagBox[GridBox[{ { StyleBox[ ButtonBox["Replicator", Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_meandynamic", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"dyn:=", ToBoxes[$CellContext`Replicator], ";"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False], StyleBox[ ButtonBox["BR", Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_meandynamic", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"dyn:=", ToBoxes[$CellContext`BR], ";"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False], StyleBox[ ButtonBox[ RowBox[{"Logit", "[", "eta", "]"}], Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_meandynamic", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"dyn:=", ToBoxes[ Defer[ $CellContext`Logit[$CellContext`eta]]], ";"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False]}, { StyleBox[ ButtonBox["MSReplicator", Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_meandynamic", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"dyn:=", ToBoxes[$CellContext`MSReplicator], ";"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False], StyleBox[ ButtonBox[ RowBox[{"TemperedBR", "[", "tQ", "]"}], Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_meandynamic", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"dyn:=", ToBoxes[ $CellContext`TemperedBR[$CellContext`tQ]], ";"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False], StyleBox[ ButtonBox["BNN", Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_meandynamic", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"dyn:=", ToBoxes[$CellContext`BNN], ";"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False]}, { StyleBox[ ButtonBox[ RowBox[{"ILogit", "[", "eta", "]"}], Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_meandynamic", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"dyn:=", ToBoxes[ Defer[ $CellContext`ILogit[$CellContext`eta]]], ";"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False], StyleBox[ ButtonBox[ RowBox[{"SampleBR", "[", "k", "]"}], Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_meandynamic", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"dyn:=", ToBoxes[ Defer[ $CellContext`SampleBR[$CellContext`k]]], ";"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False], StyleBox[ ButtonBox["Smith", Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_meandynamic", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"dyn:=", ToBoxes[$CellContext`Smith], ";"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Top}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Function[BoxForm`e$, TableForm[ BoxForm`e$, TableAlignments -> {Left, Top}, TableSpacing -> {1, 1}]]]], "Output", Evaluatable->False, CellOpen->True, CellChangeTimes->{3.571744214010701*^9}, CellTags->{"buttoncell", "corecell", "notopen"}] }, {2}]] }, Open ]], Cell[CellGroupData[{ Cell["More dynamics", "Subsection", CellChangeTimes->{{3.481894707891967*^9, 3.4818947086630754`*^9}, { 3.4818947430525255`*^9, 3.4818947437935905`*^9}}, CellTags->"corecell"], Cell["\<\ If you use SelMut[MM], enter the mutation matrix MM in its closed group. \ ExcessPayoff , PairwiseComparison, Combined, and Other must be specified in \ greater detail below.\ \>", "Text", CellChangeTimes->{ 3.4747151313883057`*^9, 3.474715257539703*^9, 3.4812474147760963`*^9, 3.4812474492912793`*^9, {3.481416554834803*^9, 3.48141681718204*^9}, { 3.4814168565586605`*^9, 3.481416945035885*^9}, {3.4814169932752495`*^9, 3.481416994306733*^9}, {3.481487401447174*^9, 3.481487410144681*^9}, { 3.481488265581498*^9, 3.481488269712858*^9}, {3.5072092451307364`*^9, 3.5072092562867775`*^9}, {3.510068899782366*^9, 3.510068960429554*^9}, { 3.510068997384774*^9, 3.510069019289111*^9}}, FontFamily->"Palatino", CellTags->"corecell"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"matrixButtons", "[", "rowsize_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "namesl", ",", "matsl", ",", "names", " ", ",", "buttons", ",", "row", ",", "butrow", ",", "rown", ",", "name", ",", "but", ",", "button"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"namesl", " ", "=", " ", RowBox[{"{", RowBox[{ RowBox[{"Defer", "[", RowBox[{"SelMut", "[", "MM", "]"}], "]"}], ",", "ExcessPayoff", ",", "PairwiseComparison", StyleBox[",", FontWeight->"Plain"], "Project", StyleBox[",", FontWeight->"Plain"], "Combined", StyleBox[",", FontWeight->"Plain"], "Other"}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"names", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"rown", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"row", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{"row", "<=", RowBox[{ RowBox[{"Dimensions", "[", "namesl", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"rown", "=", RowBox[{"Join", "[", RowBox[{"rown", ",", RowBox[{"{", RowBox[{"namesl", "[", RowBox[{"[", "row", "]"}], "]"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"Or", "[", RowBox[{ RowBox[{"IntegerQ", "[", RowBox[{"row", "/", "rowsize"}], "]"}], ",", RowBox[{"row", "==", RowBox[{ RowBox[{"Dimensions", "[", "namesl", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"names", "=", RowBox[{"Join", "[", RowBox[{"names", ",", RowBox[{"{", "rown", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"rown", "=", RowBox[{"{", "}"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"row", "++"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"buttons", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"row", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{"row", "<=", RowBox[{ RowBox[{"Dimensions", "[", "names", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"butrow", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"but", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", " ", RowBox[{ RowBox[{"but", "<=", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"names", "[", RowBox[{"[", "row", "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"button", ":=", "\[IndentingNewLine]", RowBox[{"Button", "[", RowBox[{"name", ",", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{ "NotebookLocate", "[", "\"\\"", "]"}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", "\"\\"", ",", "Next", ",", "CellTags", ",", RowBox[{"AutoScroll", "->", "False"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"SelectionMove", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", "All", ",", "CellContents", ",", RowBox[{"AutoScroll", "->", "False"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"NotebookWrite", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", RowBox[{"RowBox", "[", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"ToBoxes", "[", "name", "]"}], ",", "\"\<;\>\""}], "}"}], "]"}], ",", RowBox[{"AutoScroll", "->", "False"}]}], "]"}], ";"}]}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{",", RowBox[{"ImageSize", "\[Rule]", RowBox[{"{", RowBox[{"100", ",", "30"}], "}"}]}]}], "*)"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"button", "=", RowBox[{ RowBox[{"Style", "[", RowBox[{"button", ",", RowBox[{"ControlsRendering", "\[Rule]", "\"\\""}]}], "]"}], "/.", RowBox[{"name", "->", RowBox[{ RowBox[{"names", "[", RowBox[{"[", "row", "]"}], "]"}], "[", RowBox[{"[", "but", "]"}], "]"}]}]}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"butrow", "=", RowBox[{"Join", "[", RowBox[{"butrow", ",", RowBox[{"{", RowBox[{ RowBox[{"Row", "[", RowBox[{"{", "\"\< \>\"", "}"}], "]"}], ",", "button"}], "}"}]}], "]"}]}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{"butrow", "=", RowBox[{"Join", "[", RowBox[{"butrow", ",", RowBox[{"{", "button", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"but", "++"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"buttons", "=", RowBox[{"Join", "[", RowBox[{"buttons", ",", RowBox[{"{", "butrow", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"row", "++"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"TableForm", "[", RowBox[{"buttons", ",", RowBox[{"TableAlignments", "->", RowBox[{"{", RowBox[{"Left", ",", "Top"}], "}"}]}], ",", RowBox[{"TableSpacing", "\[Rule]", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}]}]}], "]"}]}]}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Column", "[", "buttons", "]"}], "*)"}], "\[IndentingNewLine]", "]"}]}], ";"}], "\n", RowBox[{"matrixButtons", "[", "6", "]"}]}], "Input", Evaluatable->False, CellOpen->False, CellChangeTimes->{{3.4813040162966223`*^9, 3.4813041889350376`*^9}, { 3.481304234246958*^9, 3.481304348854866*^9}, {3.4813044130259194`*^9, 3.4813044667127323`*^9}, {3.481304497212342*^9, 3.481304516258973*^9}, { 3.481304591711132*^9, 3.481304623616974*^9}, {3.481304658444653*^9, 3.481304715787669*^9}, {3.481304754318426*^9, 3.481304856879613*^9}, { 3.481304924394374*^9, 3.481304929097439*^9}, {3.4813049637844944`*^9, 3.481305049955267*^9}, {3.481305109251383*^9, 3.4813052103282137`*^9}, { 3.4813052726867905`*^9, 3.4813054179505563`*^9}, {3.4813054936370873`*^9, 3.481305606760639*^9}, {3.481305668931719*^9, 3.4813057399464345`*^9}, { 3.4813058200547843`*^9, 3.4813059389126377`*^9}, {3.481305992286955*^9, 3.4813059950056696`*^9}, {3.4813060594423447`*^9, 3.4813061026605415`*^9}, {3.4813061575348396`*^9, 3.4813061668159704`*^9}, 3.4813062421118817`*^9, 3.4813062726896152`*^9, {3.481306358922887*^9, 3.481306400750476*^9}, {3.481306526514491*^9, 3.4813065369518576`*^9}, { 3.4813065678420877`*^9, 3.481306572404529*^9}, 3.481306608185321*^9, { 3.4813066523878803`*^9, 3.481306668168928*^9}, {3.481306704777835*^9, 3.4813067154651976`*^9}, 3.481306939040461*^9, {3.4813069856961136`*^9, 3.4813069858836117`*^9}, 3.481307054163987*^9, {3.481307101772753*^9, 3.4813071138350983`*^9}, {3.481307407643838*^9, 3.4813077466394987`*^9}, { 3.4813077909826813`*^9, 3.48130781959169*^9}, {3.4813078599192986`*^9, 3.481307957918044*^9}, {3.481308040010743*^9, 3.481308046416911*^9}, 3.4813080794633636`*^9, 3.4813081524936786`*^9, {3.481308210524186*^9, 3.481308338163177*^9}, 3.4813083718189964`*^9, {3.4813085571447487`*^9, 3.481308586503748*^9}, {3.4813086184408393`*^9, 3.481308738251806*^9}, { 3.481308930858715*^9, 3.4813091517777624`*^9}, {3.4813091950740833`*^9, 3.481309202620862*^9}, {3.4813099727203794`*^9, 3.4813100351414557`*^9}, { 3.4813100751096935`*^9, 3.4813101295777464`*^9}, {3.481310159749235*^9, 3.4813101717647066`*^9}, {3.4813102025768123`*^9, 3.481310210326713*^9}, { 3.4813102772946057`*^9, 3.4813103037630167`*^9}, {3.4813103642778673`*^9, 3.4813104031523695`*^9}, {3.4813110125508194`*^9, 3.48131103905048*^9}, { 3.4813110842686515`*^9, 3.4813111395023193`*^9}, {3.4813117891346292`*^9, 3.481311813509317*^9}, {3.4813118455401573`*^9, 3.481311848555743*^9}, { 3.481311983491516*^9, 3.481311996303852*^9}, {3.481312245331915*^9, 3.481312262878565*^9}, {3.4813124766258287`*^9, 3.4813124780789356`*^9}, { 3.481312562234108*^9, 3.4813125631559715`*^9}, {3.481313376067441*^9, 3.4813133832704735`*^9}, {3.4813140008563185`*^9, 3.4813141425888796`*^9}, {3.481314173932228*^9, 3.4813141780571756`*^9}, { 3.481314220525382*^9, 3.4813142451031923`*^9}, {3.4813143191022453`*^9, 3.481314320055358*^9}, {3.481314353383056*^9, 3.481314360445466*^9}, { 3.4813144028980474`*^9, 3.481314405194893*^9}, {3.4813144915531626`*^9, 3.4813145915675077`*^9}, {3.4813146929724593`*^9, 3.481314706347288*^9}, { 3.4813148354706354`*^9, 3.4813148468611145`*^9}, {3.4813157963547544`*^9, 3.4813158533558493`*^9}, {3.481315901981783*^9, 3.481315960669737*^9}, { 3.481316084544737*^9, 3.481316093107237*^9}, {3.481316151857237*^9, 3.481316184232237*^9}, {3.481316289559544*^9, 3.481316322527872*^9}, { 3.4813163535431004`*^9, 3.481316372355359*^9}, {3.481316418932888*^9, 3.481316420276621*^9}, {3.4813164900569777`*^9, 3.481316570165327*^9}, { 3.48131666333601*^9, 3.481316718241557*^9}, 3.4813167995217667`*^9, { 3.4813168815207167`*^9, 3.4813168975517616`*^9}, {3.4813169714570656`*^9, 3.481316996425496*^9}, {3.4813170544403787`*^9, 3.481317077674456*^9}, { 3.481317108767808*^9, 3.4813171147208567`*^9}, {3.481317148236053*^9, 3.481317162079626*^9}, {3.4813172156883144`*^9, 3.4813172161570587`*^9}, { 3.4813172564065437`*^9, 3.4813172577815256`*^9}, {3.481317415967001*^9, 3.4813174182013474`*^9}, {3.481318095723925*^9, 3.481318181488452*^9}, 3.481318284596507*^9, {3.481318343611377*^9, 3.4813184077043066`*^9}, { 3.481318575702156*^9, 3.481318581561456*^9}, {3.4813186265921297`*^9, 3.4813186395294642`*^9}, {3.481319531174301*^9, 3.4813195706269207`*^9}, { 3.4813301870935183`*^9, 3.481330195575715*^9}, {3.481330234031011*^9, 3.481330240229925*^9}, {3.4813303413653507`*^9, 3.481330348635805*^9}, 3.481381740593504*^9, {3.48138186256188*^9, 3.4813818701868315`*^9}, 3.4814015869376*^9, {3.481405450326758*^9, 3.4814055598442364`*^9}, { 3.4814056617908287`*^9, 3.481405789714774*^9}, {3.4814058901191483`*^9, 3.4814059033681993`*^9}, {3.481405941803467*^9, 3.481405984975545*^9}, { 3.481406077548659*^9, 3.481406079601611*^9}, 3.481406131906822*^9, { 3.4814061894595785`*^9, 3.4814061927543163`*^9}, {3.481406239131003*^9, 3.481406257597556*^9}, {3.481406398980856*^9, 3.481406411659086*^9}, { 3.4814064803979273`*^9, 3.481406480728403*^9}, {3.481406518092129*^9, 3.4814066497113886`*^9}, {3.4814066834098444`*^9, 3.48140673647615*^9}, { 3.481408508784604*^9, 3.4814085588966618`*^9}, {3.481408601387761*^9, 3.481408603090209*^9}, {3.4814086420261965`*^9, 3.4814087494506655`*^9}, { 3.4814087986514125`*^9, 3.481408857345811*^9}, {3.4814089003977165`*^9, 3.4814089629676876`*^9}, 3.4814131600728283`*^9, 3.4814132208702507`*^9, { 3.4814132796547785`*^9, 3.481413291952462*^9}, {3.481413334613806*^9, 3.481413495364955*^9}, {3.4814135595772877`*^9, 3.4814136320014286`*^9}, { 3.4814137487793465`*^9, 3.481413779022835*^9}, {3.481414435946512*^9, 3.481414512348054*^9}, {3.4814148679674177`*^9, 3.48141493700995*^9}, { 3.481415020183816*^9, 3.4814150755877504`*^9}, {3.481415141352315*^9, 3.481415154190776*^9}, {3.4814151844943504`*^9, 3.4814152094502354`*^9}, { 3.481415278549595*^9, 3.4814152928501587`*^9}, {3.481415420553787*^9, 3.4814154999078927`*^9}, {3.481415562497893*^9, 3.481415584309256*^9}, { 3.481415703060011*^9, 3.481415703450573*^9}, 3.4814158990017614`*^9, { 3.4814171364611406`*^9, 3.4814171462952814`*^9}, {3.481424072987533*^9, 3.4814241197147236`*^9}, {3.4814832782005634`*^9, 3.4814832867829046`*^9}, 3.4816703314238143`*^9, {3.481670369408434*^9, 3.4816704575852256`*^9}, { 3.4816706146811185`*^9, 3.4816707845954432`*^9}, {3.4816708405859537`*^9, 3.481670920480837*^9}, {3.4816709715042048`*^9, 3.4816709719949102`*^9}, { 3.4816711094525647`*^9, 3.4816711098431263`*^9}, {3.4816711965377874`*^9, 3.481671238237749*^9}, {3.4816713148579235`*^9, 3.481671340214384*^9}, { 3.4816713745737906`*^9, 3.4816716260353746`*^9}, {3.481671755331293*^9, 3.481671785134147*^9}, {3.4816718832952957`*^9, 3.4816719397865267`*^9}, 3.4816719758984528`*^9, {3.481673176244466*^9, 3.4816732875745506`*^9}, 3.4816733183988733`*^9, {3.481673362101715*^9, 3.4816733707441425`*^9}, 3.481673653340496*^9, {3.4816745940231314`*^9, 3.4816746022149105`*^9}, { 3.4817346006152563`*^9, 3.481734607925768*^9}, 3.481735615579771*^9, { 3.481735646874771*^9, 3.4817356922600317`*^9}, 3.4817357345808864`*^9, 3.4817357949476895`*^9, {3.481735861463334*^9, 3.4817358750528755`*^9}, { 3.4817359228315773`*^9, 3.481735925495408*^9}, {3.4817374335538893`*^9, 3.4817374686543617`*^9}, {3.4817375128579235`*^9, 3.4817375183257856`*^9}, {3.48173788035636*^9, 3.4817378961991405`*^9}, { 3.48181290093427*^9, 3.481812907393558*^9}, 3.4818129433953257`*^9, 3.481834931817627*^9, {3.5079818552317114`*^9, 3.5079818681052227`*^9}, 3.5159566645764713`*^9, {3.539720022182963*^9, 3.5397200233196073`*^9}, { 3.5399894370242977`*^9, 3.5399894376143312`*^9}, 3.539990020684681*^9, { 3.56500182217855*^9, 3.565001822891805*^9}, 3.569281786970988*^9, 3.571923885957523*^9}, CellTags->{"buttoncell", "corecell", "notopen"}], Cell[BoxData[ TagBox[GridBox[{ { StyleBox[ ButtonBox[ RowBox[{"SelMut", "[", "MM", "]"}], Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_meandynamic", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"dyn:=", ToBoxes[ Defer[ $CellContext`SelMut[$CellContext`MM]]], ";"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False], StyleBox[ ButtonBox["ExcessPayoff", Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_meandynamic", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"dyn:=", ToBoxes[$CellContext`ExcessPayoff], ";"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False], StyleBox[ ButtonBox["PairwiseComparison", Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_meandynamic", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"dyn:=", ToBoxes[$CellContext`PairwiseComparison], ";"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False], StyleBox[ ButtonBox["Project", Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_meandynamic", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"dyn:=", ToBoxes[$CellContext`Project], ";"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False], StyleBox[ ButtonBox["Combined", Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_meandynamic", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"dyn:=", ToBoxes[$CellContext`Combined], ";"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False], StyleBox[ ButtonBox["Other", Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_meandynamic", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], RowBox[{"dyn:=", ToBoxes[$CellContext`Other], ";"}], AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Top}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Function[BoxForm`e$, TableForm[ BoxForm`e$, TableAlignments -> {Left, Top}, TableSpacing -> {1, 1}]]]], "Output", Evaluatable->False, CellOpen->True, CellChangeTimes->{3.539989534708885*^9, 3.539990031998328*^9, 3.56928179522809*^9, 3.571923897107588*^9}, CellTags->{"buttoncell", "corecell", "notopen"}] }, {2}]] }, Closed]], Cell["dyn := Replicator;", "Input", CellChangeTimes->{ 3.4747151336315317`*^9, {3.479671025083769*^9, 3.479671037201193*^9}, 3.479723589112198*^9, {3.4797237898408318`*^9, 3.479723791903798*^9}, { 3.479809813293728*^9, 3.479809816578451*^9}, 3.480780465926387*^9, { 3.4807847095625095`*^9, 3.480784719531005*^9}, {3.4807850623347287`*^9, 3.480785065412775*^9}, 3.480786382988419*^9, {3.4807870413153152`*^9, 3.4807870445964813`*^9}, {3.480865675367506*^9, 3.480865713945631*^9}, { 3.480868633586256*^9, 3.480868633586256*^9}, {3.480921736302143*^9, 3.4809217417083583`*^9}, {3.4809443688539295`*^9, 3.4809443688539295`*^9}, {3.4809449674594736`*^9, 3.4809449674750986`*^9}, {3.4809480125337353`*^9, 3.4809480125337353`*^9}, {3.4809480994081793`*^9, 3.4809480994081793`*^9}, {3.480948153485958*^9, 3.480948153485958*^9}, { 3.480948201048154*^9, 3.480948224094881*^9}, {3.4809483356879168`*^9, 3.4809483356879168`*^9}, {3.481245776437692*^9, 3.481245778281419*^9}, 3.4813311917978306`*^9, {3.481331301245208*^9, 3.481331362282976*^9}, 3.48133141054237*^9, 3.481331704525096*^9, 3.48133226392948*^9, 3.481332322613864*^9, {3.4813326465897183`*^9, 3.481332654571195*^9}, { 3.481332864422947*^9, 3.481332870762062*^9}, 3.481334643671381*^9, 3.4813352364437456`*^9, 3.48133650683201*^9, 3.481339085923997*^9, 3.4813391332671413`*^9, 3.481339294202581*^9, 3.4813393294677544`*^9, 3.481339466606624*^9, {3.481408817438427*^9, 3.4814088203526173`*^9}, 3.4814158381142097`*^9, {3.4814174163435917`*^9, 3.481417434539757*^9}, 3.481417503889477*^9, 3.48141754447784*^9, 3.481417590974699*^9, 3.4814186554954047`*^9, 3.481735482813795*^9, 3.4817378513146*^9, { 3.4817379157172065`*^9, 3.481737963596053*^9}, 3.481834851442053*^9, { 3.4818349125399075`*^9, 3.4818349355529985`*^9}, 3.481834975600584*^9, 3.4818957324151587`*^9, 3.4885769010622663`*^9, 3.4888031126875*^9, 3.491929508635909*^9, 3.4922031282706842`*^9, 3.4922764082392645`*^9, 3.4922824415838757`*^9, 3.4922875023669925`*^9, 3.4925108639801025`*^9, 3.492636904285307*^9, 3.492826830290763*^9, 3.4928274169142866`*^9, 3.4928281630471725`*^9, 3.493217695332925*^9, 3.4932688627230606`*^9, 3.4932693681298*^9, 3.4932704825322323`*^9, 3.506172887669325*^9, 3.5061732496798706`*^9, 3.507209558260995*^9, 3.508020054195327*^9, 3.5080246645304146`*^9, 3.508778680954258*^9, 3.508780220277696*^9, 3.5087809839057393`*^9, 3.508784813507504*^9, 3.508786241130325*^9, 3.5087863364173408`*^9, 3.5087863839076953`*^9, {3.5087864746311502`*^9, 3.5087864967930174`*^9}, 3.50878903521885*^9, 3.508789074845831*^9, 3.508789880824772*^9, 3.5087899113286343`*^9, 3.50879043101197*^9, 3.508790484378708*^9, 3.508796159128869*^9, 3.508796224572973*^9, { 3.508796256138362*^9, 3.5087962611856194`*^9}, 3.508796367438403*^9, 3.508796398106969*^9, 3.5087964362548323`*^9, 3.5087966727223377`*^9, 3.508796740680056*^9, 3.5087967995004683`*^9, 3.5087968983216023`*^9, 3.50879695844806*^9, 3.5091978438765*^9, 3.510066461404035*^9, 3.510067022619776*^9, 3.510067795770535*^9, 3.510069666333312*^9, 3.5100697616202602`*^9, {3.5106906587922993`*^9, 3.510690660875294*^9}, 3.5109250599235897`*^9, 3.510925122094789*^9, 3.510942139098502*^9, 3.5110101245970125`*^9, 3.515954624118764*^9, 3.5159566822384815`*^9, { 3.515957598123867*^9, 3.5159576147448177`*^9}, 3.515959791607327*^9, 3.516038230691786*^9, 3.516039285052092*^9, 3.5160393255744095`*^9, 3.516046363827975*^9, 3.5160464231643686`*^9, 3.516214795529269*^9, 3.51621505953937*^9, {3.516218211903675*^9, 3.5162182338229284`*^9}, 3.516276157700075*^9, 3.516385999001933*^9, 3.5163871324767647`*^9, 3.5193824611572075`*^9, 3.519383154433861*^9, 3.51946122489705*^9, 3.5210513285766444`*^9, 3.5211505633741035`*^9, 3.5211512152843904`*^9, { 3.5212045522234826`*^9, 3.5212045793060317`*^9}, 3.539459243404354*^9, 3.539619741965366*^9, {3.539720026994574*^9, 3.5397200292448597`*^9}, 3.539858528928356*^9, {3.539859054493417*^9, 3.5398590782477756`*^9}, 3.5398608286748943`*^9, 3.539860986459919*^9, 3.5398610940120707`*^9, 3.5398635490844927`*^9, 3.5398801709392085`*^9, 3.5398823312351027`*^9, 3.539956499903049*^9, 3.5586469889090347`*^9, 3.5586471105989947`*^9, 3.5586576801305375`*^9, 3.558658422507999*^9, {3.564994956704752*^9, 3.564994968155257*^9}, {3.569281818646645*^9, 3.569281822557501*^9}, { 3.56974636918394*^9, 3.56974637231166*^9}, 3.571736305606978*^9, 3.571736353822997*^9, 3.571742253744357*^9, 3.571742337807451*^9, 3.571742400669279*^9, 3.571742555155597*^9, 3.571742681290574*^9, 3.571742930666734*^9, 3.571743067217698*^9, 3.571743397051417*^9, { 3.571743479024894*^9, 3.571743486525066*^9}, 3.571744215983196*^9, 3.571744626294594*^9, 3.571823500765821*^9, 3.571824463565113*^9, { 3.571923911302323*^9, 3.57192391866738*^9}, 3.572107890690975*^9, 3.572108369153263*^9, 3.572110038254891*^9, 3.57211714715719*^9, 3.572121428991443*^9, 3.572171985728616*^9, 3.572172382558275*^9, 3.572816501243387*^9, 3.572963272922364*^9, 3.572964172991434*^9, 3.572966102723506*^9}, CellTags->{"corecell", "unique_meandynamic"}], Cell[CellGroupData[{ Cell["Noise level for logit dynamics", "SmallText", CellChangeTimes->{{3.4928274343894143`*^9, 3.4928274354409266`*^9}, { 3.510069060898769*^9, 3.510069069386961*^9}}, CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{"eta", " ", "=", " ", ".1"}], ";"}]], "Input", CellChangeTimes->{{3.480865595226881*^9, 3.480865595461256*^9}, 3.493217709107732*^9, 3.5072093234133005`*^9, 3.5087890592133527`*^9, { 3.5193824682636137`*^9, 3.519382495479171*^9}, {3.519382892480878*^9, 3.519382892970906*^9}, 3.519383145977377*^9, 3.5396890622639217`*^9}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Sample size for the sample best response dynamic", "SmallText", CellChangeTimes->{{3.479723492252921*^9, 3.47972353833919*^9}, { 3.481894792974309*^9, 3.481894823938834*^9}, {3.5100690760763607`*^9, 3.5100690804039583`*^9}}, CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{"k", " ", "=", " ", "2"}], ";"}]], "Input", CellChangeTimes->{{3.4797235751220813`*^9, 3.4797235774754653`*^9}, 3.4798097927141356`*^9, 3.480791134913642*^9, {3.4807930226309395`*^9, 3.480793033474412*^9}, 3.4808020723992596`*^9, {3.480921321507923*^9, 3.4809213294609966`*^9}, {3.4809214148667*^9, 3.480921437897803*^9}, { 3.481247722678405*^9, 3.4812477230221505`*^9}}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Transformation function for Tempered dynamics", "SmallText", CellChangeTimes->{{3.479723492252921*^9, 3.47972353833919*^9}, { 3.481894792974309*^9, 3.481894823938834*^9}, {3.5100690760763607`*^9, 3.5100690804039583`*^9}, {3.571744106147612*^9, 3.571744144592348*^9}}, CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"tQ", "[", "x_", "]"}], ":=", "x"}], ";"}]], "Input", CellChangeTimes->{{3.4797235751220813`*^9, 3.4797235774754653`*^9}, 3.4798097927141356`*^9, 3.480791134913642*^9, {3.4807930226309395`*^9, 3.480793033474412*^9}, 3.4808020723992596`*^9, {3.480921321507923*^9, 3.4809213294609966`*^9}, {3.4809214148667*^9, 3.480921437897803*^9}, { 3.481247722678405*^9, 3.4812477230221505`*^9}, {3.571744122598092*^9, 3.571744164103506*^9}, {3.571744209320702*^9, 3.571744209546624*^9}}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[StyleBox["Matrix of mutation rates for the selection-mutation \ dynamic", FontSlant->"Italic"]], "SmallText", CellTags->"corecell"], Cell[TextData[{ StyleBox["Entry ij of the matrix ", FontFamily->"Palatino"], StyleBox["MM", FontFamily->"Palatino", FontWeight->"Bold"], StyleBox[" is the probability of a mutation from i to j \[NotEqual] i; entry \ ii is the probability of no mutation from i. The rows of M must sum to one. \ Note that the selection-mutation dynamic is only well defined for nonnegative \ payoffs, and that it is not invariant to the addition of a constant to all \ matrix entries.", FontFamily->"Palatino"] }], "Text", CellChangeTimes->{{3.569015923721744*^9, 3.569015927913449*^9}, 3.571923827037191*^9}, CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{"MM", "=", RowBox[{"(", GridBox[{ {"1", "0", "0", "0"}, {"0", "1", "0", "0"}, {"0", "0", "1", "0"}, {"0", "0", "0", "1"} }], ")"}]}], " ", ";"}]], "Input", CellChangeTimes->{3.569015921249585*^9, 3.571923823590452*^9, 3.580470431201236*^9}, CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[BoxData[ RowBox[{ RowBox[{"dyn", "=", "dyn"}], ";"}]], "Input", CellOpen->False, CellChangeTimes->{{3.4818348627583246`*^9, 3.481834865722587*^9}, 3.5087883666675205`*^9, 3.5087886890711145`*^9}, CellTags->{"corecell", "notopen"}], Cell[TextData[{ "If the dynamic you consider has a nontrivial component of rest points, the \ program will compute and plot a random subset of this components. If you set \ ", StyleBox["findrestpoints", FontWeight->"Bold"], " equal to 0, the computation and plotting is skipped." }], "Text", CellChangeTimes->{ 3.539689203810927*^9, {3.5396892420543947`*^9, 3.539689245793154*^9}}, FontFamily->"Palatino", CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{"findrestpoints", "=", "1"}], ";"}]], "Input", CellChangeTimes->{ 3.4796710551269693`*^9, 3.4798098208245564`*^9, {3.480789604765314*^9, 3.4807896051559296`*^9}, 3.480859029773756*^9, {3.510658336300294*^9, 3.5106583475248475`*^9}, {3.5106633114493513`*^9, 3.510663311789841*^9}, { 3.5402194933686533`*^9, 3.5402194935874233`*^9}}, CellTags->"corecell"], Cell[CellGroupData[{ Cell["Definition of combination of two dynamics", "Subsubsection", CellTags->"corecell"], Cell["\<\ To define a combination of two dynamics, specify the two dynamics to be \ combined, the weights on the dynamics, and the characterization of the rest \ points of the combined dynamic. \"Nash\" is the default setting for the set \ or rest points. This is correct, for example, with combinations of the \ replicator dynamic and an excess payoff dynamic like the BNN dynamic. If the \ rest points aren't identical to the Nash equilibria for the dynamics you have \ specified, you can replace \"Nash\" with \"Automatic\" if the combined \ dynamic is continuous. (If the combined dynamic isn't continuous, you're on \ your own!) The last line of code formally defines the combined dynamic \ according to your specifications.\ \>", "Text", CellChangeTimes->{ 3.493300988179451*^9, {3.50802480672488*^9, 3.5080248083171697`*^9}, { 3.5080248595107822`*^9, 3.5080248667011213`*^9}, {3.539689249156068*^9, 3.539689249569701*^9}, {3.539689315756028*^9, 3.539689323781044*^9}}, FontFamily->"Palatino", CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"dyn", "[", "1", "]"}], "=", "Replicator"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"dyn", "[", "2", "]"}], "=", "BNN"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"weight", "[", "1", "]"}], "=", ".9"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"weight", "[", "2", "]"}], "=", ".1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"RPCharacterization", "[", "Combined", "]"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SCharacterization", "[", "Combined", "]"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Combined", "[", RowBox[{"x_", ",", "F_"}], "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"weight", "[", "1", "]"}], RowBox[{ RowBox[{"dyn", "[", "1", "]"}], "[", RowBox[{"x", ",", "F"}], "]"}]}], "+", RowBox[{ RowBox[{"weight", "[", "2", "]"}], " ", RowBox[{ RowBox[{"dyn", "[", "2", "]"}], "[", RowBox[{"x", ",", "F"}], "]"}]}]}]}], ";"}]}], "Input", CellChangeTimes->{ 3.508024885438064*^9, {3.569141777150486*^9, 3.569141777461385*^9}, { 3.56914184636547*^9, 3.569141860280595*^9}, {3.569141895175843*^9, 3.569141904544224*^9}, {3.569318930730113*^9, 3.569318942278207*^9}}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Definitions of dynamics", "Subsubsection", CellTags->"corecell"], Cell[CellGroupData[{ Cell["Replicator Dynamic", "SmallText", CellChangeTimes->{{3.480868612711256*^9, 3.480868614055006*^9}}, CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"Replicator", "[", RowBox[{"x_", ",", "F_"}], "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], " ", RowBox[{ RowBox[{"Fhat", "[", RowBox[{"x", ",", "F"}], "]"}], "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.492818775148037*^9, 3.492818796899314*^9}, { 3.507983059047714*^9, 3.507983059047714*^9}, {3.50798337343478*^9, 3.507983373449802*^9}, 3.5160463593887205`*^9, 3.516046413715828*^9, { 3.569010019372249*^9, 3.569010073700499*^9}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"RPCharacterization", "[", "Replicator", "]"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SCharacterization", "[", "Replicator", "]"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"AOCharacterization", "[", "Replicator", "]"}], "=", "False"}], ";"}]}], "Input", CellChangeTimes->{ 3.4925217796360445`*^9, {3.4925218155376687`*^9, 3.4925218331630125`*^9}, { 3.4925482527715673`*^9, 3.492548274703103*^9}, 3.5080249342782927`*^9, { 3.508763925043623*^9, 3.508763927695613*^9}, 3.5087650526787987`*^9, 3.5195529876537256`*^9, {3.5211510056724014`*^9, 3.5211510069504747`*^9}, { 3.521151221197729*^9, 3.5211512223657956`*^9}, {3.580643075530724*^9, 3.580643142841721*^9}}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Maynard Smith Replicator Dynamic", "SmallText", CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"MSReplicator", "[", RowBox[{"x_", ",", "F_"}], "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{ FractionBox["1", RowBox[{ RowBox[{"Fbar", "[", RowBox[{"x", ",", "F"}], "]"}], "[", RowBox[{"[", "p", "]"}], "]"}]], RowBox[{ RowBox[{"Replicator", "[", RowBox[{"x", ",", "F"}], "]"}], "[", RowBox[{"[", "p", "]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.4928188439469647`*^9, 3.492818851708125*^9}, { 3.508789189871229*^9, 3.508789270166689*^9}, {3.508789317394599*^9, 3.5087893363017864`*^9}, {3.508789745630372*^9, 3.508789851182148*^9}, { 3.569010114779248*^9, 3.569010147971223*^9}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"MSReplicator", "::", "negativepayoff"}], " ", "=", " ", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"And", "[", RowBox[{ RowBox[{"dyn", "===", "MSReplicator"}], ",", RowBox[{"gamekind", "==", "NormalGame"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Min", "[", "A", "]"}], "<", "0"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"A", "=", RowBox[{"A", "-", RowBox[{"Min", "[", "A", "]"}], "+", "1"}]}], ";", "\[IndentingNewLine]", RowBox[{"Message", "[", RowBox[{"MSReplicator", "::", "negativepayoff"}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"n", ",", "points"}], "}"}], ",", RowBox[{ RowBox[{"n", "=", "40"}], ";", "\[IndentingNewLine]", RowBox[{"points", "=", RowBox[{"Tuples", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"discSimplex", "[", RowBox[{"n", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", RowBox[{ RowBox[{"While", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Apply", "[", RowBox[{"And", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Fbar", "[", RowBox[{ RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "Fmp"}], "]"}], "[", RowBox[{"[", "p", "]"}], "]"}], "\[LessEqual]", "0"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"A", "=", RowBox[{"A", "+", "1"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "points", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "Input", CellChangeTimes->{{3.4928188439469647`*^9, 3.492818851708125*^9}, { 3.508789189871229*^9, 3.508789270166689*^9}, {3.508789317394599*^9, 3.5087893363017864`*^9}, {3.508789745630372*^9, 3.508789851182148*^9}, { 3.5087916072784257`*^9, 3.508791633956787*^9}, {3.5087916915095444`*^9, 3.508791694614008*^9}, {3.569010190948711*^9, 3.56901021954338*^9}, { 3.572108438267424*^9, 3.572108438563175*^9}, {3.572111136343404*^9, 3.572111144138038*^9}, {3.572111737337091*^9, 3.572111919125928*^9}, { 3.572112045983102*^9, 3.572112068650956*^9}, {3.572112784717917*^9, 3.572112819356468*^9}, {3.580648590375006*^9, 3.580648591603519*^9}, 3.580651316394977*^9}, CellTags->{"corecell", "differentacrossnotebooks"}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"RPCharacterization", "[", "MSReplicator", "]"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SCharacterization", "[", "MSReplicator", "]"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"AOCharacterization", "[", "MSReplicator", "]"}], "=", "False"}], ";"}]}], "Input", CellChangeTimes->{{3.492548298337087*^9, 3.4925483080210123`*^9}, 3.5080249354099197`*^9, {3.508763938935272*^9, 3.5087639430243006`*^9}, 3.508765054120872*^9, 3.5195536195748696`*^9, {3.519553859996621*^9, 3.5195538604276457`*^9}, 3.519672857431008*^9, {3.5196732940069785`*^9, 3.519673298540238*^9}, {3.580643149226187*^9, 3.580643149772696*^9}, { 3.580643231294224*^9, 3.580643234174414*^9}}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["I-Logit Dynamic", "SmallText", CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"ILogit", "[", "eta_", "]"}], "[", RowBox[{"x_", ",", "F_"}], "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ FractionBox[ RowBox[{ RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], " ", SuperscriptBox["\[ExponentialE]", FractionBox[ RowBox[{ RowBox[{"F", "[", "x", "]"}], "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], "eta"]]}], RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"k", "=", "1"}], RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]], RowBox[{ RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", "k"}], "]"}], "]"}], SuperscriptBox["\[ExponentialE]", FractionBox[ RowBox[{ RowBox[{"F", "[", "x", "]"}], "[", RowBox[{"[", RowBox[{"p", ",", "k"}], "]"}], "]"}], "eta"]]}]}]], " ", "-", RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], " ", ";"}]], "Input", CellChangeTimes->{{3.492818938783333*^9, 3.49281897296248*^9}, { 3.507209340557954*^9, 3.507209341969984*^9}, {3.5079830591378436`*^9, 3.507983059182908*^9}, {3.50798337352491*^9, 3.507983373569975*^9}, { 3.5079857902400303`*^9, 3.507985797119923*^9}, {3.569010278573266*^9, 3.569010500349916*^9}, {3.569015120928269*^9, 3.569015187224795*^9}, { 3.569015227198601*^9, 3.569015227567206*^9}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"RPCharacterization", "[", RowBox[{"ILogit", "[", "_", "]"}], "]"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SCharacterization", "[", RowBox[{"ILogit", "[", "_", "]"}], "]"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"AOCharacterization", "[", RowBox[{"ILogit", "[", "_", "]"}], "]"}], "=", "False"}], ";"}], "\[IndentingNewLine]"}], "Input", CellChangeTimes->{ 3.508024937112368*^9, {3.5087639631430187`*^9, 3.5087639760608015`*^9}, 3.50876505598355*^9, 3.5195536212949677`*^9, {3.5195544205786843`*^9, 3.519554421004709*^9}, 3.5196733097048764`*^9, {3.580643153132313*^9, 3.580643154043802*^9}, 3.580643243151475*^9}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Best Response dynamic", "SmallText", CellChangeTimes->{{3.5211519626581383`*^9, 3.5211519690405035`*^9}}, CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"BR", "[", RowBox[{"x_", ",", "F_"}], "]"}], ":=", RowBox[{ RowBox[{"Logit", "[", ".001", "]"}], "[", RowBox[{"x", ",", "F"}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.4928189977881775`*^9, 3.492819038676973*^9}, { 3.5079830592129517`*^9, 3.507983059227973*^9}, {3.507983373600018*^9, 3.50798337361504*^9}, {3.5079858866336374`*^9, 3.507985890328951*^9}, { 3.5211519917578025`*^9, 3.521152052683287*^9}, {3.521152129871702*^9, 3.521152142614431*^9}, {3.5237327417000504`*^9, 3.5237327417606707`*^9}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"RPCharacterization", "[", "BR", "]"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SCharacterization", "[", "BR", "]"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"AOCharacterization", "[", "BR", "]"}], "=", "False"}], ";"}]}], "Input", CellChangeTimes->{{3.4928189977881775`*^9, 3.492819038676973*^9}, { 3.5079830592129517`*^9, 3.507983059227973*^9}, {3.507983373600018*^9, 3.50798337361504*^9}, {3.5079858866336374`*^9, 3.507985890328951*^9}, { 3.5211519917578025`*^9, 3.521152052683287*^9}, {3.521152129871702*^9, 3.521152142614431*^9}, {3.5211525562650905`*^9, 3.521152556888126*^9}, { 3.580643165945753*^9, 3.580643167242956*^9}, {3.580643246238519*^9, 3.580643250780902*^9}}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Tempered Logit", "SmallText", CellChangeTimes->{{3.4819039639063683`*^9, 3.4819039858113937`*^9}, { 3.485720504448155*^9, 3.4857205070967503`*^9}, 3.4922091843087626`*^9, { 3.4922092286224823`*^9, 3.4922092296239223`*^9}, 3.5100691061094837`*^9, { 3.539858214906395*^9, 3.53985821707852*^9}, {3.569016557372028*^9, 3.569016558834539*^9}}, CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"TemperedLogit", "[", "eta_", "]"}], "[", "Q_", "]"}], "[", RowBox[{"x_", ",", " ", "F_"}], "]"}], " ", ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"payoff", ",", "max"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"payoff", "=", RowBox[{"F", "[", "x", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"payoff", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"Q", "[", RowBox[{"payoff", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"max", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Max", "[", RowBox[{"payoff", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"Exp", "[", RowBox[{ RowBox[{"payoff", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], "/", "eta"}], "]"}], "/", RowBox[{"Sum", "[", RowBox[{ RowBox[{"Exp", "[", RowBox[{ RowBox[{"payoff", "[", RowBox[{"[", RowBox[{"p", ",", "k"}], "]"}], "]"}], "/", "eta"}], "]"}], ",", " ", RowBox[{"{", RowBox[{"k", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}]}], RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", "k"}], "]"}], "]"}], "*", RowBox[{"(", RowBox[{ RowBox[{"max", "[", RowBox[{"[", "p", "]"}], "]"}], "-", RowBox[{"payoff", "[", RowBox[{"[", RowBox[{"p", ",", "k"}], "]"}], "]"}]}], ")"}]}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}]}], "\[IndentingNewLine]", "-", RowBox[{ RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], "*", RowBox[{"(", RowBox[{ RowBox[{"max", "[", RowBox[{"[", "p", "]"}], "]"}], " ", "-", RowBox[{"payoff", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}]}], ")"}]}]}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{ 3.4812470171718106`*^9, {3.4857205184016542`*^9, 3.485720543854027*^9}, { 3.485720770487443*^9, 3.48572082648066*^9}, {3.485720921910668*^9, 3.4857209449494247`*^9}, {3.4857209843050547`*^9, 3.4857211713432503`*^9}, {3.4857212046884327`*^9, 3.485721238071824*^9}, 3.485721310913628*^9, 3.492166233758116*^9, {3.492166300083487*^9, 3.492166301084927*^9}, {3.4921663372268963`*^9, 3.4921663585375395`*^9}, { 3.492166441647045*^9, 3.492166479972154*^9}, {3.4921665325677834`*^9, 3.492166639321287*^9}, 3.492170682681574*^9, {3.4921707138463864`*^9, 3.492170764258876*^9}, {3.4921712629359384`*^9, 3.492171352674977*^9}, { 3.4921714425041447`*^9, 3.4921715491775336`*^9}, {3.492171581564103*^9, 3.492171623123863*^9}, {3.492171654989684*^9, 3.4921718491088133`*^9}, { 3.492172356848908*^9, 3.4921724562518425`*^9}, {3.492172495928895*^9, 3.4921727407108746`*^9}, {3.4921728905763702`*^9, 3.4921728913074217`*^9}, {3.4921729520748005`*^9, 3.4921729813569064`*^9}, {3.4921730440670795`*^9, 3.492173055082919*^9}, { 3.4921736505591717`*^9, 3.492173775909417*^9}, {3.492173826131633*^9, 3.492173833171756*^9}, {3.4921740210919724`*^9, 3.492174170136287*^9}, { 3.4921742674762554`*^9, 3.492174277110108*^9}, {3.4928203628610563`*^9, 3.4928203692101855`*^9}, {3.5072093461059313`*^9, 3.507209349410683*^9}, { 3.5079818723262925`*^9, 3.507981878995883*^9}, {3.5079858205385976`*^9, 3.5079858285451107`*^9}, {3.539858224618951*^9, 3.539858275901884*^9}, { 3.569010788901921*^9, 3.569010805925741*^9}, {3.569011220874367*^9, 3.569011247036556*^9}, {3.569011285515993*^9, 3.569011287646864*^9}, 3.569011323853288*^9, {3.569012243543583*^9, 3.569012294477956*^9}, { 3.569012414117606*^9, 3.56901283231418*^9}, {3.569012907576143*^9, 3.569012985284706*^9}, {3.569013064582915*^9, 3.569013198628249*^9}, { 3.569013283893679*^9, 3.569013284889502*^9}, {3.569013329874974*^9, 3.569013407804027*^9}, {3.569013438168313*^9, 3.569013518152344*^9}, { 3.569016572060734*^9, 3.569016573061599*^9}, {3.569016616335636*^9, 3.569016628946861*^9}, {3.5690167234303*^9, 3.569016724858359*^9}, { 3.571744447836316*^9, 3.571744455886426*^9}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"RPCharacterization", "[", RowBox[{ RowBox[{"TemperedLogit", "[", "_", "]"}], "[", "_", "]"}], "]"}], " ", "=", " ", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SCharacterization", "[", RowBox[{ RowBox[{"TemperedLogit", "[", "_", "]"}], "[", "_", "]"}], "]"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"AOCharacterization", "[", RowBox[{ RowBox[{"TemperedLogit", "[", "_", "]"}], "[", "_", "]"}], "]"}], "=", "False"}], ";"}]}], "Input", CellChangeTimes->{ 3.4812470181717978`*^9, 3.485720559015809*^9, 3.485721283563513*^9, 3.485721317004876*^9, 3.488803149046875*^9, {3.4922043825342264`*^9, 3.4922043862095113`*^9}, {3.492548349240282*^9, 3.4925483583634005`*^9}, 3.508024938083765*^9, 3.5087639847936*^9, 3.5087650569950047`*^9, 3.519553621958006*^9, {3.519673337870487*^9, 3.519673339629588*^9}, { 3.539860960906458*^9, 3.5398609685698957`*^9}, {3.569016735598735*^9, 3.569016749538684*^9}, {3.580643179917707*^9, 3.580643180718692*^9}, 3.580643259778457*^9}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Tempered Best Response", "SmallText", CellChangeTimes->{{3.4819039639063683`*^9, 3.4819039858113937`*^9}, { 3.485720504448155*^9, 3.4857205070967503`*^9}, 3.4922091843087626`*^9, { 3.4922092286224823`*^9, 3.4922092296239223`*^9}, 3.5100691061094837`*^9, { 3.539858214906395*^9, 3.53985821707852*^9}}, CellTags->"corecell"], Cell["\<\ The tempered Best Response dynamic is an approximation through tempered logit \ of the tempered best response dynamic of Zusai (2011).\ \>", "Text", CellChangeTimes->{{3.510069132792099*^9, 3.510069157735979*^9}, { 3.5398583691122155`*^9, 3.539858385031126*^9}}, FontFamily->"Palatino", CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"TemperedBR", "[", "Q_", "]"}], "[", RowBox[{"x_", ",", " ", "F_"}], "]"}], " ", ":=", RowBox[{ RowBox[{ RowBox[{"TemperedLogit", "[", ".001", "]"}], "[", "Q", "]"}], "[", RowBox[{"x", ",", " ", "F"}], "]"}]}], " ", ";"}]], "Input", CellChangeTimes->{ 3.4812470171718106`*^9, {3.4857205184016542`*^9, 3.485720543854027*^9}, { 3.485720770487443*^9, 3.48572082648066*^9}, {3.485720921910668*^9, 3.4857209449494247`*^9}, {3.4857209843050547`*^9, 3.4857211713432503`*^9}, {3.4857212046884327`*^9, 3.485721238071824*^9}, 3.485721310913628*^9, 3.492166233758116*^9, {3.492166300083487*^9, 3.492166301084927*^9}, {3.4921663372268963`*^9, 3.4921663585375395`*^9}, { 3.492166441647045*^9, 3.492166479972154*^9}, {3.4921665325677834`*^9, 3.492166639321287*^9}, 3.492170682681574*^9, {3.4921707138463864`*^9, 3.492170764258876*^9}, {3.4921712629359384`*^9, 3.492171352674977*^9}, { 3.4921714425041447`*^9, 3.4921715491775336`*^9}, {3.492171581564103*^9, 3.492171623123863*^9}, {3.492171654989684*^9, 3.4921718491088133`*^9}, { 3.492172356848908*^9, 3.4921724562518425`*^9}, {3.492172495928895*^9, 3.4921727407108746`*^9}, {3.4921728905763702`*^9, 3.4921728913074217`*^9}, {3.4921729520748005`*^9, 3.4921729813569064`*^9}, {3.4921730440670795`*^9, 3.492173055082919*^9}, { 3.4921736505591717`*^9, 3.492173775909417*^9}, {3.492173826131633*^9, 3.492173833171756*^9}, {3.4921740210919724`*^9, 3.492174170136287*^9}, { 3.4921742674762554`*^9, 3.492174277110108*^9}, {3.4928203628610563`*^9, 3.4928203692101855`*^9}, {3.5072093461059313`*^9, 3.507209349410683*^9}, { 3.5079818723262925`*^9, 3.507981878995883*^9}, {3.5079858205385976`*^9, 3.5079858285451107`*^9}, {3.539858224618951*^9, 3.539858275901884*^9}, { 3.569010788901921*^9, 3.569010805925741*^9}, {3.569011220874367*^9, 3.569011247036556*^9}, {3.569011285515993*^9, 3.569011287646864*^9}, 3.569011323853288*^9, {3.569012243543583*^9, 3.569012294477956*^9}, { 3.569012414117606*^9, 3.56901283231418*^9}, {3.569012907576143*^9, 3.569012985284706*^9}, {3.569013064582915*^9, 3.569013198628249*^9}, { 3.569013283893679*^9, 3.569013284889502*^9}, {3.569013329874974*^9, 3.569013407804027*^9}, {3.569013438168313*^9, 3.569013518152344*^9}, { 3.569016638785272*^9, 3.569016656682025*^9}, {3.571744353900809*^9, 3.571744362156075*^9}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"RPCharacterization", "[", RowBox[{"TemperedBR", "[", "_", "]"}], "]"}], " ", "=", " ", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SCharacterization", "[", RowBox[{"TemperedBR", "[", "_", "]"}], "]"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"AOCharacterization", "[", RowBox[{"TemperedBR", "[", "_", "]"}], "]"}], "=", "False"}], ";"}]}], "Input", CellChangeTimes->{ 3.4812470181717978`*^9, 3.485720559015809*^9, 3.485721283563513*^9, 3.485721317004876*^9, 3.488803149046875*^9, {3.4922043825342264`*^9, 3.4922043862095113`*^9}, {3.492548349240282*^9, 3.4925483583634005`*^9}, 3.508024938083765*^9, 3.5087639847936*^9, 3.5087650569950047`*^9, 3.519553621958006*^9, {3.519673337870487*^9, 3.519673339629588*^9}, { 3.539860960906458*^9, 3.5398609685698957`*^9}, {3.569016752147321*^9, 3.56901675320416*^9}, {3.580643185723562*^9, 3.58064318657523*^9}, 3.580643266607539*^9}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["SampleBR Dynamic", "SmallText", CellChangeTimes->{{3.4796712797199183`*^9, 3.4796712899946923`*^9}, 3.479723591645841*^9, 3.4812468720330434`*^9}, CellTags->"corecell"], Cell["\<\ The sample best response dynamic is introduced in Oyama, Sandholm, and \ Tercieux (2011).\ \>", "Text", CellChangeTimes->{{3.5100691803786707`*^9, 3.510069202362444*^9}}, FontFamily->"Palatino", CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{"sampleBRSimplex", "=", RowBox[{"Tuples", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"discSimplex", "[", RowBox[{"k", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"SampleBR", "[", "k_", "]"}], "[", RowBox[{"x_", ",", "F_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"Znk", ",", "Bk"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Znk", "=", "sampleBRSimplex"}], ";", "\[IndentingNewLine]", RowBox[{"Bk", "=", RowBox[{"Sum", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"bestResponse", "[", RowBox[{ RowBox[{"Znk", "[", RowBox[{"[", "l", "]"}], "]"}], ",", "F"}], "]"}], "[", RowBox[{"[", "p", "]"}], "]"}], "*", RowBox[{"Apply", "[", RowBox[{"Multinomial", ",", RowBox[{"k", " ", "*", RowBox[{"Znk", "[", RowBox[{"[", RowBox[{"l", ",", "p"}], "]"}], "]"}]}]}], "]"}], "*", RowBox[{"Product", "[", RowBox[{ RowBox[{"Limit", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], "+", "littleo"}], ")"}], "^", RowBox[{"(", RowBox[{"k", " ", "*", RowBox[{"Znk", "[", RowBox[{"[", RowBox[{"l", ",", "p", ",", "j"}], "]"}], "]"}]}], ")"}]}], ",", RowBox[{"littleo", "->", "0"}], ",", RowBox[{"Direction", "\[Rule]", RowBox[{"-", "1"}]}]}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}]}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"l", ",", RowBox[{ RowBox[{"Dimensions", "[", "Znk", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Bk", "-", "x"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.4796712918773994`*^9, 3.479671318125142*^9}, { 3.479671575645438*^9, 3.479671610755924*^9}, {3.4796717982254925`*^9, 3.479671845663705*^9}, {3.4796718915096283`*^9, 3.47967190566999*^9}, { 3.479673481726248*^9, 3.4796735125505705`*^9}, {3.479673563904414*^9, 3.4796735815698156`*^9}, {3.4796737007812333`*^9, 3.4796737186369085`*^9}, 3.479673830758131*^9, {3.479673869423729*^9, 3.479673959453185*^9}, { 3.47967750162658*^9, 3.4796775430561533`*^9}, {3.479677582012169*^9, 3.4796776844494667`*^9}, {3.4796777620810957`*^9, 3.4796778255123053`*^9}, {3.4796778960937967`*^9, 3.4796779890775003`*^9}, {3.479678019481219*^9, 3.4796780233267484`*^9}, { 3.4796780925562954`*^9, 3.479678167994771*^9}, {3.4796782003913546`*^9, 3.4796782457866297`*^9}, {3.4796782888886075`*^9, 3.4796784321746426`*^9}, {3.47967847862143*^9, 3.479678548071294*^9}, { 3.479678600807124*^9, 3.4796786026097164`*^9}, {3.479679037625238*^9, 3.4796790595768027`*^9}, {3.4796792007297707`*^9, 3.479679226717139*^9}, { 3.4796793968417664`*^9, 3.479679399115035*^9}, {3.4796794542943788`*^9, 3.4796796902036*^9}, {3.4796797303813725`*^9, 3.479679803606665*^9}, { 3.4796798854944143`*^9, 3.479679900586115*^9}, {3.4796799399627357`*^9, 3.479679942095803*^9}, {3.4796799807714157`*^9, 3.4796800378534956`*^9}, { 3.479680100283265*^9, 3.479680102075843*^9}, {3.479680568776926*^9, 3.479680569427862*^9}, 3.4796806190692425`*^9, {3.4796806549408236`*^9, 3.4796807843469005`*^9}, {3.4796809199018188`*^9, 3.479680935624427*^9}, { 3.47968110439711*^9, 3.479681165615137*^9}, {3.479681529608534*^9, 3.479681562495824*^9}, {3.479681639446473*^9, 3.4796816498614492`*^9}, { 3.4796828007763834`*^9, 3.479682847423459*^9}, {3.4796828805010223`*^9, 3.4796829641813483`*^9}, {3.479683074650195*^9, 3.4796831357981215`*^9}, { 3.479683294075713*^9, 3.479683299673763*^9}, {3.479683524477014*^9, 3.4796836172704444`*^9}, {3.4796839560676107`*^9, 3.4796840364531994`*^9}, {3.4796841181306458`*^9, 3.4796841333625484`*^9}, 3.479684385495097*^9, {3.4796844847578297`*^9, 3.4796844914073915`*^9}, { 3.479684532806921*^9, 3.4796846136932297`*^9}, {3.479684665407592*^9, 3.4796846782260237`*^9}, {3.4796848593364477`*^9, 3.479684877202137*^9}, { 3.479721750728732*^9, 3.4797217523811083`*^9}, {3.479721931128134*^9, 3.4797219388692656`*^9}, {3.47972219290455*^9, 3.479722193225011*^9}, { 3.4797227264317245`*^9, 3.47972273843899*^9}, 3.4797235951408668`*^9, 3.480788703085273*^9, 3.4807887373656454`*^9, {3.4807892930232954`*^9, 3.480789323585013*^9}, {3.480789398692465*^9, 3.4807894589096737`*^9}, { 3.480793997996595*^9, 3.4807939997934237`*^9}, {3.4807941639454713`*^9, 3.480794224381424*^9}, {3.4807942634585485`*^9, 3.4807942916609516`*^9}, { 3.4807943356754503`*^9, 3.4807943396753473`*^9}, {3.4807960717091312`*^9, 3.480796142113579*^9}, 3.4807980573614225`*^9, {3.4807986281749344`*^9, 3.4807986306748705`*^9}, {3.480800452971968*^9, 3.4808005012051086`*^9}, { 3.4808006038743553`*^9, 3.4808006043274684`*^9}, {3.480801812171547*^9, 3.4808018626546297`*^9}, {3.4808020322596626`*^9, 3.4808020506810656`*^9}, {3.4808028155521097`*^9, 3.480802818223916*^9}, { 3.480804381355774*^9, 3.4808043902461715`*^9}, 3.480804502258929*^9, { 3.480805704259407*^9, 3.4808057093530264`*^9}, {3.4808060786404476`*^9, 3.4808061148426456`*^9}, 3.480845050414381*^9, {3.480845084336256*^9, 3.480845174523756*^9}, 3.480845387430006*^9, 3.480845458430006*^9, { 3.480845696430006*^9, 3.480845736367506*^9}, {3.480845814695631*^9, 3.480845927898756*^9}, {3.480846059695631*^9, 3.480846103336256*^9}, { 3.480846236008131*^9, 3.480846237851881*^9}, 3.481246874939256*^9, { 3.4818176948149743`*^9, 3.481817718869563*^9}, {3.4927731399432592`*^9, 3.492773252274784*^9}, {3.492773316547203*^9, 3.492773334072403*^9}, { 3.4927733763431854`*^9, 3.4927734080988483`*^9}, {3.4928102095963106`*^9, 3.492810217277355*^9}, {3.4928133955474834`*^9, 3.4928134051112356`*^9}, { 3.4928136324080725`*^9, 3.492813633850146*^9}, {3.492814897977872*^9, 3.492814919508832*^9}, {3.5079818938372235`*^9, 3.5079819036763716`*^9}, 3.5079860229095926`*^9, {3.507986065120289*^9, 3.5079861198740206`*^9}, { 3.5211514179089804`*^9, 3.5211514664737577`*^9}, {3.5211516139981956`*^9, 3.5211516325592575`*^9}, 3.5400679491230164`*^9, {3.565002043276135*^9, 3.565002044071376*^9}, 3.56500230514961*^9, {3.56901358006809*^9, 3.569013589048077*^9}, {3.569013747839469*^9, 3.569014017278425*^9}, { 3.569014822606378*^9, 3.569014921598475*^9}, {3.5691413340364*^9, 3.569141369514036*^9}, {3.571744810890323*^9, 3.57174488732807*^9}, { 3.571744988826457*^9, 3.571745063643309*^9}, 3.571745123280793*^9, { 3.571745279019186*^9, 3.571745285181624*^9}, 3.571745347255964*^9, { 3.571745434142458*^9, 3.57174545344575*^9}, {3.571745513755449*^9, 3.571745545897157*^9}, 3.571745635693923*^9, {3.571745691490042*^9, 3.571745691742692*^9}, {3.571745731552273*^9, 3.571745768873518*^9}, { 3.57174586496443*^9, 3.571745879423576*^9}, {3.571745913891439*^9, 3.571745979210894*^9}, {3.57174601060847*^9, 3.571746012506985*^9}, { 3.571791046659707*^9, 3.571791058065735*^9}, 3.571791206714722*^9, { 3.571791287232125*^9, 3.571791288958295*^9}, {3.571820552588823*^9, 3.571820589317257*^9}, 3.571820745397187*^9}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"RPCharacterization", "[", RowBox[{"SampleBR", "[", "_", "]"}], "]"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SCharacterization", "[", RowBox[{"SampleBR", "[", "_", "]"}], "]"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"AOCharacterization", "[", RowBox[{"SampleBR", "[", "_", "]"}], "]"}], "=", "False"}], ";"}]}], "Input", CellChangeTimes->{{3.4796716185671563`*^9, 3.4796716196186686`*^9}, { 3.479671748644198*^9, 3.479671749074817*^9}, {3.4796718023013535`*^9, 3.4796718083700795`*^9}, {3.479671882967345*^9, 3.4796718839287276`*^9}, { 3.4796841519693036`*^9, 3.479684154342716*^9}, 3.4797235969434586`*^9, 3.480861513305006*^9, 3.4812468777360954`*^9, {3.492523483741369*^9, 3.4925234845925927`*^9}, {3.49254852553378*^9, 3.4925485362592025`*^9}, 3.508024748621331*^9, 3.5087640585898657`*^9, 3.508765065337*^9, { 3.5087803881290545`*^9, 3.50878038937084*^9}, 3.51955362762533*^9, { 3.5196733466169877`*^9, 3.51967334840609*^9}, {3.521151236239589*^9, 3.5211512380616937`*^9}, {3.580643190886689*^9, 3.580643191661746*^9}, 3.580643274463628*^9}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Logit Dynamic", "SmallText", CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"Logit", "[", "eta_", "]"}], "[", RowBox[{"x_", ",", "F_"}], "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ FractionBox[ SuperscriptBox["\[ExponentialE]", FractionBox[ RowBox[{ RowBox[{"F", "[", "x", "]"}], "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], "eta"]], RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"k", "=", "1"}], RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]], SuperscriptBox["\[ExponentialE]", FractionBox[ RowBox[{ RowBox[{"F", "[", "x", "]"}], "[", RowBox[{"[", RowBox[{"p", ",", "k"}], "]"}], "]"}], "eta"]]}]], "-", RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.4928188661488895`*^9, 3.4928189083796144`*^9}, { 3.5072093330070963`*^9, 3.50720933886552*^9}, {3.5079830590927787`*^9, 3.5079830591078005`*^9}, {3.507983373479845*^9, 3.507983373494867*^9}, { 3.5079857432524652`*^9, 3.5079857619543576`*^9}, {3.569015082528157*^9, 3.569015110483521*^9}, {3.569015212764635*^9, 3.569015219313285*^9}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"RPCharacterization", "[", RowBox[{"Logit", "[", "_", "]"}], "]"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SCharacterization", "[", RowBox[{"Logit", "[", "_", "]"}], "]"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"AOCharacterization", "[", RowBox[{"Logit", "[", "_", "]"}], "]"}], "=", "False"}], ";"}]}], "Input",\ CellChangeTimes->{{3.4925483215905237`*^9, 3.4925483338181067`*^9}, 3.5080249362611437`*^9, {3.508763950343546*^9, 3.5087639518198957`*^9}, 3.508765055192413*^9, 3.519553620680933*^9, {3.580643195596121*^9, 3.580643196989899*^9}, 3.580643280271536*^9}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["BNN dynamic", "SmallText", CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"BNN", "[", RowBox[{"x_", ",", "F_"}], "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Fhatplus", "[", RowBox[{"x", ",", "F"}], "]"}], "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], "-", RowBox[{ RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], " ", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"k", "=", "1"}], RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]], RowBox[{ RowBox[{"Fhatplus", "[", RowBox[{"x", ",", "F"}], "]"}], "[", RowBox[{"[", RowBox[{"p", ",", "k"}], "]"}], "]"}]}]}]}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.4928189977881775`*^9, 3.492819038676973*^9}, { 3.5079830592129517`*^9, 3.507983059227973*^9}, {3.507983373600018*^9, 3.50798337361504*^9}, {3.5079858866336374`*^9, 3.507985890328951*^9}, { 3.569015268818353*^9, 3.569015316988842*^9}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"RPCharacterization", "[", "BNN", "]"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SCharacterization", "[", "BNN", "]"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"AOCharacterization", "[", "BNN", "]"}], "=", "False"}], ";"}]}], "Input", CellChangeTimes->{{3.492548368067354*^9, 3.4925484047400875`*^9}, 3.508024887040368*^9, 3.50876399121976*^9, 3.5087650579363585`*^9, 3.5195536226010427`*^9, {3.519554059314021*^9, 3.5195540596810417`*^9}, { 3.580643200489615*^9, 3.580643201612536*^9}, 3.580643284958054*^9}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Smith Dynamic", "SmallText", CellChangeTimes->{{3.4822829143327475`*^9, 3.482282915153928*^9}}, CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"rho", "[", RowBox[{"x_", ",", "F_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "Fx", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Fx", "=", RowBox[{"F", "[", "x", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"Max", "[", RowBox[{ RowBox[{ RowBox[{"Fx", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], "-", RowBox[{"Fx", "[", RowBox[{"[", RowBox[{"p", ",", "k"}], "]"}], "]"}]}], ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.49281921822515*^9, 3.4928193439359136`*^9}, { 3.5079859279280157`*^9, 3.5079859425890975`*^9}, {3.569015347740136*^9, 3.569015390559829*^9}}, CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"Smith", "[", RowBox[{"x_", ",", "F_"}], "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Transpose", "[", RowBox[{ RowBox[{"rho", "[", RowBox[{"x", ",", "F"}], "]"}], "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], ".", " ", RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}]}], "-", RowBox[{ RowBox[{"DiagonalMatrix", "[", RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], ".", RowBox[{ RowBox[{"rho", "[", RowBox[{"x", ",", "F"}], "]"}], "[", RowBox[{"[", "p", "]"}], "]"}], ".", RowBox[{"ConstantArray", "[", RowBox[{"1", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}]}]}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{ 3.4812470171718106`*^9, {3.492819412865029*^9, 3.492819419784979*^9}, { 3.4928194587209663`*^9, 3.4928195309848766`*^9}, {3.569015408310822*^9, 3.569015441582072*^9}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"RPCharacterization", "[", "Smith", "]"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SCharacterization", "[", "Smith", "]"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"AOCharacterization", "[", "Smith", "]"}], "=", "False"}], ";"}]}], "Input", CellChangeTimes->{ 3.4812470181717978`*^9, {3.4925484536404023`*^9, 3.4925484716462936`*^9}, 3.5080248933394256`*^9, 3.508764027801937*^9, 3.508765059758979*^9, 3.519553623914118*^9, {3.5195541377775087`*^9, 3.519554138157531*^9}, 3.580643206268834*^9, 3.58064328974231*^9}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Excess payoff dynamic", "SmallText", CellTags->"corecell"], Cell[TextData[{ "Here one specifies the vector field sig", "mat", "ilde that defines an excess payoff dynamic. This definition should be \ stated in terms of the excess payoff vector Fhat[x,F], which is defined as \ Fhat[x,F] = F[x] - Fbar[x,F]. (", StyleBox["Mathematica", FontSlant->"Italic"], " subtracts the scalar from the vector correctly.) When computing rest \ points, the program assumes that sigmatilde is acute, so that the rest points \ of the dynamic are the Nash equilibria of the underlying game." }], "Text", CellChangeTimes->{{3.48181294399619*^9, 3.481812948682929*^9}}, FontFamily->"Palatino", CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"sigmatilde", "[", RowBox[{"x_", ",", "F_"}], "]"}], ":=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"Max", "[", RowBox[{"0", ",", RowBox[{ RowBox[{"Fhat", "[", RowBox[{"x", ",", "F"}], "]"}], "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}]}], "]"}], ")"}], "^", "2"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.4928190920236816`*^9, 3.4928191108106956`*^9}, 3.5079830592580166`*^9, 3.5079833736450825`*^9, {3.569015462305673*^9, 3.569015466727476*^9}, {3.569015507379409*^9, 3.569015511451323*^9}}, CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"ExcessPayoff", "[", RowBox[{"x_", ",", "F_"}], "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"sigmatilde", "[", RowBox[{"x", ",", "F"}], "]"}], "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], "-", RowBox[{ RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], " ", RowBox[{ UnderoverscriptBox["\[Sum]", RowBox[{"k", "=", "1"}], RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]], RowBox[{ RowBox[{"sigmatilde", "[", RowBox[{"x", ",", "F"}], "]"}], "[", RowBox[{"[", RowBox[{"p", ",", "k"}], "]"}], "]"}]}]}]}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{ 3.4812473983388066`*^9, {3.492819117730646*^9, 3.492819145350362*^9}, { 3.507983059273038*^9, 3.5079830592880597`*^9}, {3.507983373675126*^9, 3.5079833736901474`*^9}, {3.507985913206848*^9, 3.507985915835628*^9}, { 3.56901552550848*^9, 3.56901555181885*^9}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"RPCharacterization", "[", "ExcessPayoff", "]"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SCharacterization", "[", "ExcessPayoff", "]"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"AOCharacterization", "[", "ExcessPayoff", "]"}], "=", "False"}], ";"}]}], "Input", CellChangeTimes->{ 3.4812473993544188`*^9, {3.492548442314116*^9, 3.4925484491339226`*^9}, 3.508024892348*^9, 3.5087640201957445`*^9, 3.5087650589678416`*^9, 3.5195536232820816`*^9, {3.519554087670643*^9, 3.519554088073666*^9}, 3.580643213853532*^9, 3.580643294860939*^9}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Pairwise Comparison Dynamic", "SmallText", CellTags->"corecell"], Cell["\<\ Here one specifies the vector field rho that defines an excess payoff \ dynamic. When computing rest points, the program assumes that rho is \ separable and sign-preserving, so that the rest points of the dynamic are the \ Nash equilibria of the underlying game. The leading example of the vector \ field is the one for the Smith dynamic defined above and it is the default.\ \>", "Text", CellChangeTimes->{{3.4928202376009407`*^9, 3.492820248967285*^9}}, CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"rho1", "[", RowBox[{"x_", ",", "F_"}], "]"}], ":=", RowBox[{"rho", "[", RowBox[{"x", ",", "F"}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.492820174540264*^9, 3.492820179877939*^9}}, CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"PairwiseComparison", "[", RowBox[{"x_", ",", "F_"}], "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Transpose", "[", RowBox[{ RowBox[{"rho1", "[", RowBox[{"x", ",", "F"}], "]"}], "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], ".", " ", RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}]}], "-", RowBox[{ RowBox[{"DiagonalMatrix", "[", RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], ".", RowBox[{ RowBox[{"rho1", "[", RowBox[{"x", ",", "F"}], "]"}], "[", RowBox[{"[", "p", "]"}], "]"}], ".", RowBox[{"ConstantArray", "[", RowBox[{"1", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}]}]}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{ 3.481247465900442*^9, {3.492820208959757*^9, 3.4928202154691167`*^9}, { 3.56901558757488*^9, 3.569015620239706*^9}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"RPCharacterization", "[", "PairwiseComparison", "]"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SCharacterization", "[", "PairwiseComparison", "]"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"AOCharacterization", "[", "PairwiseComparison", "]"}], "=", "False"}], ";"}]}], "Input", CellChangeTimes->{ 3.481247469072276*^9, {3.4925484780354805`*^9, 3.492548484915374*^9}, 3.508024897685675*^9, 3.5087640332621107`*^9, 3.5087650607904625`*^9, 3.5195536246061573`*^9, {3.5195541488211403`*^9, 3.5195541491711607`*^9}, { 3.580643218378014*^9, 3.58064321934076*^9}, 3.580643298589592*^9}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Projection Dynamic", "SmallText", CellChangeTimes->{{3.539990087133482*^9, 3.5399900923907824`*^9}}, CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"Project", "[", RowBox[{ RowBox[{"x", ":", "pattern"}], ",", "F_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "j", ",", "k", ",", "m", ",", "p", ",", "nc", ",", "Fx", ",", "boundaries", ",", "reduced", ",", "reducedx", ",", "npos", ",", "flag", ",", "project", ",", "result"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"result", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"ConstantArray", "[", RowBox[{"0", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Fx", "=", RowBox[{"F", "[", "x", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"p", "=", "1"}], ",", RowBox[{"p", "<=", "pop"}], ",", RowBox[{"p", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Total", "[", RowBox[{"support", "[", RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], "]"}], "==", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"result", "[", RowBox[{"[", "p", "]"}], "]"}], "=", RowBox[{ RowBox[{"projectionMatrix", "[", RowBox[{"{", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}], "}"}], "]"}], ".", RowBox[{"Fx", "[", RowBox[{"[", "p", "]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"nc", "=", RowBox[{"2", "^", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "2"}], ",", RowBox[{"j", "<=", "nc"}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"boundaries", "=", RowBox[{"numberSystem", "[", RowBox[{ RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}], ",", "2", ",", "j"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Max", "[", RowBox[{ RowBox[{"support", "[", RowBox[{ RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}], ",", "3"}], "]"}], "-", "boundaries"}], "]"}], "==", "1"}], ",", RowBox[{"Continue", "[", "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"npos", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"reduced", "=", RowBox[{"ConstantArray", "[", RowBox[{"0", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"reducedx", "=", RowBox[{"ConstantArray", "[", RowBox[{"0", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"boundaries", "[", RowBox[{"[", "k", "]"}], "]"}], "==", "1"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"reduced", "[", RowBox[{"[", "npos", "]"}], "]"}], "=", RowBox[{"Fx", "[", RowBox[{"[", RowBox[{"p", ",", "k"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"npos", "++"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"npos", "--"}], ";", "\[IndentingNewLine]", RowBox[{"project", "=", RowBox[{ RowBox[{"IdentityMatrix", "[", "npos", "]"}], "-", RowBox[{ RowBox[{"1", "/", "npos"}], "*", RowBox[{"ConstantArray", "[", RowBox[{"1", ",", RowBox[{"{", RowBox[{"npos", ",", "npos"}], "}"}]}], "]"}]}]}]}], ";", "\[IndentingNewLine]", RowBox[{"reduced", "=", RowBox[{"project", ".", RowBox[{"Take", "[", RowBox[{"reduced", ",", "npos"}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"flag", "=", "False"}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"And", "[", RowBox[{ RowBox[{ RowBox[{"boundaries", "[", RowBox[{"[", "k", "]"}], "]"}], "==", "0"}], ",", RowBox[{ RowBox[{ RowBox[{"Fx", "[", RowBox[{"[", RowBox[{"p", ",", RowBox[{ RowBox[{"Position", "[", RowBox[{"boundaries", ",", "1"}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "]"}], "]"}], "-", RowBox[{"Fx", "[", RowBox[{"[", RowBox[{"p", ",", "k"}], "]"}], "]"}], "-", RowBox[{"reduced", "[", RowBox[{"[", "1", "]"}], "]"}]}], "<", "0"}]}], "]"}], ",", RowBox[{"(*", RowBox[{ RowBox[{"result", "[", RowBox[{"[", "k", "]"}], "]"}], "=", RowBox[{"-", RowBox[{"x", "[", RowBox[{"[", "k", "]"}], "]"}]}]}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"flag", "=", "True"}], ";", "\[IndentingNewLine]", RowBox[{"Break", "[", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{"flag", ",", RowBox[{"Continue", "[", "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"m", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"boundaries", "[", RowBox[{"[", "k", "]"}], "]"}], "==", "1"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"result", "[", RowBox[{"[", RowBox[{"p", ",", "k"}], "]"}], "]"}], "=", RowBox[{"reduced", "[", RowBox[{"[", "m", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"m", "++"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Break", "[", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", "result"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.5158610264992857`*^9, 3.5158611842993116`*^9}, { 3.5158628005917587`*^9, 3.5158630618697023`*^9}, {3.5158631055882034`*^9, 3.515863193911255*^9}, {3.51586322547406*^9, 3.515863342412749*^9}, 3.5158634026771955`*^9, {3.5158634466807127`*^9, 3.515863477944501*^9}, 3.5158635440622826`*^9, {3.515863586523711*^9, 3.5158636740217156`*^9}, { 3.5158637462118444`*^9, 3.5158638202180777`*^9}, {3.5158639196487646`*^9, 3.5158639402629433`*^9}, {3.5158639975272193`*^9, 3.515864274551064*^9}, { 3.5158647809020257`*^9, 3.5158648189702024`*^9}, {3.5158648573193965`*^9, 3.515864869824112*^9}, {3.5158649057141647`*^9, 3.5158649114164906`*^9}, { 3.515864958944209*^9, 3.5158649654255795`*^9}, {3.5158650186346235`*^9, 3.5158651631418886`*^9}, {3.5158662208313847`*^9, 3.5158662404495068`*^9}, {3.515866396670442*^9, 3.5158664147144747`*^9}, { 3.515866716775751*^9, 3.5158667470044804`*^9}, 3.515866834261471*^9, { 3.515866884230329*^9, 3.515866919060321*^9}, 3.5158669958897157`*^9, { 3.5158670831157045`*^9, 3.515867126987214*^9}, {3.515939811460528*^9, 3.515939845716487*^9}, {3.515939940738922*^9, 3.515939942289011*^9}, { 3.5159400153451896`*^9, 3.5159400290639744`*^9}, 3.5159400606837826`*^9, { 3.5159401883950872`*^9, 3.515940207594186*^9}, {3.5159407235136943`*^9, 3.515940750973265*^9}, {3.5159408755113883`*^9, 3.5159408984196987`*^9}, { 3.515940951486734*^9, 3.5159409687807226`*^9}, {3.515941056979768*^9, 3.515941125575691*^9}, {3.515941551347044*^9, 3.5159415627566967`*^9}, { 3.515942551758264*^9, 3.515942553183346*^9}, {3.515942769298707*^9, 3.5159427831104965`*^9}, 3.515942849675304*^9, {3.515942908068644*^9, 3.515942909479725*^9}, {3.515942983088935*^9, 3.515943036221974*^9}, { 3.5159431901947803`*^9, 3.5159432621618967`*^9}, {3.5159433949264903`*^9, 3.515943440513098*^9}, {3.515943510151081*^9, 3.5159435310722775`*^9}, { 3.5159517855074043`*^9, 3.515951785936429*^9}, {3.5159518234615755`*^9, 3.5159518237475915`*^9}, {3.5159520080041304`*^9, 3.515952037581822*^9}, { 3.5159520699776754`*^9, 3.515952096142172*^9}, {3.5159521936447487`*^9, 3.5159522360401735`*^9}, {3.515952266592921*^9, 3.5159522829178543`*^9}, 3.5159523791933613`*^9, {3.5159526272685504`*^9, 3.5159526277765794`*^9}, { 3.515953935612383*^9, 3.515953936742448*^9}, {3.5159573459824452`*^9, 3.515957347241517*^9}, {3.5159596512592993`*^9, 3.51595965231536*^9}, 3.5160382452476187`*^9, 3.516038412473183*^9, 3.516039628779752*^9, { 3.5160396629887085`*^9, 3.5160396699581075`*^9}, 3.5160401640093656`*^9, { 3.5160402785659175`*^9, 3.516040279315961*^9}, 3.5160460901553216`*^9, 3.5160961772861414`*^9, {3.5160962880094748`*^9, 3.51609628967957*^9}, { 3.516096414145689*^9, 3.516096425836358*^9}, {3.516096474003113*^9, 3.51609656084508*^9}, {3.516096678938834*^9, 3.5160966792978554`*^9}, 3.5162145979199667`*^9, 3.516215742206416*^9, 3.5162163349323187`*^9, { 3.516216393204651*^9, 3.516216393616675*^9}, 3.516216852943947*^9, 3.516216886289854*^9, 3.5162172238591623`*^9, {3.516217992187108*^9, 3.516217992412121*^9}, {3.5162182837447844`*^9, 3.516218284301816*^9}, 3.516218961110527*^9, {3.516219194089853*^9, 3.5162192115168495`*^9}, 3.516219423968001*^9, 3.5162744825432615`*^9, {3.5163860108686123`*^9, 3.516386011136627*^9}, {3.516386620043455*^9, 3.516386631638118*^9}, { 3.516386987323462*^9, 3.516386989969613*^9}, {3.516387055217345*^9, 3.5163870565674224`*^9}, {3.539989461903721*^9, 3.5399894624787536`*^9}, 3.5399900589678707`*^9, 3.565002008222612*^9, 3.5650021936907*^9, { 3.56905712235543*^9, 3.569057173664209*^9}, {3.569057215473716*^9, 3.569057289134857*^9}, {3.569057320115192*^9, 3.569057378004887*^9}, { 3.569057431868946*^9, 3.569057482066408*^9}, {3.5721176622646*^9, 3.572117667158044*^9}, {3.572171295357701*^9, 3.572171342130227*^9}, { 3.572171515351029*^9, 3.572171659481154*^9}, {3.572171865999254*^9, 3.572171886895589*^9}, {3.572172550218518*^9, 3.572172556484424*^9}, 3.572172602670046*^9, {3.580640513743908*^9, 3.580640520942297*^9}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"RPCharacterization", "[", "Project", "]"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SCharacterization", "[", "Project", "]"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"AOCharacterization", "[", "Project", "]"}], "=", "True"}], ";"}]}], "Input", CellChangeTimes->{ 3.4747152700777316`*^9, {3.492548495590724*^9, 3.492548502050012*^9}, 3.5080248995183105`*^9, {3.5087640437020054`*^9, 3.508764045061373*^9}, 3.5087650617218018`*^9, {3.515956700432522*^9, 3.515956701185565*^9}, 3.5195536260592403`*^9, {3.5195541654450912`*^9, 3.5195541660201244`*^9}, { 3.5399894923614626`*^9, 3.5399894930725036`*^9}, {3.539990059901924*^9, 3.5399900605319605`*^9}, {3.580643307722729*^9, 3.580643323528796*^9}}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Selection-mutation", "SmallText", CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"SelMut", "[", "M_", "]"}], "[", RowBox[{"x_", ",", "F_"}], "]"}], ":=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Transpose", "[", RowBox[{"M", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], " ", ".", RowBox[{"DiagonalMatrix", "[", RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], ".", RowBox[{ RowBox[{"F", "[", "x", "]"}], "[", RowBox[{"[", "p", "]"}], "]"}]}], "-", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}], ".", RowBox[{ RowBox[{"F", "[", "x", "]"}], "[", RowBox[{"[", "p", "]"}], "]"}]}], ")"}], RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}]}]}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.492820444288142*^9, 3.492820452860469*^9}, { 3.569015767937372*^9, 3.569015795779592*^9}, {3.569015899370808*^9, 3.569015906907242*^9}, {3.580492102073976*^9, 3.580492103740049*^9}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"RPCharacterization", "[", RowBox[{"SelMut", "[", "___", "]"}], "]"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SCharacterization", "[", RowBox[{"SelMut", "[", "___", "]"}], "]"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"AOCharacterization", "[", RowBox[{"SelMut", "[", "___", "]"}], "]"}], "=", "False"}], ";"}]}], "Input", CellChangeTimes->{{3.492548506226017*^9, 3.4925485139371047`*^9}, 3.4933016786373487`*^9, 3.508024939135277*^9, 3.5087640556061897`*^9, 3.508765063103789*^9, 3.51955362675028*^9, {3.519674127376644*^9, 3.5196741311048574`*^9}, {3.580643400540533*^9, 3.5806434093876*^9}}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Other", "SmallText", CellTags->"corecell"], Cell["\<\ Define any other dynamic you want to use. When defining be sure you follow \ same style with previously defined dynamics. Otherwise, you may need to do \ major changes in the program.\ \>", "Text", CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"Other", "[", RowBox[{"x_", ",", "F_"}], "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], " ", RowBox[{ RowBox[{"Fhat", "[", RowBox[{"x", ",", "F"}], "]"}], "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.5079830610005217`*^9, 3.5079830610455866`*^9}, { 3.5079833766944675`*^9, 3.507983376724511*^9}, {3.518945584429287*^9, 3.5189455883805127`*^9}, {3.569015699525398*^9, 3.569015719450976*^9}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"RPCharacterization", "[", "Other", "]"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SCharacterization", "[", "Other", "]"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"AOCharacterization", "[", "Other", "]"}], "=", "False"}], ";"}]}], "Input", CellChangeTimes->{{3.4925485608745975`*^9, 3.492548575836111*^9}, { 3.4933015281709886`*^9, 3.493301530884891*^9}, 3.5080247495827136`*^9, 3.508764061971781*^9, 3.508764093225586*^9, 3.5087650661982384`*^9, 3.5195536284003744`*^9, {3.580643412938697*^9, 3.580643431690791*^9}}, CellTags->"corecell"] }, Closed]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Specification of graphical output", "Section", Evaluatable->False, ImageRegion->{{0, 1}, {0, 1}}, CellTags->"corecell"], Cell[CellGroupData[{ Cell["Specifications for phase diagram", "Subsection", CellChangeTimes->{{3.481670096105443*^9, 3.4816701004717216`*^9}, { 3.4818952324462385`*^9, 3.481895257672512*^9}}, CellTags->{"corecell", "opengroup"}], Cell[TextData[{ "These parameters are used for the phase diagram output. If you do not \ include a phase diagram in your output, these parameters are not used.\n", StyleBox["drawphasediagram", FontWeight->"Bold"], " = 1 creates a phase diagram on the simplex. The solution trajectories to \ be included are specified below.\n", StyleBox["ppoints", FontWeight->"Bold"], " determines how many points will be used when drawing the solution \ trajectories. " }], "Text", CellChangeTimes->{{3.480779243193115*^9, 3.4807792961292334`*^9}, 3.4807794713011184`*^9, {3.480779514703528*^9, 3.4807795412717314`*^9}, { 3.4807797587995887`*^9, 3.4807799035777693`*^9}, {3.4807799399500704`*^9, 3.4807799407712507`*^9}, {3.480780151674515*^9, 3.4807801526859694`*^9}, { 3.481756068394542*^9, 3.48175606959627*^9}, {3.4818061451898513`*^9, 3.481806188842621*^9}, {3.4818062519032974`*^9, 3.4818062577016354`*^9}, { 3.4919259064803376`*^9, 3.4919259068608847`*^9}, {3.4919260563057756`*^9, 3.4919260627650642`*^9}, {3.5100683019354763`*^9, 3.510068473377914*^9}, { 3.510068530424493*^9, 3.51006857697589*^9}, {3.510068612787033*^9, 3.510068703951317*^9}, {3.510068759140867*^9, 3.5100688299262753`*^9}, { 3.5100692555121937`*^9, 3.510069357549266*^9}, {3.511176334307261*^9, 3.511176581727478*^9}, 3.513021503086013*^9, {3.5194167157432723`*^9, 3.5194168216763315`*^9}, {3.5212851920957932`*^9, 3.5212852156631413`*^9}, 3.5212852464659033`*^9, {3.539432175056289*^9, 3.539432187888066*^9}, { 3.58047058100468*^9, 3.580470587926451*^9}, 3.580470623698844*^9}, CellTags->{"corecell", "differentacrossnotebooks"}], Cell[BoxData[{ RowBox[{ RowBox[{"drawphasediagram", "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ppoints", "=", "50"}], ";"}]}], "Input", CellChangeTimes->{{3.481806280424309*^9, 3.481806282507304*^9}, { 3.4818063574951315`*^9, 3.4818063682706256`*^9}, {3.4818908249685974`*^9, 3.48189083860821*^9}, {3.4885768700276413`*^9, 3.4885768707486777`*^9}, 3.491925934530672*^9, 3.491926043767747*^9, {3.4922641205846014`*^9, 3.492264120851182*^9}, {3.492281395059047*^9, 3.492281410260906*^9}, 3.492286630783717*^9, 3.492297153935402*^9, {3.5061812789763684`*^9, 3.5061812792768*^9}, {3.510068289177514*^9, 3.510068292042533*^9}, 3.510068713377421*^9, 3.5130268339300256`*^9, {3.5130268810177345`*^9, 3.5130268830907154`*^9}, {3.5192924812876534`*^9, 3.519292481527667*^9}, { 3.5193816914781847`*^9, 3.5193816917632008`*^9}, {3.51941560584579*^9, 3.519415608347933*^9}, 3.5194157881532173`*^9, 3.519416385575388*^9, 3.5194164874482145`*^9, {3.5194167057657013`*^9, 3.519416711592035*^9}, { 3.51941680417033*^9, 3.5194168075645237`*^9}, 3.5194200153079967`*^9, { 3.5194613167703047`*^9, 3.519461327157899*^9}, 3.521051310767626*^9, 3.521051367066846*^9, 3.539431974754329*^9, {3.539432064391229*^9, 3.539432064855665*^9}, 3.539619792046968*^9, 3.539620494060451*^9, { 3.53962682598835*^9, 3.539626828236417*^9}, {3.539882534934709*^9, 3.5398825375956583`*^9}, 3.540210947551487*^9, 3.540212683424498*^9, 3.540491511346945*^9, 3.540492204270289*^9, 3.540558787599379*^9, 3.540724630778364*^9, 3.540725546866185*^9, {3.540725654494421*^9, 3.540725654820567*^9}, 3.540725703784699*^9, 3.572107976225897*^9, { 3.572121670111249*^9, 3.572121698981408*^9}, {3.580470727732391*^9, 3.580470728761967*^9}}, CellTags->{"corecell", "differentacrossnotebooks"}], Cell[CellGroupData[{ Cell["Solution trajectories", "Subsubsection", CellChangeTimes->{{3.4818065979508896`*^9, 3.4818065990524735`*^9}}, CellTags->{"corecell", "opengroup"}], Cell[CellGroupData[{ Cell["\<\ Instructions for \"automated\" specification of solution trajectories\ \>", "SmallText", CellTags->"corecell"], Cell[TextData[{ "This section specifies the solution trajectories to be included in the \ phase diagram using built-in specifications. These are of three types:\n(i) \ initial conditions drawn from a grid, with the grid including points on the \ boundary; \n(ii) initial conditions drawn from a grid, with the grid \ excluding points on the boundary;\n(iii) randomly chosen initial conditions. \ \nTo use one of these options, press the appropriate button.\n", StyleBox["endtime", FontWeight->"Bold"], " determines the time interval [0, endtime] of each solution. \nFor the \ grid options, ", StyleBox["trajgridpoints", FontWeight->"Bold"], " specifies the number of initial conditions on each boundary of the grid. \ \nFor the random option, ", StyleBox["trajrandompoints", FontWeight->"Bold"], " specifies the number of random initial conditions.\n", StyleBox["trajnumberofarrows", FontWeight->"Bold"], " specifies how many arrows to draw on each solution. \n", StyleBox["trajarrowheadsize", FontWeight->"Bold"], " is self-explanatory; it can be set to zero if arrowheads are not desired. \ \nIf trajnumberofarrows = 1 is specified, the arrow appears at the end of \ each solution trajectory. If trajnumberofarrows = n, arrows are drawn at \ times {endtime/n, 2 endtime/n, ... , endtime}. For more on how arrows are \ drawn, see \[OpenCurlyDoubleQuote]Adjusting positions of arrow heads and \ \[OpenCurlyQuote]tails\[CloseCurlyQuote]\[CloseCurlyDoubleQuote] below.\n", StyleBox["trajectoriesopacity", FontWeight->"Bold"], " sets the degree of opacity (as opposed to transparency) of the \ trajectories and their arrows. In 3D graphing this option is useful to modify \ the visual impact of the trajectories relative to the overall 3D object.\n", StyleBox["trajectoriesthickness", FontWeight->"Bold"], " is self explanatory." }], "Text", CellChangeTimes->{ 3.481424833766508*^9, {3.4818092562232976`*^9, 3.4818092563935423`*^9}, 3.513021798180338*^9, {3.539433215841687*^9, 3.539433246993052*^9}, { 3.539433821477082*^9, 3.539433832818061*^9}, {3.539434275461132*^9, 3.539434279010791*^9}, {3.539434318514547*^9, 3.539434342122523*^9}, { 3.539434405891321*^9, 3.539434407890833*^9}, {3.5400646151573243`*^9, 3.5400646162743883`*^9}, {3.580470766363915*^9, 3.580470767300591*^9}, 3.580470983936261*^9, {3.582026419307255*^9, 3.58202642503957*^9}}, TextAlignment->Left, ImageRegion->{{0, 1}, {0, 1}}, FontFamily->"Palatino", CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[CellGroupData[{ Cell["\<\ Instructions for \"manual\" specification of solution trajectories\ \>", "SmallText", CellTags->"corecell"], Cell[TextData[{ "The user can also specify which solution trajectores to graph directly. To \ do this, trajectoryspecs must be defined as a table of the following form: \ {{{initial condition 1}, T1, {color1, thickness1, dashing1,opacity1},{Arrow \ positions 1}, {Head lengths 1}}, {{initial condition 2}, T2, {color2, \ thickness2, dashing2,opacity2}, {Arrow positions 2}, {Head lengths 2}}, ... }\ \nEach initial condition is entered as a vector in the simplex (e.g.,{1/4, \ 1/4, 1/4,1/4}). Ti determines time interval [0, Ti] of the ith solution. \ Arrow positions i and Head lengths i should be vectors of the same length, \ where this length is the number of arrowheads to be drawn on the solution \ trajectory. Arrow positions are stated as points in the time interval [0, \ Ti]. For no arrows, set Arrow positions i and Head lengths i to {0}. \n\n\ {color", StyleBox["i, ", FontSlant->"Italic"], StyleBox["thickness", FontVariations->{"CompatibilityType"->0}], StyleBox["i,", FontSlant->"Italic"], StyleBox[" dashing", FontVariations->{"CompatibilityType"->0}], StyleBox["i", FontSlant->"Italic"], "} specifies the appearance of solutions trajectories. You can specify any \ collection of graphics primitives you like (even ones beyond the three \ mentioned here), and you can place them in any order. To use the default \ appearance, write {}. \ncolor", StyleBox["i", FontSlant->"Italic"], " can be Hue[?], GrayLevel[?] or any other color command.\nthickness", StyleBox["i", FontSlant->"Italic"], " can be Thickness[?] or AbsoluteThickness[?].\ndashing", StyleBox["i", FontSlant->"Italic"], " is spcified as Dashing[{???}].\nopacity", StyleBox["i", FontSlant->"Italic"], " is spcified as Opacity[{???}].\nAn especial option allows for a changing \ color trayectory to be drawn if color", StyleBox["i ", FontSlant->"Italic"], "is replaced with \[OpenCurlyDoubleQuote]rainbow\[CloseCurlyDoubleQuote], \ which must be written including the quotation marks. In order for this option \ to work, the text \[OpenCurlyDoubleQuote]rainbow\[CloseCurlyDoubleQuote] must \ be the first of the options in the triple {\[OpenCurlyDoubleQuote]rainbow\ \[CloseCurlyDoubleQuote]", StyleBox[", ", FontSlant->"Italic"], StyleBox["thickness", FontVariations->{"CompatibilityType"->0}], StyleBox["i,", FontSlant->"Italic"], StyleBox[" dashing", FontVariations->{"CompatibilityType"->0}], StyleBox["i", FontSlant->"Italic"], "}." }], "Text", CellChangeTimes->{ 3.4817566837694077`*^9, {3.521285283322011*^9, 3.521285334371931*^9}, 3.580471102231299*^9}, CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"endtime", "=", "1"}], ";"}], "\[IndentingNewLine]", " "}], "\n", RowBox[{ RowBox[{ RowBox[{"trajgridpoints", "=", "6"}], ";"}], " "}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"trajrandompoints", "=", "1"}], " ", ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"trajnumberofarrows", "=", "1"}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"trajarrowheadsize", "=", ".01"}], ";"}], " ", "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"trajectoriesopacity", "=", ".3"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"trajectoriesthickness", "=", ".005"}], ";"}]}], "Input", CellChangeTimes->{ 3.481809280788621*^9, 3.5134232572399387`*^9, 3.513423396507904*^9, { 3.5136206174134245`*^9, 3.5136206290470905`*^9}, {3.515957283776887*^9, 3.5159572851439657`*^9}, 3.515958930041048*^9, 3.539433842060571*^9, { 3.539434289866266*^9, 3.539434290410024*^9}, 3.53943435018953*^9, 3.539434393222518*^9, 3.5400646214486837`*^9, {3.540491436517138*^9, 3.540491436947617*^9}, 3.580471126844527*^9, {3.606654166947829*^9, 3.606654170753431*^9}, {3.607808887054439*^9, 3.607808887660409*^9}}, CellTags->{"corecell", "differentacrossnotebooks"}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"matrixButtons", "[", "rowsize_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "namesl", ",", "textsl", ",", "discard", ",", "names", " ", ",", "texts", ",", "buttons", ",", "row", ",", "butrow", ",", "rown", ",", "rowt", ",", "name", ",", "text", ",", "but", ",", "button"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"namesl", " ", "=", RowBox[{"{", " ", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"textsl", " ", "=", " ", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ "\"\\"", "\[IndentingNewLine]", ",", "\[IndentingNewLine]", "\"\\"", "\[IndentingNewLine]", ",", "\[IndentingNewLine]", "\"\\""}], "\[IndentingNewLine]", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"names", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"texts", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"rown", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"rowt", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"row", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{"row", "<=", RowBox[{ RowBox[{"Dimensions", "[", "namesl", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"rown", "=", RowBox[{"Join", "[", RowBox[{"rown", ",", RowBox[{"{", RowBox[{"namesl", "[", RowBox[{"[", "row", "]"}], "]"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"rowt", "=", RowBox[{"Join", "[", RowBox[{"rowt", ",", RowBox[{"{", RowBox[{"textsl", "[", RowBox[{"[", "row", "]"}], "]"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"Or", "[", RowBox[{ RowBox[{"IntegerQ", "[", RowBox[{"row", "/", "rowsize"}], "]"}], ",", RowBox[{"row", "==", RowBox[{ RowBox[{"Dimensions", "[", "namesl", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"names", "=", RowBox[{"Join", "[", RowBox[{"names", ",", RowBox[{"{", "rown", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"texts", "=", RowBox[{"Join", "[", RowBox[{"texts", ",", RowBox[{"{", "rowt", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"rown", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"rowt", "=", RowBox[{"{", "}"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"row", "++"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"buttons", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"row", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{"row", "<=", RowBox[{ RowBox[{"Dimensions", "[", "names", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"butrow", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"but", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", " ", RowBox[{ RowBox[{"but", "<=", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"names", "[", RowBox[{"[", "row", "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"button", ":=", "\[IndentingNewLine]", RowBox[{"Button", "[", RowBox[{ RowBox[{"Column", "[", RowBox[{ RowBox[{"{", "name", "}"}], ",", RowBox[{"Alignment", "\[Rule]", RowBox[{"{", "Center", "}"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", "\"\\"", ",", "Next", ",", "CellTags", ",", RowBox[{"AutoScroll", "->", "False"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"SelectionMove", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", "All", ",", "CellContents", ",", RowBox[{"AutoScroll", "->", "False"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"NotebookWrite", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", "text", ",", RowBox[{"AutoScroll", "->", "False"}]}], "]"}], ";"}]}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{",", RowBox[{"ImageSize", "\[Rule]", RowBox[{"{", RowBox[{"400", ",", "30"}], "}"}]}]}], "*)"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"button", "=", RowBox[{ RowBox[{ RowBox[{"Style", "[", RowBox[{"button", ",", RowBox[{ "ControlsRendering", "\[Rule]", "\"\\""}]}], "]"}], " ", "/.", RowBox[{"text", "->", RowBox[{ RowBox[{"texts", "[", RowBox[{"[", "row", "]"}], "]"}], "[", RowBox[{"[", "but", "]"}], "]"}]}]}], "/.", RowBox[{"name", "->", RowBox[{ RowBox[{"names", "[", RowBox[{"[", "row", "]"}], "]"}], "[", RowBox[{"[", "but", "]"}], "]"}]}]}]}], ";", "\[IndentingNewLine]", RowBox[{"butrow", "=", RowBox[{"Join", "[", RowBox[{"butrow", ",", RowBox[{"{", "button", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"butrow", "=", RowBox[{"Join", "[", RowBox[{"butrow", ",", RowBox[{"{", RowBox[{ RowBox[{"Row", "[", RowBox[{"{", "\"\< \>\"", "}"}], "]"}], ",", "button"}], "}"}]}], "]"}]}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{"but", "++"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"buttons", "=", RowBox[{"Join", "[", RowBox[{"buttons", ",", RowBox[{"{", "butrow", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"row", "++"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"TableForm", " ", "[", " ", RowBox[{"buttons", ",", RowBox[{"TableAlignments", "->", RowBox[{"{", RowBox[{"Left", ",", "Top"}], "}"}]}], ",", RowBox[{"TableSpacing", "\[Rule]", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}]}]}], "]"}]}]}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Column", "[", "buttons", "]"}], "*)"}], "\[IndentingNewLine]", "]"}]}], ";"}], "\n", RowBox[{"matrixButtons", "[", "3", "]"}]}], "Input", Evaluatable->False, CellOpen->False, CellChangeTimes->{{3.4813040162966223`*^9, 3.4813041889350376`*^9}, { 3.481304234246958*^9, 3.481304348854866*^9}, {3.4813044130259194`*^9, 3.4813044667127323`*^9}, {3.481304497212342*^9, 3.481304516258973*^9}, { 3.481304591711132*^9, 3.481304623616974*^9}, {3.481304658444653*^9, 3.481304715787669*^9}, {3.481304754318426*^9, 3.481304856879613*^9}, { 3.481304924394374*^9, 3.481304929097439*^9}, {3.4813049637844944`*^9, 3.481305049955267*^9}, {3.481305109251383*^9, 3.4813052103282137`*^9}, { 3.4813052726867905`*^9, 3.4813054179505563`*^9}, {3.4813054936370873`*^9, 3.481305606760639*^9}, {3.481305668931719*^9, 3.4813057399464345`*^9}, { 3.4813058200547843`*^9, 3.4813059389126377`*^9}, {3.481305992286955*^9, 3.4813059950056696`*^9}, {3.4813060594423447`*^9, 3.4813061026605415`*^9}, {3.4813061575348396`*^9, 3.4813061668159704`*^9}, 3.4813062421118817`*^9, 3.4813062726896152`*^9, {3.481306358922887*^9, 3.481306400750476*^9}, {3.481306526514491*^9, 3.4813065369518576`*^9}, { 3.4813065678420877`*^9, 3.481306572404529*^9}, 3.481306608185321*^9, { 3.4813066523878803`*^9, 3.481306668168928*^9}, {3.481306704777835*^9, 3.4813067154651976`*^9}, 3.481306939040461*^9, {3.4813069856961136`*^9, 3.4813069858836117`*^9}, 3.481307054163987*^9, {3.481307101772753*^9, 3.4813071138350983`*^9}, {3.481307407643838*^9, 3.4813077466394987`*^9}, { 3.4813077909826813`*^9, 3.48130781959169*^9}, {3.4813078599192986`*^9, 3.481307957918044*^9}, {3.481308040010743*^9, 3.481308046416911*^9}, 3.4813080794633636`*^9, 3.4813081524936786`*^9, {3.481308210524186*^9, 3.481308338163177*^9}, 3.4813083718189964`*^9, {3.4813085571447487`*^9, 3.481308586503748*^9}, {3.4813086184408393`*^9, 3.481308738251806*^9}, { 3.481308930858715*^9, 3.4813091517777624`*^9}, {3.4813091950740833`*^9, 3.481309202620862*^9}, {3.4813099727203794`*^9, 3.4813100351414557`*^9}, { 3.4813100751096935`*^9, 3.4813101295777464`*^9}, {3.481310159749235*^9, 3.4813101717647066`*^9}, {3.4813102025768123`*^9, 3.481310210326713*^9}, { 3.4813102772946057`*^9, 3.4813103037630167`*^9}, {3.4813103642778673`*^9, 3.4813104031523695`*^9}, {3.4813110125508194`*^9, 3.48131103905048*^9}, { 3.4813110842686515`*^9, 3.4813111395023193`*^9}, {3.4813117891346292`*^9, 3.481311813509317*^9}, {3.4813118455401573`*^9, 3.481311848555743*^9}, { 3.481311983491516*^9, 3.481311996303852*^9}, {3.481312245331915*^9, 3.481312262878565*^9}, {3.4813124766258287`*^9, 3.4813124780789356`*^9}, { 3.481312562234108*^9, 3.4813125631559715`*^9}, {3.481313376067441*^9, 3.4813133832704735`*^9}, {3.4813140008563185`*^9, 3.4813141425888796`*^9}, {3.481314173932228*^9, 3.4813141780571756`*^9}, { 3.481314220525382*^9, 3.4813142451031923`*^9}, {3.4813143191022453`*^9, 3.481314320055358*^9}, {3.481314353383056*^9, 3.481314360445466*^9}, { 3.4813144028980474`*^9, 3.481314405194893*^9}, {3.4813144915531626`*^9, 3.4813145915675077`*^9}, {3.4813146929724593`*^9, 3.481314706347288*^9}, { 3.4813148354706354`*^9, 3.4813148468611145`*^9}, {3.4813157963547544`*^9, 3.4813158533558493`*^9}, {3.481315901981783*^9, 3.481315960669737*^9}, { 3.481316084544737*^9, 3.481316093107237*^9}, {3.481316151857237*^9, 3.481316184232237*^9}, {3.481316289559544*^9, 3.481316322527872*^9}, { 3.4813163535431004`*^9, 3.481316372355359*^9}, {3.481316418932888*^9, 3.481316420276621*^9}, {3.4813164900569777`*^9, 3.481316570165327*^9}, { 3.48131666333601*^9, 3.481316718241557*^9}, 3.4813167995217667`*^9, { 3.4813168815207167`*^9, 3.4813168975517616`*^9}, {3.4813169714570656`*^9, 3.481316996425496*^9}, {3.4813170544403787`*^9, 3.481317077674456*^9}, { 3.481317108767808*^9, 3.4813171147208567`*^9}, {3.481317148236053*^9, 3.481317162079626*^9}, {3.4813172156883144`*^9, 3.4813172161570587`*^9}, { 3.4813172564065437`*^9, 3.4813172577815256`*^9}, {3.481317415967001*^9, 3.4813174182013474`*^9}, {3.481318095723925*^9, 3.481318181488452*^9}, 3.481318284596507*^9, {3.481318343611377*^9, 3.4813184077043066`*^9}, { 3.481318575702156*^9, 3.481318581561456*^9}, {3.4813186265921297`*^9, 3.4813186395294642`*^9}, {3.481319531174301*^9, 3.4813195706269207`*^9}, { 3.4813301870935183`*^9, 3.481330195575715*^9}, {3.481330234031011*^9, 3.481330240229925*^9}, {3.4813303413653507`*^9, 3.481330348635805*^9}, 3.481381740593504*^9, {3.48138186256188*^9, 3.4813818701868315`*^9}, 3.4814015869376*^9, {3.481405450326758*^9, 3.4814055598442364`*^9}, { 3.4814056617908287`*^9, 3.481405789714774*^9}, {3.4814058901191483`*^9, 3.4814059033681993`*^9}, {3.481405941803467*^9, 3.481405984975545*^9}, { 3.481406077548659*^9, 3.481406079601611*^9}, 3.481406131906822*^9, { 3.4814061894595785`*^9, 3.4814061927543163`*^9}, {3.481406239131003*^9, 3.481406257597556*^9}, {3.481406398980856*^9, 3.481406411659086*^9}, { 3.4814064803979273`*^9, 3.481406480728403*^9}, {3.481406518092129*^9, 3.4814066497113886`*^9}, {3.4814066834098444`*^9, 3.48140673647615*^9}, { 3.481408508784604*^9, 3.4814085588966618`*^9}, {3.481408601387761*^9, 3.481408603090209*^9}, {3.4814086420261965`*^9, 3.4814087494506655`*^9}, { 3.4814087986514125`*^9, 3.481408857345811*^9}, {3.4814089003977165`*^9, 3.4814089629676876`*^9}, 3.4814131600728283`*^9, 3.4814132208702507`*^9, { 3.4814132796547785`*^9, 3.481413291952462*^9}, {3.481413334613806*^9, 3.481413495364955*^9}, {3.4814135595772877`*^9, 3.4814136320014286`*^9}, { 3.4814137487793465`*^9, 3.481413779022835*^9}, {3.481414435946512*^9, 3.481414512348054*^9}, {3.4814148679674177`*^9, 3.48141493700995*^9}, { 3.481415020183816*^9, 3.4814150755877504`*^9}, {3.481415141352315*^9, 3.481415154190776*^9}, {3.4814151844943504`*^9, 3.4814152094502354`*^9}, { 3.481415278549595*^9, 3.4814152928501587`*^9}, {3.481415420553787*^9, 3.4814154999078927`*^9}, {3.481415562497893*^9, 3.481415584309256*^9}, { 3.481415703060011*^9, 3.481415703450573*^9}, 3.4814158990017614`*^9, { 3.4814171364611406`*^9, 3.4814171462952814`*^9}, {3.481424072987533*^9, 3.4814241197147236`*^9}, {3.4814832782005634`*^9, 3.4814832867829046`*^9}, 3.4816703314238143`*^9, {3.481670369408434*^9, 3.4816704575852256`*^9}, { 3.4816706146811185`*^9, 3.4816707845954432`*^9}, {3.4816708405859537`*^9, 3.481670920480837*^9}, {3.4816709715042048`*^9, 3.4816709719949102`*^9}, { 3.4816711094525647`*^9, 3.4816711098431263`*^9}, {3.4816711965377874`*^9, 3.481671238237749*^9}, {3.4816713148579235`*^9, 3.481671340214384*^9}, { 3.4816713745737906`*^9, 3.4816716260353746`*^9}, {3.481671755331293*^9, 3.481671785134147*^9}, {3.4816718832952957`*^9, 3.4816719397865267`*^9}, 3.4816719758984528`*^9, {3.481673176244466*^9, 3.4816732875745506`*^9}, 3.4816733183988733`*^9, {3.481673362101715*^9, 3.4816733707441425`*^9}, 3.481673653340496*^9, {3.4816745940231314`*^9, 3.4816746022149105`*^9}, { 3.4817346006152563`*^9, 3.481734607925768*^9}, {3.481736647042942*^9, 3.481736703093539*^9}, 3.4817375426908207`*^9, {3.4818119966889615`*^9, 3.481812002957976*^9}, {3.481812105737727*^9, 3.481812272981318*^9}, { 3.4818124484235916`*^9, 3.481812457366451*^9}, {3.481812498485577*^9, 3.481812523040886*^9}, {3.4818125683860893`*^9, 3.4818125706493435`*^9}, { 3.481812612139003*^9, 3.481812639708646*^9}, {3.4818128485990157`*^9, 3.481812864662113*^9}, {3.4818129721767116`*^9, 3.4818130553963757`*^9}, { 3.4818132379588876`*^9, 3.4818133245333757`*^9}, {3.481813355407771*^9, 3.4818133663935676`*^9}, 3.4818134196132183`*^9, {3.4818134879827776`*^9, 3.481813489202236*^9}, {3.4818136452104654`*^9, 3.481813661273563*^9}, { 3.4818137634451456`*^9, 3.481813778596933*^9}, {3.4818140028480997`*^9, 3.481814031477353*^9}, {3.481814092975784*^9, 3.4818141259632177`*^9}, { 3.4818141856590557`*^9, 3.4818141929395247`*^9}, {3.4818142536968894`*^9, 3.481814383273211*^9}, {3.4818144211176286`*^9, 3.4818145387768145`*^9}, { 3.4818146624446397`*^9, 3.4818146646778507`*^9}, {3.48181469749504*^9, 3.4818147106439466`*^9}, {3.4818472323981695`*^9, 3.4818473124933405`*^9}, {3.481847364648336*^9, 3.4818474569710894`*^9}, { 3.507981953563105*^9, 3.507981966646919*^9}, {3.5079865809770546`*^9, 3.5079866832591286`*^9}, {3.507986721714425*^9, 3.5079867637448616`*^9}, { 3.5079868085843377`*^9, 3.507986986620341*^9}, {3.5079870295520735`*^9, 3.507987181899712*^9}, {3.507987333026555*^9, 3.5079873437946544`*^9}, { 3.5105193489668736`*^9, 3.510519350999797*^9}, {3.510519404586851*^9, 3.510519410515376*^9}, {3.5117094690182247`*^9, 3.511709486092777*^9}, { 3.5117095343822136`*^9, 3.511709551416708*^9}, {3.511709796353978*^9, 3.511709826327078*^9}, {3.511715675478099*^9, 3.5117156806054716`*^9}, { 3.519324618693808*^9, 3.5193246409330797`*^9}, {3.519324753375511*^9, 3.519324841867573*^9}, {3.5193251521983223`*^9, 3.5193251948707633`*^9}, { 3.539551835075803*^9, 3.539551873357003*^9}, {3.5396906649042387`*^9, 3.539690667737631*^9}, 3.539690755204133*^9, {3.5396907960792*^9, 3.539690808792769*^9}, {3.539690870343981*^9, 3.539690897352824*^9}, { 3.5396926439816303`*^9, 3.539692679204557*^9}, 3.539719681314678*^9, { 3.540064551660692*^9, 3.5400645537998147`*^9}, 3.565001653120204*^9, { 3.565001765459861*^9, 3.565001766205109*^9}, {3.565002099512886*^9, 3.565002100235359*^9}, 3.580501673155189*^9, {3.580501746058147*^9, 3.580501760605463*^9}, {3.580501804221899*^9, 3.580501804842731*^9}, { 3.60665432052785*^9, 3.606654359715038*^9}}, CellTags->{"buttoncell", "corecell", "differentacrossnotebooks", "notopen"}], Cell[BoxData[ TagBox[GridBox[{ { StyleBox[ ButtonBox[ TagBox[GridBox[{ {"\<\"Grid initial conditions (boundary included)\"\>"} }, GridBoxAlignment->{"Columns" -> {{Center}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"], Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_trajectoryspecs", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], "trajectoryspecs =Module[{ds,arrows,arrowheads}, \ \[IndentingNewLine]ds=Tuples[Table[discSimplex[trajgridpoints-1,dim[[p]]],{p,\ pop}]];\[IndentingNewLine]arrows=Table[((trajnumberofarrows - j + \ 1)*endtime)/trajnumberofarrows,{j,trajnumberofarrows}];\[IndentingNewLine]\ arrowheads=ConstantArray[trajarrowheadsize,trajnumberofarrows];\ \[IndentingNewLine]Table[{ds[[j]],endtime,{Black,Thickness[\ trajectoriesthickness],Opacity[trajectoriesopacity]},arrows,arrowheads},{j,\ Dimensions[ds][[1]]}]\[IndentingNewLine]];", AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False], StyleBox[ ButtonBox[ TagBox[GridBox[{ {"\<\"Grid initial conditions (boundary excluded)\"\>"} }, GridBoxAlignment->{"Columns" -> {{Center}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"], Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_trajectoryspecs", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], "trajectoryspecs =Module[{ds,dsp,arrows,arrowheads}, \ \[IndentingNewLine]ds=Tuples[Table[\[IndentingNewLine]dsp=discSimplex[\ trajgridpoints,dim[[p]]]+1/(dim[[p]]*trajgridpoints);\[IndentingNewLine]dsp=\ Table[Append[Drop[dsp[[j]],-1],dsp[[j,dim[[p]]]]-1/trajgridpoints],{j,\ Dimensions[dsp][[1]]}];\[IndentingNewLine]DeleteCases[Table[If[Min[dsp[[j]]]<\ 0,Infinity,dsp[[j]]],{j,Dimensions[dsp][[1]]}],Infinity],{p,pop}]];\ \[IndentingNewLine]arrows=Table[((trajnumberofarrows - j + \ 1)*endtime)/trajnumberofarrows,{j,trajnumberofarrows}];\[IndentingNewLine]\ arrowheads=ConstantArray[trajarrowheadsize,trajnumberofarrows];\ \[IndentingNewLine]Table[{ds[[j]],endtime,{Black,Thickness[\ trajectoriesthickness],Opacity[trajectoriesopacity]},arrows,arrowheads},{j,\ Dimensions[ds][[1]]}]\[IndentingNewLine]];", AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False], StyleBox[ ButtonBox[ TagBox[GridBox[{ {"\<\"Random initial conditions\"\>"} }, GridBoxAlignment->{"Columns" -> {{Center}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"], Appearance->Automatic, ButtonFunction:>(NotebookFind[ SelectedNotebook[], "unique_trajectoryspecs", Next, CellTags, AutoScroll -> False]; SelectionMove[ SelectedNotebook[], All, CellContents, AutoScroll -> False]; NotebookWrite[ SelectedNotebook[], "trajectoryspecs=Module[{ds,arrows,arrowheads}, \ \[IndentingNewLine]ds=Tuples[Table[sampleAround[ConstantArray[1/dim[[p]],dim[[\ p]]],1,trajrandompoints],{p,pop}]];\[IndentingNewLine]arrows=Table[((\ trajnumberofarrows - j + \ 1)*endtime)/trajnumberofarrows,{j,trajnumberofarrows}];\[IndentingNewLine]\ arrowheads=ConstantArray[trajarrowheadsize,trajnumberofarrows];\ \[IndentingNewLine]Table[{ds[[j]],endtime,{Black,Thickness[\ trajectoriesthickness],Opacity[trajectoriesopacity]},arrows,arrowheads},{j,\ Dimensions[ds][[1]]}]\[IndentingNewLine]];", AutoScroll -> False]; Null), Evaluator->Automatic, Method->"Preemptive"], ControlsRendering->"Generic", StripOnInput->False]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Top}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], Function[BoxForm`e$, TableForm[ BoxForm`e$, TableAlignments -> {Left, Top}, TableSpacing -> {1, 1}]]]], "Output", CellOpen->True, CellChangeTimes->{3.606654430177985*^9}, CellTags->{"buttoncell", "corecell", "differentacrossnotebooks", "notopen"}] }, {2}]], Cell[BoxData[ RowBox[{ RowBox[{"trajectoryspecs", " ", "=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"ds", ",", "arrows", ",", "arrowheads"}], "}"}], ",", " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"ds", "=", RowBox[{"Tuples", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"discSimplex", "[", RowBox[{ RowBox[{"trajgridpoints", "-", "1"}], ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"arrows", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{ "trajnumberofarrows", " ", "-", " ", "j", " ", "+", " ", "1"}], ")"}], "*", "endtime"}], ")"}], "/", "trajnumberofarrows"}], ",", RowBox[{"{", RowBox[{"j", ",", "trajnumberofarrows"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"arrowheads", "=", RowBox[{"ConstantArray", "[", RowBox[{"trajarrowheadsize", ",", "trajnumberofarrows"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"ds", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "endtime", ",", RowBox[{"{", RowBox[{"Black", ",", RowBox[{"Thickness", "[", "trajectoriesthickness", "]"}], ",", RowBox[{"Opacity", "[", "trajectoriesopacity", "]"}]}], "}"}], ",", "arrows", ",", "arrowheads"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "ds", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{ 3.4817567343220987`*^9, 3.481807372905219*^9, {3.5079235560433884`*^9, 3.507923564725873*^9}, {3.507925809258556*^9, 3.507925810690615*^9}, { 3.5079874903813033`*^9, 3.5079875239621964`*^9}, {3.510519362265997*^9, 3.5105193631672926`*^9}, 3.5117094969584007`*^9, {3.51170973474539*^9, 3.5117097378097963`*^9}, {3.51938224492784*^9, 3.5193822963247795`*^9}, { 3.519382334668973*^9, 3.5193823723791294`*^9}, {3.5193832967460003`*^9, 3.5193833046814547`*^9}, 3.5394338640243*^9, {3.539434362690551*^9, 3.539434364795268*^9}, 3.539434396379584*^9, 3.5400646390026884`*^9, 3.565002067417076*^9, {3.569611581528829*^9, 3.569611786742373*^9}, { 3.569611855021561*^9, 3.569611859035142*^9}}, ImageRegion->{{0, 1}, {0, 1}}, CellTags->{"corecell", "differentacrossnotebooks", "unique_trajectoryspecs"}] }, Open ]], Cell[CellGroupData[{ Cell["Tuning rest point search", "Subsubsection", CellTags->"corecell"], Cell[TextData[{ StyleBox["restPointSearchStartingValues", FontWeight->"Bold"], " contains the initial conditions used in the FindRoot command when the \ program searches for rest points. If you suspect that the program has missed \ some rest points, add initial conditions in the regions where the missing \ rest points should be. Each initial condition is written as a state.\nr", StyleBox["estTolerance", FontWeight->"Bold"], " is a parameter in a filtering procedure used to eliminate false rest \ points. If the speed of the dynamic at a prospective rest point is above \ (restTolerance) * (the maximum speed of the dynamic), the prospective rest \ point is thrown out." }], "Text", CellChangeTimes->{{3.56882947576603*^9, 3.568829482425709*^9}, { 3.568829529260814*^9, 3.56882953807912*^9}, {3.568829754521962*^9, 3.568829768596121*^9}, {3.568968871098573*^9, 3.568968884276089*^9}, { 3.56896896781003*^9, 3.568968990663157*^9}}, CellTags->{"corecell", "differentacrossnotebooks"}], Cell[BoxData[ RowBox[{ RowBox[{"restPointSearchStartingValues", "=", RowBox[{"Join", "[", RowBox[{ RowBox[{"Tuples", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"discSimplex", "[", RowBox[{"10", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}], ",", "True", ",", ".001"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], "]"}], ",", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{".97", ",", ".01", ",", ".01", ",", ".01"}], "}"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"{", RowBox[{".01", ",", ".01", ",", ".01", ",", ".97"}], "}"}], "}"}]}], "\[IndentingNewLine]", "}"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.480922639796361*^9, 3.480922673983642*^9}, { 3.480922804389057*^9, 3.4809229535131025`*^9}, {3.480922984231656*^9, 3.480923055090578*^9}, {3.4809230871372476`*^9, 3.4809232712766943`*^9}, { 3.4809234030414762`*^9, 3.4809235202126007`*^9}, {3.4809236287275314`*^9, 3.4809237248362913`*^9}, {3.4926953249263363`*^9, 3.4926953254771285`*^9}, {3.4928139689319696`*^9, 3.492814011423069*^9}, { 3.492814079571061*^9, 3.4928141143510723`*^9}, {3.492817964131853*^9, 3.4928179664251504`*^9}, {3.4928180248591747`*^9, 3.4928180553830657`*^9}, {3.492818088240312*^9, 3.492818089712429*^9}, { 3.492818168435627*^9, 3.4928181695972977`*^9}, {3.492818218307339*^9, 3.4928183427162304`*^9}, {3.492818377205824*^9, 3.492818451172182*^9}, 3.492827194714779*^9, {3.507981971333658*^9, 3.50798197163409*^9}, 3.565002068208459*^9, {3.568829487289989*^9, 3.568829498535058*^9}, { 3.568829994856287*^9, 3.568830047428281*^9}, {3.568830084916213*^9, 3.568830215366356*^9}, {3.568840742665304*^9, 3.56884074906985*^9}, 3.568968894985311*^9, {3.5689690430743*^9, 3.568969048387814*^9}, 3.57891481748318*^9, {3.58047123662477*^9, 3.580471252599594*^9}, { 3.580500725458219*^9, 3.580500733717546*^9}}, CellTags->{"corecell", "differentacrossnotebooks"}], Cell[BoxData[ RowBox[{ RowBox[{"restTolerance", "=", ".01"}], " ", ";"}]], "Input", CellChangeTimes->{{3.568829484694987*^9, 3.568829485595406*^9}}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Tuning stability tests", "Subsubsection", CellTags->"corecell"], Cell[TextData[{ "The first four parameters determine how rest points are checked for \ stability. The parameter ", StyleBox["stabn", FontWeight->"Bold"], " specifies how many trajectories will be checked. These initial conditions \ are random points at distance ", StyleBox["stabeps", FontWeight->"Bold"], " from the rest point. Solutions from these points over the time interval \ [0, ", StyleBox["stabT", FontWeight->"Bold"], "] are computed. If any of these solutions winds up more than ", StyleBox["stabdelta", FontWeight->"Bold"], " away from the rest point, the rest point is considered unstable; otherwise \ it is considered stable. Notice that ", StyleBox["stabeps ", FontWeight->"Bold"], "should be large relative to ", StyleBox["stabdelta", FontWeight->"Bold"], " and at least four times as big for the algorithm to work properly.\n\n\ Extra notes: if ", StyleBox["stabdelta", FontWeight->"Bold"], " is set too small, stable rest points wont be detected unless ", StyleBox["stabT", FontWeight->"Bold"], " is large giving time for the trajectories to converge. However, for large \ values of ", StyleBox["stabT", FontWeight->"Bold"], " the algorithm will tend to interpret saddles as sources, although this is \ a distinction of secondary importance in general, so that in principle a safe \ way to run the algorithm is with relatively large values of ", StyleBox["stabeps", FontWeight->"Bold"], " compared with ", StyleBox["stabdelta", FontWeight->"Bold"], " and a generous time span ", StyleBox["stabT", FontWeight->"Bold"], ". There is a way to differentiate sources from saddles and cycles. Notice \ that there will be an inevitable computational burden since this distinction \ will require large values for ", StyleBox["stabn", FontWeight->"Bold"], " so that even for a large ", StyleBox["stabT", FontWeight->"Bold"], " after enough sampling around the rest point at least one of the sampled \ surrounding starting conditions will be close enough to the direction that \ converges to the rest point and stay in it's proximity in spite of the large \ time span. To have the algorithm determine whether a ", "rest point", " is a sink, a source, a cycle or a saddle the numericStabilityTest[] \ routine is available. Evaluate numericStabilityTest::notes to learn about its \ arguments, and ?numericStabilityTest for its general definition and output \ values." }], "Text", CellChangeTimes->{{3.4928856154045706`*^9, 3.492885721637326*^9}, { 3.492885788121913*^9, 3.4928860704940248`*^9}, {3.4928861138864202`*^9, 3.4928864044942937`*^9}, {3.492886440556148*^9, 3.4928857544456997`*^9}, { 3.4928859920723906`*^9, 3.4928859973750153`*^9}, {3.492886520772624*^9, 3.492886568060621*^9}, {3.4928866139065437`*^9, 3.4928866272156816`*^9}, { 3.521285369708952*^9, 3.521285396506485*^9}, {3.539693516829969*^9, 3.53969360203141*^9}, {3.539693699915825*^9, 3.5396937641193113`*^9}, { 3.565003029932379*^9, 3.565003033988022*^9}, {3.568976016107743*^9, 3.568976018899113*^9}}, ImageRegion->{{0, 1}, {0, 1}}, FontFamily->"Palatino", CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"stabn", "=", "10"}], ";"}], " "}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"stabeps", "=", ".01"}], " ", ";"}], " "}], "\[IndentingNewLine]", RowBox[{ RowBox[{"stabdelta", "=", ".0025"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"stabT", "=", "10"}], " ", ";"}], " "}]}], "Input", CellChangeTimes->{ 3.4928838040627327`*^9, {3.4928839440340014`*^9, 3.492883949622037*^9}, { 3.492885561517084*^9, 3.4928855948950796`*^9}, {3.4928857740277257`*^9, 3.4928857914889655`*^9}, 3.4932705602640047`*^9, {3.4932902238639407`*^9, 3.4932902240942717`*^9}, 3.4932902739359407`*^9, {3.4932903619024305`*^9, 3.4932903646664047`*^9}, 3.493290559396413*^9, 3.4932906137645903`*^9, { 3.4932915007299843`*^9, 3.49329150113056*^9}, 3.5211498178374615`*^9, 3.5396935361860228`*^9, 3.539693607445776*^9, {3.539693749437049*^9, 3.5396937499651003`*^9}, 3.539693838635762*^9}, ImageRegion->{{0, 1}, {0, 1}}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Adjusting the position of arrows", "Subsubsection", CellChangeTimes->{{3.540035928694006*^9, 3.5400359296516275`*^9}, { 3.5400359833319445`*^9, 3.540035994338842*^9}}, CellTags->"corecell"], Cell[TextData[{ "To draw an arrow, the program must know where to put the tail of the arrow \ and where to put the head. Even if one does not want the base-line of the \ arrow to appear in the picture, the position of its starting point must be \ specified so that the arrow points in some direction. \nThe parameter ", StyleBox["relarrowstart", FontWeight->"Bold"], " below determines the positions of arrows' base-lines when arrows are \ drawn on solution trajectories. In particular, if an arrow is supposed to \ appear at a solution trajectory's position at time t, the program draws the \ end of the line at this point, placing the starting point (and therefore \ changing the direction of the arrow) at the solution trajectory's position at \ time t(1 \[Dash]relarrowstart).\nA value of .005 for relarrowstart works well \ in most cases: the arrow line is not visible, and the arrow points in the \ right direction. If after a diagram is produced the user notices that arrow \ base-lines are visible, a smaller value of relarrowstart should be specified. \ If arrows point in the wrong directions, a larger value of relarrowstart \ could make the arrows look more aligned with the overall trajectory instead \ of its final portion.\nThe parameter ", StyleBox["arrowheadpos", FontWeight->"Bold"], " specifies the location of the arrow-head within the base-line. The number \ is relative so it ranges from 0 to 1 as a proportion of the base-line." }], "Text", CellChangeTimes->{{3.540035203523921*^9, 3.540035208071499*^9}, { 3.54003523911244*^9, 3.5400352428519154`*^9}, {3.5400352977158823`*^9, 3.540035307123577*^9}, {3.540035356771881*^9, 3.5400353653479705`*^9}, { 3.5400353972995276`*^9, 3.540035488819649*^9}, {3.540035529555822*^9, 3.5400357062762628`*^9}, {3.5400357420893106`*^9, 3.540035782546948*^9}, { 3.5400358272526245`*^9, 3.540035901380038*^9}, {3.5400609990254936`*^9, 3.540060999355512*^9}, {3.5400674147114496`*^9, 3.5400674546427336`*^9}, { 3.540067530326062*^9, 3.540067539634595*^9}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{"relarrowstart", "=", ".005"}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"arrowheadpos", "=", "1"}], " ", ";"}]}], "Input", CellChangeTimes->{3.540035644950475*^9, 3.540058847869664*^9, 3.5400592475483146`*^9, 3.5400610089960637`*^9, 3.580471349293951*^9}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Adjusting Rest Points and NE dots", "Subsubsection", CellChangeTimes->{{3.539373873337262*^9, 3.539373879465357*^9}}, CellTags->"corecell"], Cell[TextData[{ "If the Rest Points and/or NE of the game have been calculated, this options \ control whether to show them and their appearence. The first two options, ", StyleBox["drawrestpoints ", FontWeight->"Bold"], "and", StyleBox[" drawnashequilibra ", FontWeight->"Bold"], "include the dots in the phase diagram if they are set to one. Notice that \ since for most dynamics these sets overlap, a hierachy exists. Dynamo \ priorizes the drawrestpoint option and only if it is disabled will the rest \ points which are also NE be drawn with the necolor. Since for imitative \ dynamics every NE is a restpoint, the option ", StyleBox["drawnashequilibra", FontWeight->"Bold"], " is ineffective in that context unless the option ", StyleBox["drawrestpoints", FontWeight->"Bold"], " is set to 0. However,in principle it is possible that a point will emerge \ as a NE without being a restpoint, this is why both option are enabled by \ default.\nThe option ", StyleBox["dotopacity ", FontWeight->"Bold"], "is a value in the unit inteval that controls how transparent the dots are. \ An opacity level of 1 is equivalent to a completely transparent dot.\nThe \ option ", StyleBox["dotradius ", FontWeight->"Bold"], "controls how big the dots are. The three options named ", StyleBox["srpcolor, urpcolor ", FontWeight->"Bold"], "and ", StyleBox["necolor ", FontWeight->"Bold"], "allow the user to modify the default grayscale color for stable rest \ points, unstable restpoints and nash equilibria respectively. the defaults \ are black (0), white(1) and gray (.5)." }], "Text", CellChangeTimes->{{3.535300116015084*^9, 3.53530042108937*^9}, { 3.535301062722094*^9, 3.535301136714599*^9}, {3.535301261915186*^9, 3.535301317571302*^9}, {3.535301378066795*^9, 3.535301436271492*^9}, { 3.535301626315198*^9, 3.535301628660941*^9}, 3.535301762539234*^9, { 3.539378865664901*^9, 3.539378949247051*^9}, {3.539379001967136*^9, 3.539379035359755*^9}, {3.53937911399079*^9, 3.539379187903614*^9}, { 3.539459769716296*^9, 3.539459795493571*^9}, {3.539459840111018*^9, 3.539459875429639*^9}, 3.539694132097412*^9, {3.539694304710458*^9, 3.539694305596389*^9}, {3.5396943418964853`*^9, 3.5396943430504*^9}, { 3.539694373309739*^9, 3.5396944043129387`*^9}, {3.568976027220156*^9, 3.568976034757383*^9}, 3.580478367410741*^9}, CellTags->{"corecell", "differentacrossnotebooks"}], Cell[BoxData[{ RowBox[{ RowBox[{"drawrestpoints", "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"drawnashequilibria", "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"dotopacity", "=", ".6"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"dotradius", "=", ".01"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"srpcolor", "=", "0"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"urpcolor", "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"necolor", "=", ".5"}], ";"}]}], "Input", CellChangeTimes->{{3.535300041562691*^9, 3.535300071371947*^9}, { 3.53530101844686*^9, 3.535301058547384*^9}, {3.535301255807105*^9, 3.535301256244587*^9}, {3.535301365840308*^9, 3.535301370704862*^9}, 3.539375837572479*^9, {3.539375943330617*^9, 3.539375949732499*^9}, 3.539694136715096*^9, {3.58047835804917*^9, 3.580478358994665*^9}}, CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[CellGroupData[{ Cell["Adding extra graphic elements", "Subsubsection", CellTags->"corecell"], Cell[TextData[{ "This section allows the user to add dots, lines, arrows, text, and color \ solution trajectories to a phase diagram/contour plot.\n\nEnter the data for \ dots as follows: ", StyleBox["customdots", FontWeight->"Bold"], " = {{center1, radius1, color1, open1}, {center2, radius2, color2, open2}, \ ...}. color1 should be a ", StyleBox["Mathematica", FontSlant->"Italic"], "-defined color function (Hue[.], GrayLevel[.], etc). Set open1 = 0 for \ solid dot and = 1 for a dot with a white center.\n \nEnter the data for lines \ as follows: ", StyleBox["customlines", FontWeight->"Bold"], " = {{startingpoint1, endpoint1, thickness1, dashing1, color1, \ arrowheadsize1}, {startingpoint2, endpoint2, thickness2, dashing2, color2, \ arrowheadsize2},...}. If you want an arrow at the end of the line enter the \ value for arrowheadsize specifying the size of the arrow head; if you do not \ want an arrow simply set it to 0. Thickness and Dashing are usual ", StyleBox["Mathematica ", FontSlant->"Italic"], "commands. If you want to enter position using simplex coordinates, you can \ directly enter the value (e.g.,{0, 1, 0,0}). Otherwise, 3d coordinates can \ be used with \[OpenCurlyDoubleQuote]planeToSimplex\[CloseCurlyDoubleQuote] \ command: for example, planeToSimplex[{0,0,0}] ={1/4,1/4,1/4,1/4}.\n\nEnter \ data for text as follows: ", StyleBox["customtext ", FontWeight->"Bold"], "= {{\[OpenCurlyDoubleQuote]label1\[CloseCurlyDoubleQuote], position1, \ \[OpenCurlyDoubleQuote]fontfamily1\[CloseCurlyDoubleQuote],\ \[CloseCurlyDoubleQuote]fontslant1\[CloseCurlyDoubleQuote], fontsize1}, {\ \[OpenCurlyDoubleQuote]label2\[CloseCurlyDoubleQuote], position2, \ \[OpenCurlyDoubleQuote]fontfamily2\[CloseCurlyDoubleQuote],\ \[CloseCurlyDoubleQuote]fontslant2\[CloseCurlyDoubleQuote], fontsize2}, ...}. \ Remember that you are restricted to positions in the surroundings of the \ simplex. Enter a position using simplex coordinates and the \ \[OpenCurlyDoubleQuote]simplexToPlane\[CloseCurlyDoubleQuote] command (e.g., \ simplexToPlane[{0, 1, 0, 0}]).\n\nEnter data for extra solution trajectories \ as follows: ", StyleBox["customtrajectoryspecs ", FontWeight->"Bold"], "= {{initial condition on simplex 1, endtime1 for NDSolve, beginningtime1 to \ be used in in the plot, {color1, thickness1, dashing1}, {arrow position1}, \ {head lengths1}}, {initial condition on simplex 2, endtime2 for NDSolve, \ beginningtime2 to be used in in the plot, {color2, thickness2, dasing2}, \ {arrow position2}, {head lengths2}},...}. \nThe program computes a solution \ to the dynamic from time 0 through endtime?, and then plots the solution \ trajectory from the beginingtime? through endtime. color? should be a ", StyleBox["Mathematica", FontSlant->"Italic"], "-defined color function (Hue[.], GrayLevel[.], etc) (any of color, \ thickness and dashing can be ignored, and just write {} if you do not want to \ bother with any of these at all. As in the regular trajectoryspecs, the \ \[OpenCurlyDoubleQuote]rainbow\[CloseCurlyDoubleQuote] option is available. \ arrowpositon? must be a number strictly greater than beginingtime? and less \ than endtime (it must be strictly bigger than begining time). Each \ trajectory can have multiple arrows, but even if there is only one arrow, be \ sure to put brackets around the arrow positions and head lengths.\n\nWrite \ customdots = {}, customlines = {}, customtext = {}, and \ customtrajectoryspecs = {} if you do not want to add anything. (This is the \ default setting.)" }], "Text", CellChangeTimes->{{3.481758323757595*^9, 3.4817583519681597`*^9}, { 3.4817584052647963`*^9, 3.481758449087811*^9}, {3.481758479571645*^9, 3.481758491468752*^9}, {3.4817585233145437`*^9, 3.4817585430629406`*^9}, 3.4818174985127053`*^9, 3.4818175879412975`*^9, {3.492692899083375*^9, 3.492692909157861*^9}, {3.5189480745547137`*^9, 3.518948079218981*^9}, { 3.5189481666509814`*^9, 3.518948212098581*^9}, {3.5212854599821157`*^9, 3.521285471367767*^9}, {3.5400646403177633`*^9, 3.5400646429919167`*^9}, { 3.554563814118454*^9, 3.554563827862392*^9}, {3.564999342537918*^9, 3.564999343995644*^9}, {3.564999444873737*^9, 3.564999446061701*^9}, { 3.566767058829246*^9, 3.566767059771845*^9}, {3.566767116605319*^9, 3.566767118112766*^9}, {3.569613937733704*^9, 3.569613940088293*^9}, { 3.57191921727388*^9, 3.57191921786613*^9}, 3.580471405129315*^9}, CellTags->{"corecell", "differentacrossnotebooks"}], Cell["\<\ Example: This example generates one line, one dot, and one piece of text, \ one special solution trajectory (customtrajectoryspecs). customdots={{{1/4, 1/4, 1/4, 1/4}, .01, GrayLevel[0], 1}} ; [draws a black \ dot with white center at the center of the simplex] customlines={{{1/2, 0, 1/2, 0},{1/2, 1/2, 0, 0}, Thickness[.004], \ Dashing[{}], GrayLevel[0], 0}} ; [draws a line through at x1=1/2, x4=0] customtext={{\[OpenCurlyDoubleQuote]trial\[CloseCurlyDoubleQuote], \ simplexToPlane[{1/4, 1/4, 1/4, 1/4}], \[OpenCurlyDoubleQuote]Palatino\ \[CloseCurlyDoubleQuote], \ \[OpenCurlyDoubleQuote]Plain\[CloseCurlyDoubleQuote], 12}} ; customtrajectoryspecs={{{.7, .1, .1, .1}, 50, 45, {Hue[.83], \ Thickness[.005]}, {47}, {.03}}} ; \ \>", "Text", CellChangeTimes->{ 3.4817583537306943`*^9, {3.481758420306425*^9, 3.481758450039179*^9}, 3.481758492129702*^9, {3.481758544304726*^9, 3.4817585454163246`*^9}, 3.481817499754491*^9, {3.4926929131335783`*^9, 3.492692917149352*^9}, 3.564999345292789*^9, {3.56960981363013*^9, 3.569609817759199*^9}, 3.56961397649703*^9, {3.572103679541684*^9, 3.572103690159913*^9}, 3.580471419928182*^9, 3.580504897165784*^9}, CellTags->{"corecell", "differentacrossnotebooks"}], Cell[BoxData[{ RowBox[{ RowBox[{"customdots", "=", RowBox[{"{", "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"customlines", "=", RowBox[{"{", "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"customtext", "=", RowBox[{"{", "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"customtrajectoryspecs", "=", RowBox[{"{", "}"}]}], ";"}]}], "Input", CellChangeTimes->{ 3.4817583548923645`*^9, {3.481758425403755*^9, 3.4817584509805326`*^9}, 3.481758493010969*^9, 3.481758546387721*^9, 3.4926929185313396`*^9, 3.513423299643364*^9, {3.5134233347303705`*^9, 3.5134233700823927`*^9}, 3.5134234334720182`*^9, 3.513423630441284*^9, 3.513424327461152*^9, { 3.513424415422183*^9, 3.513424423684655*^9}, {3.513424596629547*^9, 3.513424619392849*^9}, {3.5134246558659353`*^9, 3.5134246687016697`*^9}, { 3.513424715343337*^9, 3.513424719300564*^9}, {3.5134248058885164`*^9, 3.51342488043978*^9}, {3.5134249130356445`*^9, 3.513424925941383*^9}, { 3.5134249580552197`*^9, 3.5134249727300587`*^9}, {3.513425004708888*^9, 3.5134250100751953`*^9}, {3.513425053794696*^9, 3.5134250563828435`*^9}, { 3.5134251338502746`*^9, 3.51342515649257*^9}, {3.51342520528036*^9, 3.513425205509373*^9}, {3.5136180986033573`*^9, 3.5136181036106434`*^9}, 3.5159571167613344`*^9, {3.519140756403737*^9, 3.5191407620890617`*^9}, { 3.51938347122598*^9, 3.519383484087716*^9}, {3.5193838258042607`*^9, 3.5193838315495896`*^9}, {3.519383886493732*^9, 3.51938389170603*^9}, { 3.519383957707805*^9, 3.51938405657146*^9}, {3.5193840993609076`*^9, 3.519384176708331*^9}, {3.519384247568384*^9, 3.5193843204735546`*^9}, { 3.519384351236314*^9, 3.5193843856552825`*^9}, {3.519384441868498*^9, 3.5193845971203775`*^9}, {3.5193848036981936`*^9, 3.5193848389002066`*^9}, {3.519384894124365*^9, 3.5193849355487347`*^9}, { 3.5193850042026615`*^9, 3.519385012418131*^9}, {3.5193850430348825`*^9, 3.5193850759117627`*^9}, {3.5193851517110987`*^9, 3.519385454292405*^9}, { 3.5193858517061357`*^9, 3.519385886655135*^9}, {3.5193944736130953`*^9, 3.519394499972603*^9}, {3.51941538818434*^9, 3.519415499641715*^9}, { 3.519461260784103*^9, 3.519461271592721*^9}, {3.539862606522581*^9, 3.5398626429886675`*^9}, 3.540206799176022*^9, {3.570091870350469*^9, 3.570091930387663*^9}, {3.571735730698706*^9, 3.571735739520632*^9}, 3.572106321442188*^9, 3.572107989716485*^9}, CellTags->"corecell"] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Face shading and viewpoint", "Subsubsection", CellChangeTimes->{{3.539694792533655*^9, 3.539694796793395*^9}, { 3.540740380866911*^9, 3.5407404012751417`*^9}}, CellTags->{"corecell", "3Dexclusive"}], Cell[TextData[{ "The option ", StyleBox["vpoint ", FontWeight->"Bold"], "changes the initial (it can be rotated) angle from which the 3D object is \ viewed, see Mathematic\[CloseCurlyQuote]s documentation on option ViewPoint \ for more details. In essence it gives the location of the point from which \ the object will be looked at; the position is relative so the values are \ scale free.", StyleBox[" ", FontWeight->"Bold"], "When selecting the viewpoint, consider that the second strategy is at \ (0,0,0) and the third at (1,0,0).\n\nThe options ", StyleBox["simplexfacecolors", FontWeight->"Bold"], " and ", StyleBox["simplexfaceshades", FontWeight->"Bold"], " for the faces change their color and transparency levels. ", StyleBox["simplexfaceshading ", FontWeight->"Bold"], "enables or disables the transparency all together. The order of the faces \ is connected to the faces for which the position has no component for that \ strategy. For example, the second component corresponds to the face for which \ the second strategy is unused. By default the faces that are in the \ background are slightly less transparant than the ones in the front to \ facilitate the perception of the trajectories." }], "Text", CellChangeTimes->{{3.535300116015084*^9, 3.53530042108937*^9}, { 3.535301062722094*^9, 3.535301136714599*^9}, {3.535301261915186*^9, 3.535301317571302*^9}, {3.535301378066795*^9, 3.535301436271492*^9}, { 3.535301626315198*^9, 3.535301628660941*^9}, 3.535301762539234*^9, 3.53945990924677*^9, {3.539694331530034*^9, 3.539694399452944*^9}, 3.539956783428693*^9, {3.5401388064184303`*^9, 3.540138830337264*^9}, { 3.540138861986117*^9, 3.54013886536131*^9}, {3.582107275872277*^9, 3.582107289039914*^9}, {3.582107319449136*^9, 3.582107523345099*^9}, { 3.582107567854151*^9, 3.58210779424833*^9}, {3.582107825891537*^9, 3.582107934410405*^9}, {3.582108060650571*^9, 3.582108061894224*^9}, { 3.582109641105483*^9, 3.582109641765774*^9}}, CellTags->{"corecell", "3Dexclusive", "differentacrossnotebooks"}], Cell[BoxData[{ RowBox[{ RowBox[{"vpoint", "=", RowBox[{"{", RowBox[{"1.3", ",", RowBox[{"-", "2.4"}], ",", "2"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"simplexfacecolors", "=", RowBox[{"{", RowBox[{"Green", ",", "Green", ",", "Green", ",", "Green"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"simplexfaceshades", "=", RowBox[{"{", RowBox[{".2", ",", ".2", ",", ".2", ",", ".0"}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"simplexfaceshading", "=", "1"}], ";"}]}], "Input", CellChangeTimes->{{3.539724009570797*^9, 3.5397240197520895`*^9}, { 3.540146753974434*^9, 3.540146756996318*^9}, {3.5401468089489145`*^9, 3.5401468638778896`*^9}, 3.5401475643903437`*^9, {3.5401480009327774`*^9, 3.540148011251588*^9}, {3.5401480699435406`*^9, 3.5401481212705584`*^9}, 3.5401484237829723`*^9, {3.5401486285514746`*^9, 3.5401486421667037`*^9}, { 3.5401487739284353`*^9, 3.5401487780699615`*^9}, {3.5401489395759697`*^9, 3.540148940806126*^9}, {3.5401561289533386`*^9, 3.5401561605355873`*^9}, { 3.540156274448389*^9, 3.540156279751264*^9}, 3.5401571925839276`*^9, 3.540724759711806*^9, {3.540831914306991*^9, 3.540831919535665*^9}, { 3.58210795591103*^9, 3.582107964969365*^9}, {3.582108040844376*^9, 3.58210804853418*^9}}, CellTags->{"3Dexclusive", "differentacrossnotebooks"}] }, Closed]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Program Core", "Subtitle", CellDingbat->None, CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{"time1", "=", RowBox[{"AbsoluteTime", "[", "]"}]}], " ", ";"}]], "Input", CellChangeTimes->{{3.4807853654988422`*^9, 3.4807853679362803`*^9}}, CellTags->"corecell"], Cell[CellGroupData[{ Cell["Multipopulation Bridge", "Section", CellChangeTimes->{{3.539862052950919*^9, 3.5398620553350554`*^9}, { 3.569612240104287*^9, 3.569612248072867*^9}}, ImageRegion->{{0, 1}, {0, 1}}, CellTags->{"corecell", "singlepopulation"}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"singlePopFilter", "[", RowBox[{"list_", ",", RowBox[{"length_:", "1"}]}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"And", "[", RowBox[{ RowBox[{"pop", "==", "1"}], ",", RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", "list", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "!=", "0"}], ",", RowBox[{ RowBox[{"Depth", "[", RowBox[{"list", "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], "]"}], "==", "2"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"Join", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"list", "[", RowBox[{"[", RowBox[{"j", ",", "k"}], "]"}], "]"}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", "length"}], "}"}]}], "]"}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"list", "[", RowBox[{"[", RowBox[{"j", ",", "k"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"length", "+", "1"}], ",", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"list", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "list", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], ",", "list"}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.569613576906343*^9, 3.569613696343879*^9}, { 3.569614057128991*^9, 3.56961406362477*^9}, {3.569614110681404*^9, 3.569614151596504*^9}, {3.570039271683068*^9, 3.570039273000559*^9}, { 3.570093567697816*^9, 3.570093568404481*^9}, {3.570093611377162*^9, 3.570093655642816*^9}, 3.570094087462733*^9}, CellTags->{"corecell", "singlepopulation"}], Cell[CellGroupData[{ Cell["Trajectory Specifications", "Subsection", CellChangeTimes->{ 3.4928106456433153`*^9, {3.569612279691381*^9, 3.5696122875253*^9}}, CellTags->{"corecell", "singlepopulation"}], Cell[BoxData[ RowBox[{ RowBox[{"trajectoryspecs", "=", RowBox[{"singlePopFilter", "[", "trajectoryspecs", "]"}]}], ";"}]], "Input",\ CellChangeTimes->{{3.4927010600449357`*^9, 3.492701078551547*^9}, 3.492701233859937*^9, {3.4927012644275613`*^9, 3.492701296150041*^9}, 3.4927013313306284`*^9, 3.4928090904971247`*^9, {3.492809143693618*^9, 3.492809156592165*^9}, {3.492809230798869*^9, 3.4928092536717587`*^9}, 3.492809999834688*^9, 3.4928100734906*^9, {3.492810651862258*^9, 3.492810670669301*^9}, {3.4928113837045956`*^9, 3.4928114078292847`*^9}, 3.4928114625780096`*^9, {3.492811550884989*^9, 3.492811556943701*^9}, { 3.492811592064202*^9, 3.492811639812861*^9}, {3.492811691326935*^9, 3.4928116965043793`*^9}, {3.492856670525757*^9, 3.4928567167522273`*^9}, { 3.4934024916000357`*^9, 3.493402492341101*^9}, 3.507926856530527*^9, 3.5079270459929605`*^9, {3.508019647540586*^9, 3.5080196505248775`*^9}, { 3.5087652862346354`*^9, 3.5087652862346354`*^9}, {3.508765335916074*^9, 3.508765368372744*^9}, {3.5087793198629637`*^9, 3.5087793209945908`*^9}, { 3.510657238427292*^9, 3.5106572387265186`*^9}, {3.510658409012612*^9, 3.5106584218408628`*^9}, 3.5106585333179235`*^9, {3.5106585742811174`*^9, 3.5106586224327903`*^9}, {3.510658653727054*^9, 3.51065869218235*^9}, { 3.5106587302871423`*^9, 3.5106588153594704`*^9}, {3.5106589242660704`*^9, 3.5106589443749857`*^9}, {3.5106608409321003`*^9, 3.5106608457890844`*^9}, {3.510662483899393*^9, 3.5106624958766155`*^9}, { 3.5106635320916877`*^9, 3.51066355299174*^9}, {3.510663623372944*^9, 3.510663630873729*^9}, {3.5106637916949787`*^9, 3.5106637949696875`*^9}, { 3.5106640457402782`*^9, 3.510664046641574*^9}, {3.5106641223604527`*^9, 3.5106641485280795`*^9}, {3.5106647253274765`*^9, 3.5106647368941083`*^9}, 3.5106651822845483`*^9, {3.5106652270088587`*^9, 3.5106652305539565`*^9}, { 3.5106656770710845`*^9, 3.5106656792141657`*^9}, 3.5106657221559134`*^9, { 3.5106669238037977`*^9, 3.51066694513447*^9}, {3.5106670284943357`*^9, 3.5106670562242093`*^9}, {3.5106671075800076`*^9, 3.510667110956402*^9}, { 3.5106676443857927`*^9, 3.5106676499437847`*^9}, {3.5106737901178446`*^9, 3.5106738008833246`*^9}, {3.5106744003603983`*^9, 3.5106744021529756`*^9}, {3.5106873990148335`*^9, 3.5106875687088413`*^9}, {3.510687715069298*^9, 3.5106878389674544`*^9}, { 3.5106879036003923`*^9, 3.5106879072756767`*^9}, {3.510687943537819*^9, 3.5106879510185757`*^9}, {3.510688749772195*^9, 3.5106887880672607`*^9}, { 3.5110111085669603`*^9, 3.5110111215185595`*^9}, {3.5110114759002275`*^9, 3.5110115017774367`*^9}, {3.519304678995322*^9, 3.5193046796273584`*^9}, { 3.519305336871951*^9, 3.519305337921011*^9}, {3.519305684794851*^9, 3.519305820680623*^9}, {3.519305875960785*^9, 3.519306097477455*^9}, { 3.519306141114951*^9, 3.51930623743346*^9}, 3.565002068874544*^9, { 3.568829787978145*^9, 3.568829795241821*^9}, {3.568829839276476*^9, 3.568829868031256*^9}, {3.56932789483381*^9, 3.569327935238941*^9}, { 3.569328026344155*^9, 3.569328030616673*^9}, {3.569581335135994*^9, 3.569581387841289*^9}, 3.569612328574528*^9, {3.56961236512435*^9, 3.569612381564566*^9}, {3.569612582190573*^9, 3.569612653098557*^9}, { 3.56961268729505*^9, 3.569612701437591*^9}, {3.569613211767658*^9, 3.569613324938983*^9}, {3.569613405640411*^9, 3.56961344699713*^9}, { 3.569613705612018*^9, 3.569613731897814*^9}}, CellTags->{"corecell", "singlepopulation"}] }, Closed]], Cell[CellGroupData[{ Cell["Custom", "Subsection", CellChangeTimes->{ 3.4928106456433153`*^9, {3.569612279691381*^9, 3.5696122875253*^9}, { 3.569612355249465*^9, 3.569612356421181*^9}}, CellTags->{"corecell", "singlepopulation"}], Cell[BoxData[{ RowBox[{ RowBox[{"customdots", "=", RowBox[{"singlePopFilter", "[", "customdots", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"customlines", "=", RowBox[{"singlePopFilter", "[", RowBox[{"customlines", ",", "2"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"customtrajectoryspecs", "=", RowBox[{"singlePopFilter", "[", "customtrajectoryspecs", "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.4927010600449357`*^9, 3.492701078551547*^9}, 3.492701233859937*^9, {3.4927012644275613`*^9, 3.492701296150041*^9}, 3.4927013313306284`*^9, 3.4928090904971247`*^9, {3.492809143693618*^9, 3.492809156592165*^9}, {3.492809230798869*^9, 3.4928092536717587`*^9}, 3.492809999834688*^9, 3.4928100734906*^9, {3.492810651862258*^9, 3.492810670669301*^9}, {3.4928113837045956`*^9, 3.4928114078292847`*^9}, 3.4928114625780096`*^9, {3.492811550884989*^9, 3.492811556943701*^9}, { 3.492811592064202*^9, 3.492811639812861*^9}, {3.492811691326935*^9, 3.4928116965043793`*^9}, {3.492856670525757*^9, 3.4928567167522273`*^9}, { 3.4934024916000357`*^9, 3.493402492341101*^9}, 3.507926856530527*^9, 3.5079270459929605`*^9, {3.508019647540586*^9, 3.5080196505248775`*^9}, { 3.5087652862346354`*^9, 3.5087652862346354`*^9}, {3.508765335916074*^9, 3.508765368372744*^9}, {3.5087793198629637`*^9, 3.5087793209945908`*^9}, { 3.510657238427292*^9, 3.5106572387265186`*^9}, {3.510658409012612*^9, 3.5106584218408628`*^9}, 3.5106585333179235`*^9, {3.5106585742811174`*^9, 3.5106586224327903`*^9}, {3.510658653727054*^9, 3.51065869218235*^9}, { 3.5106587302871423`*^9, 3.5106588153594704`*^9}, {3.5106589242660704`*^9, 3.5106589443749857`*^9}, {3.5106608409321003`*^9, 3.5106608457890844`*^9}, {3.510662483899393*^9, 3.5106624958766155`*^9}, { 3.5106635320916877`*^9, 3.51066355299174*^9}, {3.510663623372944*^9, 3.510663630873729*^9}, {3.5106637916949787`*^9, 3.5106637949696875`*^9}, { 3.5106640457402782`*^9, 3.510664046641574*^9}, {3.5106641223604527`*^9, 3.5106641485280795`*^9}, {3.5106647253274765`*^9, 3.5106647368941083`*^9}, 3.5106651822845483`*^9, {3.5106652270088587`*^9, 3.5106652305539565`*^9}, { 3.5106656770710845`*^9, 3.5106656792141657`*^9}, 3.5106657221559134`*^9, { 3.5106669238037977`*^9, 3.51066694513447*^9}, {3.5106670284943357`*^9, 3.5106670562242093`*^9}, {3.5106671075800076`*^9, 3.510667110956402*^9}, { 3.5106676443857927`*^9, 3.5106676499437847`*^9}, {3.5106737901178446`*^9, 3.5106738008833246`*^9}, {3.5106744003603983`*^9, 3.5106744021529756`*^9}, {3.5106873990148335`*^9, 3.5106875687088413`*^9}, {3.510687715069298*^9, 3.5106878389674544`*^9}, { 3.5106879036003923`*^9, 3.5106879072756767`*^9}, {3.510687943537819*^9, 3.5106879510185757`*^9}, {3.510688749772195*^9, 3.5106887880672607`*^9}, { 3.5110111085669603`*^9, 3.5110111215185595`*^9}, {3.5110114759002275`*^9, 3.5110115017774367`*^9}, {3.519304678995322*^9, 3.5193046796273584`*^9}, { 3.519305336871951*^9, 3.519305337921011*^9}, {3.519305684794851*^9, 3.519305820680623*^9}, {3.519305875960785*^9, 3.519306097477455*^9}, { 3.519306141114951*^9, 3.51930623743346*^9}, 3.565002068874544*^9, { 3.568829787978145*^9, 3.568829795241821*^9}, {3.568829839276476*^9, 3.568829868031256*^9}, {3.56932789483381*^9, 3.569327935238941*^9}, { 3.569328026344155*^9, 3.569328030616673*^9}, {3.569581335135994*^9, 3.569581387841289*^9}, 3.569612328574528*^9, 3.569613470652631*^9, { 3.569613506105794*^9, 3.569613511817505*^9}, {3.569613740191941*^9, 3.569613774929198*^9}, {3.569614072953336*^9, 3.569614097580035*^9}}, CellTags->{"corecell", "singlepopulation"}] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Solving Numerically", "Section", CellChangeTimes->{{3.539862052950919*^9, 3.5398620553350554`*^9}}, ImageRegion->{{0, 1}, {0, 1}}, CellTags->"corecell"], Cell[CellGroupData[{ Cell["Rest points and stability test", "Subsection", CellChangeTimes->{3.4928106456433153`*^9}, CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"Speed", "[", "x_", "]"}], ":=", " ", RowBox[{"If", "[", " ", RowBox[{ RowBox[{"dyn", "===", " ", "Project"}], ",", RowBox[{"stateNorm", "[", RowBox[{"PhiF", "[", RowBox[{"x", ",", "Fmp"}], "]"}], "]"}], ",", RowBox[{"stateNorm", "[", RowBox[{"dyn", "[", RowBox[{"x", ",", "Fmp"}], "]"}], "]"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.4927010600449357`*^9, 3.492701078551547*^9}, 3.492701233859937*^9, {3.4927012644275613`*^9, 3.492701296150041*^9}, 3.4927013313306284`*^9, 3.4928090904971247`*^9, {3.492809143693618*^9, 3.492809156592165*^9}, {3.492809230798869*^9, 3.4928092536717587`*^9}, 3.492809999834688*^9, 3.4928100734906*^9, {3.492810651862258*^9, 3.492810670669301*^9}, {3.4928113837045956`*^9, 3.4928114078292847`*^9}, 3.4928114625780096`*^9, {3.492811550884989*^9, 3.492811556943701*^9}, { 3.492811592064202*^9, 3.492811639812861*^9}, {3.492811691326935*^9, 3.4928116965043793`*^9}, {3.492856670525757*^9, 3.4928567167522273`*^9}, { 3.4934024916000357`*^9, 3.493402492341101*^9}, 3.507926856530527*^9, 3.5079270459929605`*^9, {3.508019647540586*^9, 3.5080196505248775`*^9}, { 3.5087652862346354`*^9, 3.5087652862346354`*^9}, {3.508765335916074*^9, 3.508765368372744*^9}, {3.5087793198629637`*^9, 3.5087793209945908`*^9}, { 3.510657238427292*^9, 3.5106572387265186`*^9}, {3.510658409012612*^9, 3.5106584218408628`*^9}, 3.5106585333179235`*^9, {3.5106585742811174`*^9, 3.5106586224327903`*^9}, {3.510658653727054*^9, 3.51065869218235*^9}, { 3.5106587302871423`*^9, 3.5106588153594704`*^9}, {3.5106589242660704`*^9, 3.5106589443749857`*^9}, {3.5106608409321003`*^9, 3.5106608457890844`*^9}, {3.510662483899393*^9, 3.5106624958766155`*^9}, { 3.5106635320916877`*^9, 3.51066355299174*^9}, {3.510663623372944*^9, 3.510663630873729*^9}, {3.5106637916949787`*^9, 3.5106637949696875`*^9}, { 3.5106640457402782`*^9, 3.510664046641574*^9}, {3.5106641223604527`*^9, 3.5106641485280795`*^9}, {3.5106647253274765`*^9, 3.5106647368941083`*^9}, 3.5106651822845483`*^9, {3.5106652270088587`*^9, 3.5106652305539565`*^9}, { 3.5106656770710845`*^9, 3.5106656792141657`*^9}, 3.5106657221559134`*^9, { 3.5106669238037977`*^9, 3.51066694513447*^9}, {3.5106670284943357`*^9, 3.5106670562242093`*^9}, {3.5106671075800076`*^9, 3.510667110956402*^9}, { 3.5106676443857927`*^9, 3.5106676499437847`*^9}, {3.5106737901178446`*^9, 3.5106738008833246`*^9}, {3.5106744003603983`*^9, 3.5106744021529756`*^9}, {3.5106873990148335`*^9, 3.5106875687088413`*^9}, {3.510687715069298*^9, 3.5106878389674544`*^9}, { 3.5106879036003923`*^9, 3.5106879072756767`*^9}, {3.510687943537819*^9, 3.5106879510185757`*^9}, {3.510688749772195*^9, 3.5106887880672607`*^9}, { 3.5110111085669603`*^9, 3.5110111215185595`*^9}, {3.5110114759002275`*^9, 3.5110115017774367`*^9}, {3.519304678995322*^9, 3.5193046796273584`*^9}, { 3.519305336871951*^9, 3.519305337921011*^9}, {3.519305684794851*^9, 3.519305820680623*^9}, {3.519305875960785*^9, 3.519306097477455*^9}, { 3.519306141114951*^9, 3.51930623743346*^9}, 3.565002068874544*^9, { 3.568829787978145*^9, 3.568829795241821*^9}, {3.568829839276476*^9, 3.568829868031256*^9}, {3.56932789483381*^9, 3.569327935238941*^9}, { 3.569328026344155*^9, 3.569328030616673*^9}, {3.569581335135994*^9, 3.569581387841289*^9}, {3.580477610235226*^9, 3.580477623545881*^9}, 3.580477663247424*^9, {3.580477715856984*^9, 3.580477727514096*^9}, { 3.580478065172579*^9, 3.58047807012027*^9}, 3.580515478934403*^9}, CellTags->{"corecell", "3Dexclusive"}], Cell[BoxData[ RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"grid", ",", "step", ",", "accuracy"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"step", "=", ".05"}], ";", "\[IndentingNewLine]", RowBox[{"accuracy", "=", "5"}], ";", "\[IndentingNewLine]", RowBox[{"grid", "=", RowBox[{"Chop", "[", RowBox[{ RowBox[{"Tuples", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"discSimplex", "[", RowBox[{ RowBox[{"1", "/", "step"}], ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], "]"}], ",", RowBox[{"10", "^", RowBox[{"(", RowBox[{"-", "accuracy"}], ")"}]}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"tolLevel", "=", RowBox[{"restTolerance", " ", RowBox[{"Max", "[", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"Speed", "[", RowBox[{"grid", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "grid", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], "]"}], "]"}]}]}]}]}], "\[IndentingNewLine]", "]"}], ";"}]], "Input", CellChangeTimes->{{3.4927010600449357`*^9, 3.492701078551547*^9}, 3.492701233859937*^9, {3.4927012644275613`*^9, 3.492701296150041*^9}, 3.4927013313306284`*^9, 3.4928090904971247`*^9, {3.492809143693618*^9, 3.492809156592165*^9}, {3.492809230798869*^9, 3.4928092536717587`*^9}, 3.492809999834688*^9, 3.4928100734906*^9, {3.492810651862258*^9, 3.492810670669301*^9}, {3.4928113837045956`*^9, 3.4928114078292847`*^9}, 3.4928114625780096`*^9, {3.492811550884989*^9, 3.492811556943701*^9}, { 3.492811592064202*^9, 3.492811639812861*^9}, {3.492811691326935*^9, 3.4928116965043793`*^9}, {3.492856670525757*^9, 3.4928567167522273`*^9}, { 3.4934024916000357`*^9, 3.493402492341101*^9}, 3.507926856530527*^9, 3.5079270459929605`*^9, {3.508019647540586*^9, 3.5080196505248775`*^9}, { 3.5087652862346354`*^9, 3.5087652862346354`*^9}, {3.508765335916074*^9, 3.508765368372744*^9}, {3.5087793198629637`*^9, 3.5087793209945908`*^9}, { 3.510657238427292*^9, 3.5106572387265186`*^9}, {3.510658409012612*^9, 3.5106584218408628`*^9}, 3.5106585333179235`*^9, {3.5106585742811174`*^9, 3.5106586224327903`*^9}, {3.510658653727054*^9, 3.51065869218235*^9}, { 3.5106587302871423`*^9, 3.5106588153594704`*^9}, {3.5106589242660704`*^9, 3.5106589443749857`*^9}, {3.5106608409321003`*^9, 3.5106608457890844`*^9}, {3.510662483899393*^9, 3.5106624958766155`*^9}, { 3.5106635320916877`*^9, 3.51066355299174*^9}, {3.510663623372944*^9, 3.510663630873729*^9}, {3.5106637916949787`*^9, 3.5106637949696875`*^9}, { 3.5106640457402782`*^9, 3.510664046641574*^9}, {3.5106641223604527`*^9, 3.5106641485280795`*^9}, {3.5106647253274765`*^9, 3.5106647368941083`*^9}, 3.5106651822845483`*^9, {3.5106652270088587`*^9, 3.5106652305539565`*^9}, { 3.5106656770710845`*^9, 3.5106656792141657`*^9}, 3.5106657221559134`*^9, { 3.5106669238037977`*^9, 3.51066694513447*^9}, {3.5106670284943357`*^9, 3.5106670562242093`*^9}, {3.5106671075800076`*^9, 3.510667110956402*^9}, { 3.5106676443857927`*^9, 3.5106676499437847`*^9}, {3.5106737901178446`*^9, 3.5106738008833246`*^9}, {3.5106744003603983`*^9, 3.5106744021529756`*^9}, {3.5106873990148335`*^9, 3.5106875687088413`*^9}, {3.510687715069298*^9, 3.5106878389674544`*^9}, { 3.5106879036003923`*^9, 3.5106879072756767`*^9}, {3.510687943537819*^9, 3.5106879510185757`*^9}, {3.510688749772195*^9, 3.5106887880672607`*^9}, { 3.5110111085669603`*^9, 3.5110111215185595`*^9}, {3.5110114759002275`*^9, 3.5110115017774367`*^9}, {3.519304678995322*^9, 3.5193046796273584`*^9}, { 3.519305336871951*^9, 3.519305337921011*^9}, {3.519305684794851*^9, 3.519305820680623*^9}, {3.519305875960785*^9, 3.519306097477455*^9}, { 3.519306141114951*^9, 3.51930623743346*^9}, 3.565002068874544*^9, { 3.568829787978145*^9, 3.568829795241821*^9}, {3.568829839276476*^9, 3.568829868031256*^9}, {3.56932789483381*^9, 3.569327935238941*^9}, { 3.569328026344155*^9, 3.569328030616673*^9}, {3.569581335135994*^9, 3.569581387841289*^9}, {3.580477610235226*^9, 3.580477623545881*^9}}, CellTags->{"corecell", "differentacrossnotebooks"}], Cell[BoxData[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"findrestpoints", "\[Equal]", " ", "1"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"RPs", "=", RowBox[{"restPoints", "[", RowBox[{ "dyn", ",", "Fmp", ",", "restPointSearchStartingValues", ",", "tolLevel", ",", ".001", ",", "6"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"CRPs", "=", RowBox[{"stabilitySets", "[", RowBox[{"RPs", ",", "dyn", ",", "Fmp", ",", " ", RowBox[{"Which", "[", RowBox[{ RowBox[{ RowBox[{"SCharacterization", "[", "dyn", "]"}], "==", "\"\\""}], ",", "\"\\"", ",", RowBox[{ RowBox[{"SCharacterization", "[", "dyn", "]"}], "==", "\"\\""}], ",", "\"\\"", ",", "True", ",", "\"\\""}], "]"}], ",", "stabn", ",", "stabT", ",", " ", "stabdelta", ",", " ", "stabeps"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"SRPs", "=", RowBox[{"CRPs", "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"USRPs", "=", RowBox[{"CRPs", "[", RowBox[{"[", "2", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"SCharacterization", "[", "dyn", "]"}], "==", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"SRPvs", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Transpose", "[", RowBox[{"smoothStabilityValues", "[", RowBox[{ RowBox[{"SRPs", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "dyn", ",", "Fmp"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "SRPs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"USRPvs", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Transpose", "[", RowBox[{"smoothStabilityValues", "[", RowBox[{ RowBox[{"USRPs", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "dyn", ",", "Fmp"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "USRPs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"NEa", "=", RowBox[{"nashEquilibria", "[", "Fmp", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"And", "[", RowBox[{ RowBox[{"findnashequilibria", "==", "1"}], ",", RowBox[{"findESSs", "==", "1"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"QEa", "=", " ", RowBox[{"DeleteCases", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"quasiStrictEqQ", "[", RowBox[{ RowBox[{"NEa", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "Fmp"}], "]"}], " ", ",", RowBox[{"NEa", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "\"\\""}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "NEa", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], ",", "\"\\""}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"ESSs", "=", RowBox[{ RowBox[{"stabilitySets", "[", RowBox[{ "QEa", ",", "dyn", ",", "Fmp", ",", "\"\\"", ",", "stabn", ",", "stabT", ",", "stabdelta", ",", "stabeps"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"ESSs", "=", RowBox[{ RowBox[{"regularESSs", "[", RowBox[{"NEa", ",", "Fmp"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "Input", CellChangeTimes->{{3.4927010600449357`*^9, 3.492701078551547*^9}, 3.492701233859937*^9, {3.4927012644275613`*^9, 3.492701296150041*^9}, 3.4927013313306284`*^9, 3.4928090904971247`*^9, {3.492809143693618*^9, 3.492809156592165*^9}, {3.492809230798869*^9, 3.4928092536717587`*^9}, 3.492809999834688*^9, 3.4928100734906*^9, {3.492810651862258*^9, 3.492810670669301*^9}, {3.4928113837045956`*^9, 3.4928114078292847`*^9}, 3.4928114625780096`*^9, {3.492811550884989*^9, 3.492811556943701*^9}, { 3.492811592064202*^9, 3.492811639812861*^9}, {3.492811691326935*^9, 3.4928116965043793`*^9}, {3.492856670525757*^9, 3.4928567167522273`*^9}, { 3.4934024916000357`*^9, 3.493402492341101*^9}, 3.507926856530527*^9, 3.5079270459929605`*^9, {3.508019647540586*^9, 3.5080196505248775`*^9}, { 3.5087652862346354`*^9, 3.5087652862346354`*^9}, {3.508765335916074*^9, 3.508765368372744*^9}, {3.5087793198629637`*^9, 3.5087793209945908`*^9}, { 3.510657238427292*^9, 3.5106572387265186`*^9}, {3.510658409012612*^9, 3.5106584218408628`*^9}, 3.5106585333179235`*^9, {3.5106585742811174`*^9, 3.5106586224327903`*^9}, {3.510658653727054*^9, 3.51065869218235*^9}, { 3.5106587302871423`*^9, 3.5106588153594704`*^9}, {3.5106589242660704`*^9, 3.5106589443749857`*^9}, {3.5106608409321003`*^9, 3.5106608457890844`*^9}, {3.510662483899393*^9, 3.5106624958766155`*^9}, { 3.5106635320916877`*^9, 3.51066355299174*^9}, {3.510663623372944*^9, 3.510663630873729*^9}, {3.5106637916949787`*^9, 3.5106637949696875`*^9}, { 3.5106640457402782`*^9, 3.510664046641574*^9}, {3.5106641223604527`*^9, 3.5106641485280795`*^9}, {3.5106647253274765`*^9, 3.5106647368941083`*^9}, 3.5106651822845483`*^9, {3.5106652270088587`*^9, 3.5106652305539565`*^9}, { 3.5106656770710845`*^9, 3.5106656792141657`*^9}, 3.5106657221559134`*^9, { 3.5106669238037977`*^9, 3.51066694513447*^9}, {3.5106670284943357`*^9, 3.5106670562242093`*^9}, {3.5106671075800076`*^9, 3.510667110956402*^9}, { 3.5106676443857927`*^9, 3.5106676499437847`*^9}, {3.5106737901178446`*^9, 3.5106738008833246`*^9}, {3.5106744003603983`*^9, 3.5106744021529756`*^9}, {3.5106873990148335`*^9, 3.5106875687088413`*^9}, {3.510687715069298*^9, 3.5106878389674544`*^9}, { 3.5106879036003923`*^9, 3.5106879072756767`*^9}, {3.510687943537819*^9, 3.5106879510185757`*^9}, {3.510688749772195*^9, 3.5106887880672607`*^9}, { 3.5110111085669603`*^9, 3.5110111215185595`*^9}, {3.5110114759002275`*^9, 3.5110115017774367`*^9}, {3.519304678995322*^9, 3.5193046796273584`*^9}, { 3.519305336871951*^9, 3.519305337921011*^9}, {3.519305684794851*^9, 3.519305820680623*^9}, {3.519305875960785*^9, 3.5193060505597715`*^9}, { 3.519420109304373*^9, 3.51942011345161*^9}, {3.5194204471216946`*^9, 3.519420450790905*^9}, {3.5194205027298756`*^9, 3.519420505626041*^9}, { 3.519553630121473*^9, 3.5195536323536005`*^9}, {3.5195566617508717`*^9, 3.5195567128527946`*^9}, {3.5196739226629353`*^9, 3.5196739279172363`*^9}, {3.5396935385608377`*^9, 3.539693539815733*^9}, { 3.539693611593792*^9, 3.5396936286111517`*^9}, 3.5396937901739397`*^9, { 3.539693839967111*^9, 3.53969384094844*^9}, 3.565002418271581*^9, 3.565002692188596*^9, 3.565002838205875*^9, {3.565002960019383*^9, 3.565002960712094*^9}, 3.565003146473299*^9, {3.565003186789034*^9, 3.565003187949549*^9}, {3.568829698404254*^9, 3.568829698590887*^9}, 3.568829854057624*^9, 3.568968904180613*^9, 3.568969065874125*^9, { 3.56967122183976*^9, 3.569671238060129*^9}, {3.569672251984788*^9, 3.56967225854737*^9}, {3.580485736535532*^9, 3.580485761017513*^9}, { 3.580501996405723*^9, 3.580502016458768*^9}, {3.580502234574568*^9, 3.5805022755529*^9}, {3.580504023208482*^9, 3.580504037159514*^9}}, CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[CellGroupData[{ Cell["Regular Trajectories", "Subsection", CellChangeTimes->{{3.4841517214515386`*^9, 3.4841517247262473`*^9}, { 3.4841773919238653`*^9, 3.484177394978257*^9}}, CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{"trajSol", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"difEqSol", "[", RowBox[{ RowBox[{"trajectoryspecs", "[", RowBox[{"[", RowBox[{"j", ",", "1"}], "]"}], "]"}], ",", "dyn", ",", "Fmp", ",", "0", ",", RowBox[{"trajectoryspecs", "[", RowBox[{"[", RowBox[{"j", ",", "2"}], "]"}], "]"}], ",", "\"\\"", ",", RowBox[{"AOCharacterization", "[", "dyn", "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "trajectoryspecs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.4747149974256773`*^9, 3.4747150022626324`*^9}, { 3.4747152395638547`*^9, 3.474715251210602*^9}, {3.4814188859968495`*^9, 3.4814188860268927`*^9}, {3.481735483124242*^9, 3.4817354831542845`*^9}, { 3.481756513534622*^9, 3.481756522547582*^9}, {3.484193468958743*^9, 3.4841934921120358`*^9}, {3.4841942078912754`*^9, 3.4841942304737473`*^9}, 3.492686689629551*^9, {3.4926869916037683`*^9, 3.492687022017501*^9}, { 3.492687315409378*^9, 3.492687334637026*^9}, {3.4926873813542023`*^9, 3.492687416664976*^9}, {3.4926884415337334`*^9, 3.4926885089406595`*^9}, { 3.4926885633789377`*^9, 3.4926886219832067`*^9}, {3.492688658986415*^9, 3.4926887209455075`*^9}, {3.492692464588602*^9, 3.4926924679834833`*^9}, { 3.5079240895355797`*^9, 3.507924098398324*^9}, {3.5079814105345907`*^9, 3.5079814140296164`*^9}, 3.5080189455211315`*^9, {3.5080190451844406`*^9, 3.5080191028974276`*^9}, 3.508019510112975*^9, 3.5159567659692707`*^9, { 3.5160386219971676`*^9, 3.5160386400442*^9}, {3.516039030338523*^9, 3.5160390324096413`*^9}, {3.516039313782735*^9, 3.5160393162508764`*^9}, { 3.5160405835083594`*^9, 3.5160405954870443`*^9}, 3.516044451296584*^9, { 3.5192892633075953`*^9, 3.519289264569668*^9}, 3.5399895065632753`*^9, 3.5399900683664083`*^9, 3.565001021328486*^9, 3.569637621073082*^9, { 3.569856345750003*^9, 3.569856348557041*^9}, {3.580642785286404*^9, 3.580642792209772*^9}, 3.580642922051517*^9, 3.58064360075784*^9}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Special Trajectories", "Subsection", CellChangeTimes->{{3.4841517214515386`*^9, 3.4841517247262473`*^9}, { 3.4841773919238653`*^9, 3.4841774030498633`*^9}}, CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{"cTrajSol", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"difEqSol", "[", RowBox[{ RowBox[{"customtrajectoryspecs", "[", RowBox[{"[", RowBox[{"j", ",", "1"}], "]"}], "]"}], ",", "dyn", ",", "Fmp", ",", RowBox[{"customtrajectoryspecs", "[", RowBox[{"[", RowBox[{"j", ",", "3"}], "]"}], "]"}], ",", RowBox[{"customtrajectoryspecs", "[", RowBox[{"[", RowBox[{"j", ",", "2"}], "]"}], "]"}], ",", "\"\\"", ",", RowBox[{"AOCharacterization", "[", "dyn", "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "customtrajectoryspecs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.474715003814864*^9, 3.474715004666088*^9}, { 3.4814188860268927`*^9, 3.481418886036907*^9}, {3.4817354831943426`*^9, 3.481735483204357*^9}, {3.4817565232586045`*^9, 3.481756549155843*^9}, { 3.481758547649536*^9, 3.4817585513448496`*^9}, {3.4841941945921526`*^9, 3.4841941973260837`*^9}, {3.484195489754504*^9, 3.484195498196644*^9}, { 3.492688897559466*^9, 3.492688948352503*^9}, {3.492688978485832*^9, 3.4926889801982946`*^9}, {3.4926911314216022`*^9, 3.4926911349466705`*^9}, 3.4926911784291954`*^9, {3.4926912279003315`*^9, 3.4926912287715845`*^9}, 3.4926924734112883`*^9, {3.492692865965754*^9, 3.4926928686796565`*^9}, { 3.507924101632975*^9, 3.5079241051380153`*^9}, {3.5079516157839394`*^9, 3.507951618413091*^9}, 3.507983061601386*^9, 3.5079833772803097`*^9, { 3.508018949036186*^9, 3.508018990866335*^9}, {3.5080191276530247`*^9, 3.508019146990831*^9}, {3.508019183002613*^9, 3.5080191839339523`*^9}, { 3.5080195150100164`*^9, 3.50801953322621*^9}, 3.515956767033331*^9, 3.5192893631393056`*^9, 3.539989508901409*^9, 3.5399900701335096`*^9, 3.565001022209496*^9, 3.569637601372383*^9, {3.569856358698417*^9, 3.569856361611539*^9}, {3.580642802764109*^9, 3.580642822130715*^9}, 3.580642924259909*^9, 3.580643605087451*^9}, ImageRegion->{{0, 1}, {0, 1}}, CellTags->"corecell"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Drawing", "Section", CellChangeTimes->{{3.539862040631214*^9, 3.5398620417342772`*^9}}, ImageRegion->{{0, 1}, {0, 1}}, CellTags->"corecell"], Cell[CellGroupData[{ Cell["Drawing Frames and Dots", "Subsection", CellChangeTimes->{{3.519140370261651*^9, 3.519140374359885*^9}}, ImageRegion->{{0, 1}, {0, 1}}, CellTags->"corecell"], Cell[CellGroupData[{ Cell["\<\ The cells that belong to this group are for drawing the simplex frame and \ strategy names.\ \>", "Text", CellChangeTimes->{{3.4809472476323805`*^9, 3.480947255241707*^9}, { 3.519138688100436*^9, 3.5191386884474564`*^9}, {3.519140337098754*^9, 3.519140339236876*^9}, {3.5191650703269057`*^9, 3.5191650710579476`*^9}, 3.5192031647003098`*^9, {3.571987185589763*^9, 3.571987196931006*^9}}, ImageRegion->{{0, 1}, {0, 1}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"BuildSimplexPyramid", "[", RowBox[{"simplexfacecolors_", ",", "simplexfaceshades_", ",", RowBox[{"shading_:", "1"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"vertices", ",", "polygons"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"vertices", "=", RowBox[{"planeCorners", "[", RowBox[{"[", RowBox[{"{", RowBox[{"4", ",", "3", ",", "2", ",", "1"}], "}"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"polygons", "=", RowBox[{"Subsets", "[", RowBox[{"vertices", ",", RowBox[{"{", "3", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{"simplexfaceshade", "[", RowBox[{"[", "j", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"simplexfaceshade", ",", "1"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], "==", "0"}], ",", RowBox[{"edgecolor", "=", "Black"}], ",", RowBox[{"edgecolor", "=", "simplexcolor"}]}], "]"}], ";"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"Graphics3D", "[", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"And", "[", RowBox[{ RowBox[{"shading", "==", "0"}], ",", RowBox[{"j", "==", "2"}]}], "]"}], ",", RowBox[{"{", "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"EdgeForm", "[", RowBox[{"Darker", "[", RowBox[{"simplexfacecolors", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], "]"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"shading", "\[Equal]", "1"}], ",", RowBox[{"Opacity", "[", RowBox[{"simplexfaceshades", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], ",", RowBox[{"{", "}"}]}], "]"}], ",", RowBox[{"Specularity", "[", RowBox[{"White", ",", "20"}], "]"}], ",", RowBox[{"simplexfacecolors", "[", RowBox[{"[", "j", "]"}], "]"}], ",", RowBox[{"Polygon", "[", RowBox[{"polygons", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}]}], "}"}]}], "]"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"polygons", ",", "1"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], "\[IndentingNewLine]", "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"simplex", "=", RowBox[{"BuildSimplexPyramid", "[", RowBox[{ "simplexfacecolors", ",", "simplexfaceshades", ",", "simplexfaceshading"}], "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.481817151673976*^9, 3.4818171688987436`*^9}, { 3.4818172393700767`*^9, 3.481817260610619*^9}, {3.481817309681179*^9, 3.481817338222219*^9}, 3.4818173774185805`*^9, {3.4818175139949675`*^9, 3.4818175185214767`*^9}, {3.4844092206768103`*^9, 3.4844092654912505`*^9}, {3.4844097378704987`*^9, 3.484409745882018*^9}, { 3.484410830473482*^9, 3.4844108358644037`*^9}, {3.4844109004672985`*^9, 3.484410902960884*^9}, {3.4844109402745385`*^9, 3.484410941456238*^9}, 3.4844112644807243`*^9, {3.4846667950016527`*^9, 3.4846667966440144`*^9}, { 3.484670088095872*^9, 3.4846701164065804`*^9}, {3.5191394894242697`*^9, 3.519139505745203*^9}, {3.5193084584334936`*^9, 3.5193084598815765`*^9}, { 3.564999346410241*^9, 3.564999351434732*^9}, {3.569416537509221*^9, 3.569416538325071*^9}, {3.569416587102688*^9, 3.569416617044858*^9}, { 3.569438561078888*^9, 3.569438624672154*^9}, {3.56943867850327*^9, 3.569438695797997*^9}, {3.569581444717623*^9, 3.569581451518205*^9}, { 3.569584071965637*^9, 3.569584074431835*^9}, {3.570031948865801*^9, 3.570031953559054*^9}, {3.570032144157599*^9, 3.570032159878075*^9}, { 3.570032257921996*^9, 3.570032265013089*^9}, {3.57003252506677*^9, 3.570032584944941*^9}, {3.5700326588889*^9, 3.570032662709757*^9}, { 3.5700327818573*^9, 3.570032806583176*^9}, {3.570032840342529*^9, 3.570032845353898*^9}, 3.570032875584502*^9, 3.570036032084893*^9, { 3.571956984673738*^9, 3.571957040153366*^9}, 3.571957279279463*^9, { 3.571988601350763*^9, 3.571988609724873*^9}, 3.58047191749938*^9, { 3.580483975291487*^9, 3.580484010949796*^9}, {3.580508669466015*^9, 3.580508676620914*^9}, {3.580508804323923*^9, 3.580508818327149*^9}}, ImageRegion->{{0, 1}, {0, 1}}, CellTags->{"corecell", "differentacrossnotebooks"}], Cell[BoxData[ RowBox[{ RowBox[{"simplexStrategies", "=", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Text", "[", RowBox[{ RowBox[{"strategy", "[", "j", "]"}], ",", RowBox[{"simplexStrategiesPositions", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"dim", "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.481817151673976*^9, 3.4818171688987436`*^9}, { 3.4818172393700767`*^9, 3.481817260610619*^9}, {3.481817309681179*^9, 3.481817338222219*^9}, 3.4818173774185805`*^9, {3.4818175139949675`*^9, 3.4818175185214767`*^9}, {3.4844092206768103`*^9, 3.4844092654912505`*^9}, {3.4844097378704987`*^9, 3.484409745882018*^9}, { 3.484410830473482*^9, 3.4844108358644037`*^9}, {3.4844109004672985`*^9, 3.484410902960884*^9}, {3.4844109402745385`*^9, 3.484410941456238*^9}, 3.4844112644807243`*^9, {3.4846667950016527`*^9, 3.4846667966440144`*^9}, { 3.484670088095872*^9, 3.4846701164065804`*^9}, {3.5191394894242697`*^9, 3.519139505745203*^9}, {3.5193084584334936`*^9, 3.5193084598815765`*^9}, { 3.564999346410241*^9, 3.564999351434732*^9}, {3.569416537509221*^9, 3.569416538325071*^9}, {3.569416587102688*^9, 3.569416617044858*^9}, { 3.569438561078888*^9, 3.569438624672154*^9}, {3.56943867850327*^9, 3.569438695797997*^9}, {3.569581444717623*^9, 3.569581451518205*^9}, { 3.569584071965637*^9, 3.569584074431835*^9}, {3.570031948865801*^9, 3.570031953559054*^9}, {3.570032144157599*^9, 3.570032159878075*^9}, { 3.570032257921996*^9, 3.570032265013089*^9}, {3.57003252506677*^9, 3.570032584944941*^9}, {3.5700326588889*^9, 3.570032662709757*^9}, { 3.5700327818573*^9, 3.570032806583176*^9}, {3.570032840342529*^9, 3.570032845353898*^9}, 3.570032875584502*^9, 3.570036032084893*^9, { 3.571956984673738*^9, 3.571957040153366*^9}, 3.571957279279463*^9, { 3.571987288913116*^9, 3.571987298858385*^9}, {3.571987449569133*^9, 3.571987466511833*^9}, {3.571987520913866*^9, 3.571987526872442*^9}, { 3.57198757185503*^9, 3.571987727743864*^9}, {3.571987771515703*^9, 3.571987883642248*^9}, {3.57198792643245*^9, 3.571987956904014*^9}, { 3.571988038084013*^9, 3.571988051430865*^9}, 3.571988113820234*^9, { 3.57198818996245*^9, 3.571988191982813*^9}, {3.572377932056562*^9, 3.572377932452167*^9}, {3.580476628427165*^9, 3.580476647586434*^9}}, ImageRegion->{{0, 1}, {0, 1}}, CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[CellGroupData[{ Cell["\<\ This part draws the dots for the rest points. restPoints[] and \ stabilitySets[] should have been called in order to determine the rest points \ and their stability. You may need to modify this part if the stability test \ does not work for your choice of dynamic.\ \>", "Text", CellChangeTimes->{ 3.474715011716226*^9, 3.481418886086979*^9, 3.481735483284472*^9, 3.492477466508514*^9, {3.4924811111091924`*^9, 3.492481127542823*^9}, { 3.4928318187188387`*^9, 3.4928318675190096`*^9}, 3.4934025014542055`*^9, 3.5087652862746925`*^9, 3.565002839828234*^9, 3.565003189176658*^9, 3.568976047902921*^9}, ImageRegion->{{0, 1}, {0, 1}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"And", "[", RowBox[{ RowBox[{"findrestpoints", "\[Equal]", " ", "1"}], ",", RowBox[{"drawrestpoints", "==", "1"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"srpDots", "=", "\[IndentingNewLine]", RowBox[{"Graphics3D", "[", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Opacity", "[", "dotopacity", "]"}], ",", RowBox[{"Glow", "[", RowBox[{"GrayLevel", "[", "srpcolor", "]"}], "]"}], ",", "Black", ",", RowBox[{"EdgeForm", "[", "]"}], ",", RowBox[{"Sphere", "[", RowBox[{ RowBox[{"simplexToPlane", "[", RowBox[{"SRPs", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], ",", "dotradius"}], "]"}]}], "}"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "SRPs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], "]"}]}], " ", ";", "\[IndentingNewLine]", RowBox[{"urpDots", "=", RowBox[{"Graphics3D", "[", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Opacity", "[", "dotopacity", "]"}], ",", RowBox[{"Glow", "[", RowBox[{"GrayLevel", "[", "urpcolor", "]"}], "]"}], ",", "Black", ",", RowBox[{"EdgeForm", "[", "]"}], ",", RowBox[{"Sphere", "[", RowBox[{ RowBox[{"simplexToPlane", "[", RowBox[{"USRPs", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], ",", "dotradius"}], "]"}]}], "}"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "USRPs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], "]"}]}]}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"srpDots", "=", RowBox[{"Graphics3D", "[", RowBox[{"{", "}"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"urpDots", "=", RowBox[{"Graphics3D", "[", RowBox[{"{", "}"}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"And", "[", RowBox[{ RowBox[{"findnashequilibria", "\[Equal]", " ", "1"}], ",", RowBox[{"drawnashequilibria", "==", "1"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"neDots", "=", "\[IndentingNewLine]", RowBox[{"Graphics3D", "[", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Opacity", "[", "dotopacity", "]"}], ",", RowBox[{"Glow", "[", RowBox[{"GrayLevel", "[", "necolor", "]"}], "]"}], ",", "Black", ",", RowBox[{"EdgeForm", "[", "]"}], ",", RowBox[{"Sphere", "[", RowBox[{ RowBox[{"simplexToPlane", "[", RowBox[{"NEa", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], ",", "dotradius"}], "]"}]}], "}"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "NEa", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], "]"}]}], " ", ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"neDots", "=", RowBox[{"Graphics3D", "[", RowBox[{"{", "}"}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "Input", CellChangeTimes->{{3.4818175194828587`*^9, 3.481817520414198*^9}, { 3.492701111454836*^9, 3.492701112159847*^9}, {3.492809186354962*^9, 3.492809189789901*^9}, {3.4928108100597343`*^9, 3.492810811071189*^9}, 3.4928109428106213`*^9, 3.4928277714240465`*^9, {3.5079818638263927`*^9, 3.5079818836048326`*^9}, {3.5079840630714293`*^9, 3.507984071643756*^9}, { 3.519138190793992*^9, 3.51913819198006*^9}, {3.5191382248269386`*^9, 3.5191382263540263`*^9}, {3.519289972392153*^9, 3.519290003620939*^9}, { 3.539374840503021*^9, 3.539374849826319*^9}, {3.539374888085667*^9, 3.539374909866335*^9}, {3.539375021742673*^9, 3.539375075244198*^9}, 3.539375168804672*^9, {3.539375260156928*^9, 3.539375262262122*^9}, { 3.539375375657555*^9, 3.539375382577832*^9}, {3.539375689058983*^9, 3.539375777718745*^9}, {3.539375998558558*^9, 3.539376062993081*^9}, { 3.539376255092529*^9, 3.539376256034831*^9}, {3.539377129116799*^9, 3.539377131519602*^9}, {3.539377463020719*^9, 3.539377466400508*^9}, { 3.539377860789994*^9, 3.53937787200012*^9}, {3.539377914445229*^9, 3.539377923601465*^9}, {3.539377968899867*^9, 3.539377969970929*^9}, { 3.539378029965517*^9, 3.53937803498238*^9}, {3.539378098718596*^9, 3.539378111377969*^9}, {3.539378161820735*^9, 3.539378173758658*^9}, 3.539378217953879*^9, 3.539378274292609*^9, 3.539378329594676*^9, 3.539378374067916*^9, {3.539378440666416*^9, 3.539378468004299*^9}, { 3.5396941380730057`*^9, 3.539694141064054*^9}, {3.5398597499481945`*^9, 3.539859753114376*^9}, {3.539860169909215*^9, 3.5398601832769794`*^9}, { 3.564999353733384*^9, 3.564999356219908*^9}, {3.569581539091793*^9, 3.569581578447954*^9}, {3.580472034998582*^9, 3.580472037969412*^9}, { 3.580472069608497*^9, 3.580472073362936*^9}, {3.580472104217526*^9, 3.580472144302044*^9}}, ImageRegion->{{0, 1}, {0, 1}}, CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[CellGroupData[{ Cell["These cells draw custom text, lines and dots", "Text", CellChangeTimes->{{3.492481094024626*^9, 3.492481094795735*^9}, { 3.5191401927915*^9, 3.5191402258053885`*^9}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{"cDots", "=", RowBox[{"If", "[", RowBox[{ RowBox[{"customdots", "==", RowBox[{"{", "}"}]}], ",", RowBox[{"Graphics3D", "[", RowBox[{"{", "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Graphics3D", "[", RowBox[{"DeleteCases", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"customdots", "[", RowBox[{"[", RowBox[{"j", ",", "4"}], "]"}], "]"}], "\[Equal]", "0"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Opacity", "[", "dotopacity", "]"}], ",", RowBox[{"Glow", "[", RowBox[{"customdots", "[", RowBox[{"[", RowBox[{"j", ",", "3"}], "]"}], "]"}], "]"}], ",", "Black", ",", RowBox[{"EdgeForm", "[", "]"}], ",", "\[IndentingNewLine]", RowBox[{"Sphere", "[", RowBox[{ RowBox[{"simplexToPlane", "[", RowBox[{"customdots", "[", RowBox[{"[", RowBox[{"j", ",", "1"}], "]"}], "]"}], "]"}], ",", " ", RowBox[{"customdots", "[", RowBox[{"[", RowBox[{"j", ",", "2"}], "]"}], "]"}]}], "]"}]}], "}"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "customdots", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], ",", "Null"}], "]"}], "]"}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"cWDots", "=", RowBox[{"If", "[", RowBox[{ RowBox[{"customdots", "==", RowBox[{"{", "}"}]}], ",", RowBox[{"Graphics3D", "[", RowBox[{"{", "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Graphics3D", "[", RowBox[{"DeleteCases", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"customdots", "[", RowBox[{"[", RowBox[{"j", ",", "4"}], "]"}], "]"}], "\[Equal]", "1"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Opacity", "[", "dotopacity", "]"}], ",", RowBox[{"Glow", "[", RowBox[{"GrayLevel", "[", "1", "]"}], "]"}], ",", "Black", ",", RowBox[{"EdgeForm", "[", "]"}], ",", RowBox[{"Sphere", "[", RowBox[{ RowBox[{"simplexToPlane", "[", RowBox[{"customdots", "[", RowBox[{"[", RowBox[{"j", ",", "1"}], "]"}], "]"}], "]"}], ",", " ", RowBox[{"customdots", "[", RowBox[{"[", RowBox[{"j", ",", "2"}], "]"}], "]"}]}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "customdots", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], ",", "Null"}], "]"}], "]"}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"cLines", "=", RowBox[{"If", "[", RowBox[{ RowBox[{"customlines", "==", RowBox[{"{", "}"}]}], ",", RowBox[{"Graphics3D", "[", RowBox[{"{", "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Graphics3D", "[", RowBox[{"DeleteCases", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"customlines", "[", RowBox[{"[", RowBox[{"j", ",", "3"}], "]"}], "]"}], ",", RowBox[{"customlines", "[", RowBox[{"[", RowBox[{"j", ",", "4"}], "]"}], "]"}], ",", RowBox[{"customlines", "[", RowBox[{"[", RowBox[{"j", ",", "5"}], "]"}], "]"}], ",", RowBox[{"Line", "[", RowBox[{"{", RowBox[{ RowBox[{"simplexToPlane", "[", RowBox[{"customlines", "[", RowBox[{"[", RowBox[{"j", ",", "1"}], "]"}], "]"}], "]"}], ",", RowBox[{"simplexToPlane", "[", RowBox[{"customlines", "[", RowBox[{"[", RowBox[{"j", ",", "2"}], "]"}], "]"}], "]"}]}], "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"arrowHead3D", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"simplexToPlane", "[", RowBox[{"customlines", "[", RowBox[{"[", RowBox[{"j", ",", "1"}], "]"}], "]"}], "]"}], ",", RowBox[{"simplexToPlane", "[", RowBox[{"customlines", "[", RowBox[{"[", RowBox[{"j", ",", "2"}], "]"}], "]"}], "]"}]}], "}"}], ",", RowBox[{"customlines", "[", RowBox[{"[", RowBox[{"j", ",", "6"}], "]"}], "]"}], ",", "1", ",", "3"}], "]"}]}], "\[IndentingNewLine]", "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "customlines", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], ",", "Null"}], "]"}], "]"}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"cText", "=", RowBox[{"If", "[", RowBox[{ RowBox[{"customtext", "==", RowBox[{"{", "}"}]}], ",", RowBox[{"Graphics3D", "[", RowBox[{"{", "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Graphics3D", "[", "\[IndentingNewLine]", RowBox[{"DeleteCases", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"Text", "[", RowBox[{"Style", "[", RowBox[{ RowBox[{"customtext", "[", RowBox[{"[", RowBox[{"j", ",", "1"}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"FontFamily", "\[Rule]", RowBox[{"customtext", "[", RowBox[{"[", RowBox[{"j", ",", "3"}], "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"FontSlant", "\[Rule]", RowBox[{"customtext", "[", RowBox[{"[", RowBox[{"j", ",", "4"}], "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"FontSize", "\[Rule]", RowBox[{"customtext", "[", RowBox[{"[", RowBox[{"j", ",", "5"}], "]"}], "]"}]}], ",", RowBox[{"N", "[", RowBox[{"customtext", "[", RowBox[{"[", RowBox[{"j", ",", "2"}], "]"}], "]"}], "]"}]}], "]"}], "]"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"i", ",", RowBox[{ RowBox[{"Dimensions", "[", "customtext", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], ",", "Null"}], "]"}], "]"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.519141058093992*^9, 3.5191411798919587`*^9}, { 3.5191412153019843`*^9, 3.519141251912078*^9}, 3.519141350094694*^9, 3.5191414066769304`*^9, 3.5191415320040984`*^9, {3.5191415728694363`*^9, 3.519141573552475*^9}, 3.5191416040312185`*^9, {3.519202966577977*^9, 3.5192030171888723`*^9}, {3.5398623880420847`*^9, 3.5398624615902915`*^9}, {3.5398625013985686`*^9, 3.539862536619583*^9}, { 3.5398625761148424`*^9, 3.5398625935718403`*^9}, {3.55456177816995*^9, 3.554561788223509*^9}, {3.56499935706139*^9, 3.564999359399118*^9}, { 3.569582168440941*^9, 3.569582212985464*^9}, {3.569582628562061*^9, 3.569582656647595*^9}, {3.570133051623722*^9, 3.570133071367185*^9}, { 3.570139854676878*^9, 3.570139859492362*^9}, {3.572107140606069*^9, 3.572107146735984*^9}, {3.580472229305552*^9, 3.580472231349112*^9}, { 3.580472261694293*^9, 3.580472270208701*^9}, {3.580472318704638*^9, 3.580472347075205*^9}}, CellTags->{"differentacrossnotebooks", "corecell"}] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Drawing Solutions to Diff Eqs", "Subsection", CellChangeTimes->{{3.506174473166073*^9, 3.506174473506562*^9}}, ImageRegion->{{0, 1}, {0, 1}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{"colfun", "=", RowBox[{"Function", "[", RowBox[{ RowBox[{"{", RowBox[{"x1", ",", "x2", ",", "x3", ",", "t"}], "}"}], ",", RowBox[{"Hue", "[", RowBox[{"t", "/", "1.1"}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"trajLines", "=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", "trajectoryspecs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", "0"}], ",", "\[IndentingNewLine]", RowBox[{"Graphics3D", "[", RowBox[{"{", "}"}], "]"}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"ParametricPlot3D", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{ RowBox[{"simplexToPlane", "[", RowBox[{"X", "[", "t", "]"}], "]"}], "/.", "\[InvisibleSpace]", RowBox[{"trajSol", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", RowBox[{"trajectoryspecs", "[", RowBox[{"[", RowBox[{"j", ",", "2"}], "]"}], "]"}]}], "}"}], ",", " ", "\[IndentingNewLine]", RowBox[{"PlotStyle", "->", RowBox[{"{", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"trajectoryspecs", "[", RowBox[{"[", RowBox[{"j", ",", "3"}], "]"}], "]"}], "]"}], "==", RowBox[{"{", "0", "}"}]}], ",", RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"trajectoryspecs", "[", RowBox[{"[", RowBox[{"j", ",", "3", ",", "1"}], "]"}], "]"}], "===", "\"\\""}], ",", RowBox[{"Drop", "[", RowBox[{ RowBox[{"trajectoryspecs", "[", RowBox[{"[", RowBox[{"j", ",", "3"}], "]"}], "]"}], ",", "1"}], "]"}], ",", RowBox[{"trajectoryspecs", "[", RowBox[{"[", RowBox[{"j", ",", "3"}], "]"}], "]"}]}], "]"}]}], "\[IndentingNewLine]", "]"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"ColorFunction", "->", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"trajectoryspecs", "[", RowBox[{"[", RowBox[{"j", ",", "3"}], "]"}], "]"}], "]"}], "==", RowBox[{"{", "0", "}"}]}], ",", "Automatic", ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"trajectoryspecs", "[", RowBox[{"[", RowBox[{"j", ",", "3", ",", "1"}], "]"}], "]"}], "===", "\"\\""}], ",", " ", "colfun", ",", "Automatic"}], "]"}]}], "\[IndentingNewLine]", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"DisplayFunction", " ", "\[Rule]", " ", "Identity"}], ",", " ", RowBox[{"Boxed", "\[Rule]", " ", "False"}], ",", " ", RowBox[{"Axes", "\[Rule]", " ", "False"}], ",", " ", RowBox[{"PlotPoints", "\[Rule]", " ", "ppoints"}]}], "\[IndentingNewLine]", "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "trajectoryspecs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}], "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.4817565864194255`*^9, 3.4817565892234573`*^9}, 3.4818175122524624`*^9, {3.4926957945966234`*^9, 3.492695798235078*^9}, { 3.5079504320793877`*^9, 3.507950444847748*^9}, {3.5079818369277143`*^9, 3.5079818385800905`*^9}, {3.50798401391074*^9, 3.5079840215717554`*^9}, { 3.5192891819659433`*^9, 3.519289185550148*^9}, 3.519289318720765*^9, { 3.5192914337617383`*^9, 3.5192914464604645`*^9}, {3.558645085258152*^9, 3.5586450924605637`*^9}, 3.564999373701366*^9, 3.56958175392593*^9, 3.569637622885437*^9, 3.569637668643769*^9, 3.57195798833426*^9, 3.571958055501865*^9, {3.580472430893113*^9, 3.580472440568837*^9}, 3.580472550524762*^9, {3.580472744790127*^9, 3.580472761806871*^9}}, CellTags->{"corecell", "differentacrossnotebooks"}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"cTrajLines", "=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", "customtrajectoryspecs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", "0"}], ",", "\[IndentingNewLine]", RowBox[{"Graphics3D", "[", RowBox[{"{", "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"ParametricPlot3D", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{ RowBox[{"simplexToPlane", "[", RowBox[{"X", "[", "t", "]"}], "]"}], "/.", "\[InvisibleSpace]", RowBox[{"cTrajSol", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"t", ",", RowBox[{"customtrajectoryspecs", "[", RowBox[{"[", RowBox[{"j", ",", "3"}], "]"}], "]"}], ",", RowBox[{"customtrajectoryspecs", "[", RowBox[{"[", RowBox[{"j", ",", "2"}], "]"}], "]"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"PlotStyle", "->", RowBox[{"{", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"customtrajectoryspecs", "[", RowBox[{"[", RowBox[{"j", ",", "4"}], "]"}], "]"}], "]"}], "==", RowBox[{"{", "0", "}"}]}], ",", RowBox[{"{", "}"}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"customtrajectoryspecs", "[", RowBox[{"[", RowBox[{"j", ",", "4", ",", "1"}], "]"}], "]"}], "===", "\"\\""}], ",", RowBox[{"Drop", "[", RowBox[{ RowBox[{"customtrajectoryspecs", "[", RowBox[{"[", RowBox[{"j", ",", "4"}], "]"}], "]"}], ",", "1"}], "]"}], ",", RowBox[{"customtrajectoryspecs", "[", RowBox[{"[", RowBox[{"j", ",", "4"}], "]"}], "]"}]}], "]"}]}], "\[IndentingNewLine]", "]"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"ColorFunction", "->", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"customtrajectoryspecs", "[", RowBox[{"[", RowBox[{"j", ",", "4"}], "]"}], "]"}], "]"}], "==", RowBox[{"{", "0", "}"}]}], ",", "Automatic", ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"customtrajectoryspecs", "[", RowBox[{"[", RowBox[{"j", ",", "4", ",", "1"}], "]"}], "]"}], "===", "\"\\""}], ",", " ", "colfun", ",", "Automatic"}], "]"}]}], "\[IndentingNewLine]", "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"DisplayFunction", " ", "\[Rule]", " ", "Identity"}], ",", " ", RowBox[{"Boxed", "\[Rule]", " ", "False"}], ",", " ", RowBox[{"Axes", "\[Rule]", " ", "False"}], ",", " ", RowBox[{"PlotPoints", "\[Rule]", " ", "ppoints"}]}], "\[IndentingNewLine]", "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "customtrajectoryspecs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}], "]"}]}], " ", ";"}], "\[IndentingNewLine]"}]], "Input", CellChangeTimes->{{3.481758552085915*^9, 3.4817585549199905`*^9}, 3.48181751295347*^9, {3.492692873977274*^9, 3.4926928785037827`*^9}, { 3.4926958490750933`*^9, 3.492695852600162*^9}, {3.507950315842247*^9, 3.5079503387351656`*^9}, {3.5079503826583242`*^9, 3.507950410343133*^9}, { 3.507981847312647*^9, 3.5079818570166006`*^9}, {3.5079840315360837`*^9, 3.5079840425719523`*^9}, 3.5192892258414526`*^9, 3.519289349633533*^9, { 3.5192893925809894`*^9, 3.5192893946791096`*^9}, {3.5192914107414217`*^9, 3.5192914169257755`*^9}, 3.5586451081154594`*^9, 3.564999374374086*^9, 3.569581742637377*^9, 3.569637603029098*^9, 3.569637670027989*^9, { 3.571957992635135*^9, 3.571957995285997*^9}, 3.571958053728816*^9, 3.580472625660339*^9, {3.58047276719603*^9, 3.580472771789279*^9}, { 3.580484564615507*^9, 3.580484565215808*^9}}, ImageRegion->{{0, 1}, {0, 1}}, CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[CellGroupData[{ Cell["Drawing Arrows", "Subsection", CellChangeTimes->{{3.5191404527803707`*^9, 3.519140454050443*^9}}, ImageRegion->{{0, 1}, {0, 1}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{"invertarrows", "=", "0"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"invertarrows", "==", "1"}], ",", RowBox[{"auxrelarrowstart", "=", RowBox[{ RowBox[{"-", "1"}], "*", "relarrowstart"}]}], ",", RowBox[{"auxrelarrowstart", "=", "relarrowstart"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"trajAr", "=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", "trajectoryspecs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", "0"}], ",", "\[IndentingNewLine]", RowBox[{"Graphics3D", "[", RowBox[{"{", "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Graphics3D", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"trajectoryspecs", "[", RowBox[{"[", RowBox[{"k", ",", "3"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "\[NotEqual]", " ", "0"}], ",", " ", RowBox[{ RowBox[{"Join", "[", RowBox[{ RowBox[{"Select", "[", RowBox[{ RowBox[{"trajectoryspecs", "[", RowBox[{"[", RowBox[{"k", ",", "3"}], "]"}], "]"}], ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"MatchQ", "[", RowBox[{"#1", ",", RowBox[{"Hue", "[", "__", "]"}]}], "]"}], " ", "||", RowBox[{"MatchQ", "[", RowBox[{"#1", ",", RowBox[{"GrayLevel", "[", "__", "]"}]}], "]"}], "||", RowBox[{"MatchQ", "[", RowBox[{"#1", ",", RowBox[{"RGBColor", "[", "__", "]"}]}], "]"}], "||", RowBox[{"MatchQ", "[", RowBox[{"#1", ",", RowBox[{"CMYKColor", "[", "__", "]"}]}], "]"}]}], ")"}], "&"}]}], "]"}], ",", RowBox[{"{", RowBox[{"GrayLevel", "[", "0", "]"}], "}"}]}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"GrayLevel", "[", "0", "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"trajectoryspecs", "[", RowBox[{"[", RowBox[{"k", ",", "3"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "\[NotEqual]", " ", "0"}], ",", " ", RowBox[{ RowBox[{"Join", "[", RowBox[{ RowBox[{"Select", "[", RowBox[{ RowBox[{"trajectoryspecs", "[", RowBox[{"[", RowBox[{"k", ",", "3"}], "]"}], "]"}], ",", RowBox[{ RowBox[{"(", RowBox[{"MatchQ", "[", RowBox[{"#1", ",", RowBox[{"Opacity", "[", "__", "]"}]}], "]"}], ")"}], "&"}]}], "]"}], ",", RowBox[{"{", RowBox[{"Opacity", "[", "1", "]"}], "}"}]}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"Opacity", "[", "1", "]"}]}], "]"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"arrowHead3D", "[", RowBox[{ RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"Evaluate", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"simplexToPlane", "[", RowBox[{"X", "[", RowBox[{ RowBox[{"trajectoryspecs", "[", RowBox[{"[", RowBox[{"k", ",", "4", ",", "j"}], "]"}], "]"}], "*", RowBox[{"(", RowBox[{"1", "-", "auxrelarrowstart"}], ")"}]}], "]"}], "]"}], "/.", "\[InvisibleSpace]", RowBox[{"trajSol", "[", RowBox[{"[", "k", "]"}], "]"}]}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Flatten", "[", RowBox[{"Evaluate", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"simplexToPlane", "[", RowBox[{"X", "[", RowBox[{"trajectoryspecs", "[", RowBox[{"[", RowBox[{"k", ",", "4", ",", "j"}], "]"}], "]"}], "]"}], "]"}], "/.", "\[InvisibleSpace]", RowBox[{"trajSol", "[", RowBox[{"[", "k", "]"}], "]"}]}], "]"}], "]"}]}], "\[IndentingNewLine]", "}"}], ",", RowBox[{ RowBox[{"trajectoryspecs", "[", RowBox[{"[", RowBox[{"k", ",", "5"}], "]"}], "]"}], "[", RowBox[{"[", "j", "]"}], "]"}], ",", "arrowheadpos", ",", "3"}], "]"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"trajectoryspecs", "[", RowBox[{"[", RowBox[{"k", ",", "5"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{ RowBox[{"Dimensions", "[", "trajectoryspecs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], "]"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.4747544483459153`*^9, 3.4747545032604313`*^9}, { 3.474754537139147*^9, 3.474754595633257*^9}, {3.474915436257621*^9, 3.4749154421260595`*^9}, {3.4817566037142944`*^9, 3.481756632025003*^9}, { 3.4818175248105197`*^9, 3.4818175258520174`*^9}, {3.484421050737229*^9, 3.4844210556142416`*^9}, {3.484421129850989*^9, 3.484421193302227*^9}, { 3.484421250204048*^9, 3.484421268510371*^9}, {3.4844213848476562`*^9, 3.4844213992583776`*^9}, {3.484421503658498*^9, 3.484421505571248*^9}, { 3.4844215708350925`*^9, 3.4844215898824816`*^9}, {3.4844216922296495`*^9, 3.484421693291176*^9}, {3.4844224694572477`*^9, 3.4844224858107634`*^9}, 3.4844225185878944`*^9, {3.48442255763404*^9, 3.4844226360568066`*^9}, { 3.484422676234579*^9, 3.4844226782274446`*^9}, {3.484676740882244*^9, 3.484676742454505*^9}, 3.4846776463041773`*^9, {3.4886362110952525`*^9, 3.4886362112755117`*^9}, {3.492695915540666*^9, 3.49269591655212*^9}, { 3.4926959512620306`*^9, 3.4926959532248535`*^9}, {3.4926962062835045`*^9, 3.4926962348746166`*^9}, {3.5079830205022883`*^9, 3.5079830366354866`*^9}, {3.5079833650527277`*^9, 3.5079833670055356`*^9}, {3.5079841503369107`*^9, 3.5079841654987125`*^9}, {3.5079841965533667`*^9, 3.507984254837175*^9}, { 3.5192033940264263`*^9, 3.519203447679495*^9}, {3.5192045617522163`*^9, 3.519204562272246*^9}, {3.5192047352131376`*^9, 3.5192048773002644`*^9}, { 3.5192049999292784`*^9, 3.519205040082575*^9}, {3.51928931006427*^9, 3.5192893114753504`*^9}, {3.51929168450508*^9, 3.5192916941646323`*^9}, { 3.540036021631808*^9, 3.5400360352870417`*^9}, {3.540036193072578*^9, 3.540036236575102*^9}, {3.5400584141803885`*^9, 3.5400584200857267`*^9}, { 3.5400591553550415`*^9, 3.540059187195863*^9}, {3.540059340043605*^9, 3.5400593462209587`*^9}, 3.5400610101611304`*^9, {3.540068002878091*^9, 3.540068013816716*^9}, {3.540068058651281*^9, 3.5400680686608534`*^9}, { 3.5586451578093014`*^9, 3.5586451953924513`*^9}, {3.564999375122596*^9, 3.564999375768309*^9}, 3.569582133857538*^9, {3.569637616031397*^9, 3.56963761688452*^9}, 3.571990885067398*^9, {3.580472967105275*^9, 3.580472986866408*^9}, {3.580473033714207*^9, 3.580473035172483*^9}, 3.580477166241942*^9}, ImageRegion->{{0, 1}, {0, 1}}, CellTags->{"corecell", "differentacrossnotebooks"}], Cell[BoxData[{ RowBox[{ RowBox[{"invertarrows", "=", "0"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"invertarrows", "==", "1"}], ",", RowBox[{"auxrelarrowstart", "=", RowBox[{ RowBox[{"-", "1"}], "*", "relarrowstart"}]}], ",", RowBox[{"auxrelarrowstart", "=", "relarrowstart"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"cTrajAr", "=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", "customtrajectoryspecs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", "0"}], ",", "\[IndentingNewLine]", RowBox[{"Graphics3D", "[", RowBox[{"{", "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Graphics3D", "[", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"customtrajectoryspecs", "[", RowBox[{"[", RowBox[{"k", ",", "4"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "\[NotEqual]", " ", "0"}], ",", RowBox[{ RowBox[{"Join", "[", RowBox[{ RowBox[{"Select", "[", RowBox[{ RowBox[{"customtrajectoryspecs", "[", RowBox[{"[", RowBox[{"k", ",", "4"}], "]"}], "]"}], ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"MatchQ", "[", RowBox[{"#1", ",", RowBox[{"Hue", "[", "__", "]"}]}], "]"}], " ", "||", RowBox[{"MatchQ", "[", RowBox[{"#1", ",", RowBox[{"GrayLevel", "[", "__", "]"}]}], "]"}], "||", RowBox[{"MatchQ", "[", RowBox[{"#1", ",", RowBox[{"RGBColor", "[", "__", "]"}]}], "]"}], "||", RowBox[{"MatchQ", "[", RowBox[{"#1", ",", RowBox[{"CMYKColor", "[", "__", "]"}]}], "]"}]}], ")"}], "&"}]}], "]"}], ",", RowBox[{"{", RowBox[{"GrayLevel", "[", "0", "]"}], "}"}]}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"GrayLevel", "[", "0", "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"customtrajectoryspecs", "[", RowBox[{"[", RowBox[{"k", ",", "4"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "\[NotEqual]", " ", "0"}], ",", " ", RowBox[{ RowBox[{"Join", "[", RowBox[{ RowBox[{"Select", "[", RowBox[{ RowBox[{"customtrajectoryspecs", "[", RowBox[{"[", RowBox[{"k", ",", "4"}], "]"}], "]"}], ",", RowBox[{ RowBox[{"(", RowBox[{"MatchQ", "[", RowBox[{"#1", ",", RowBox[{"Opacity", "[", "__", "]"}]}], "]"}], ")"}], "&"}]}], "]"}], ",", RowBox[{"{", RowBox[{"Opacity", "[", "1", "]"}], "}"}]}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"Opacity", "[", "1", "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"arrowHead3D", "[", RowBox[{ RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"Evaluate", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"simplexToPlane", "[", RowBox[{"X", "[", RowBox[{ RowBox[{"customtrajectoryspecs", "[", RowBox[{"[", RowBox[{"k", ",", "5", ",", "j"}], "]"}], "]"}], "*", RowBox[{"(", RowBox[{"1", "-", "auxrelarrowstart"}], ")"}]}], "]"}], "]"}], "/.", "\[InvisibleSpace]", RowBox[{"ctrajSol", "[", RowBox[{"[", "k", "]"}], "]"}]}], "]"}], "]"}], ",", RowBox[{"Flatten", "[", RowBox[{"Evaluate", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"simplexToPlane", "[", RowBox[{"X", "[", RowBox[{"customtrajectoryspecs", "[", RowBox[{"[", RowBox[{"k", ",", "5", ",", "j"}], "]"}], "]"}], "]"}], "]"}], "/.", "\[InvisibleSpace]", RowBox[{"ctrajSol", "[", RowBox[{"[", "k", "]"}], "]"}]}], "]"}], "]"}]}], "\[IndentingNewLine]", "}"}], ",", RowBox[{"customtrajectoryspecs", "[", RowBox[{"[", RowBox[{"k", ",", "6", ",", "j"}], "]"}], "]"}], ",", "arrowheadpos", ",", "3"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"customtrajectoryspecs", "[", RowBox[{"[", RowBox[{"k", ",", "6"}], "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{ RowBox[{"Dimensions", "[", "customtrajectoryspecs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], "]"}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.4747546288810654`*^9, 3.4747546425607357`*^9}, { 3.4747547001635647`*^9, 3.474754732680321*^9}, {3.474915464998949*^9, 3.4749154724897203`*^9}, {3.481756641438539*^9, 3.4817566484085617`*^9}, { 3.481758555570926*^9, 3.4817585603878527`*^9}, {3.4818175266832123`*^9, 3.481817527404249*^9}, {3.4841958368035364`*^9, 3.4841958441841493`*^9}, { 3.4841961363442545`*^9, 3.4841961709039493`*^9}, {3.484196668088866*^9, 3.484196668809903*^9}, 3.4841967373684855`*^9, {3.484422538075917*^9, 3.4844225490617137`*^9}, {3.4844226453701982`*^9, 3.4844226559754477`*^9}, {3.484422687500779*^9, 3.4844226922375903`*^9}, { 3.4926928793449926`*^9, 3.4926928893393636`*^9}, {3.4926959178940496`*^9, 3.49269592014729*^9}, {3.4926959545267253`*^9, 3.49269595578854*^9}, { 3.5079830373565235`*^9, 3.507983054481148*^9}, {3.507983367260903*^9, 3.507983369964791*^9}, {3.507984280123535*^9, 3.50798431124829*^9}, { 3.5079843423430023`*^9, 3.5079843529983234`*^9}, 3.519204394046624*^9, { 3.5192045649664*^9, 3.5192045655524335`*^9}, {3.519205078418768*^9, 3.5192051534800615`*^9}, {3.519289343868203*^9, 3.519289344636247*^9}, 3.5192917160558844`*^9, {3.540036037234289*^9, 3.540036043421075*^9}, { 3.5400362572152233`*^9, 3.540036286097891*^9}, {3.5400584295882697`*^9, 3.5400584399708633`*^9}, {3.5400591385540805`*^9, 3.540059143248349*^9}, { 3.540059196472393*^9, 3.5400592028597584`*^9}, {3.5400593542664185`*^9, 3.5400593593377085`*^9}, 3.540061010816168*^9, {3.540068026361434*^9, 3.5400680324387817`*^9}, {3.558645217271703*^9, 3.558645233255617*^9}, { 3.564999376423493*^9, 3.564999377025987*^9}, 3.569582073583145*^9, { 3.569637597674498*^9, 3.569637599126231*^9}, {3.571990812091723*^9, 3.571990834632114*^9}, 3.580473014928658*^9, {3.580477149073786*^9, 3.580477160085361*^9}}, CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Generating the output notebook", "Section", CellTags->"corecell"], Cell[CellGroupData[{ Cell["Redirection", "Text", CellChangeTimes->{{3.519293386924453*^9, 3.519293396552004*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"OutputToOneNotebook", "=", "0"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"OutputClearNotebook", "=", "1"}], ";"}]}], "Input", CellChangeTimes->{{3.4819270007532053`*^9, 3.4819270530183587`*^9}, 3.481927590451149*^9, 3.4819278444263477`*^9, 3.4819282299507046`*^9, 3.4819286333107076`*^9, 3.488578830716974*^9, {3.488578960313324*^9, 3.4885789607239146`*^9}, {3.4885790378247805`*^9, 3.4885790387160616`*^9}, 3.4885794410846395`*^9, 3.513619302965243*^9, {3.513619365443816*^9, 3.513619379921644*^9}, {3.5159601858828783`*^9, 3.515960208399166*^9}, 3.5400322337818117`*^9}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"$VersionNumber", "\[Equal]", "8"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"j", ",", "flag", ",", "str"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"flag", "=", "True"}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "<=", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"ScheduledTasks", "[", "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"str", "=", RowBox[{"ToString", "[", RowBox[{ RowBox[{"ScheduledTasks", "[", "]"}], "[", RowBox[{"[", RowBox[{"j", ",", "2"}], "]"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"StringTake", "[", RowBox[{"str", ",", RowBox[{"Min", "[", RowBox[{"11", ",", RowBox[{"StringLength", "[", "str", "]"}]}], "]"}]}], "]"}], "==", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"flag", "=", "False"}], ";", "\[IndentingNewLine]", RowBox[{"Break", "[", "]"}]}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{"flag", ",", RowBox[{"RunScheduledTask", "[", "\[IndentingNewLine]", RowBox[{"dynamotask", ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"CurrentValue", "[", RowBox[{ RowBox[{ RowBox[{"Notebooks", "[", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], ",", "\"\\""}], "]"}], "!=", "\"\\""}], ",", " ", "..."}], "]"}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{"Quiet", "[", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"nb", ",", "name"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"nb", "=", RowBox[{"SelectedNotebook", "[", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"name", "=", RowBox[{"CurrentValue", "[", RowBox[{"nb", ",", "\"\\""}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"ToString", "[", "name", "]"}], "!=", "\"\<$Failed\>\""}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"And", "[", RowBox[{ RowBox[{"Or", "[", RowBox[{ RowBox[{ RowBox[{"StringTake", "[", RowBox[{"name", ",", RowBox[{"Min", "[", RowBox[{"13", ",", RowBox[{"StringLength", "[", "name", "]"}]}], "]"}]}], "]"}], "!=", "\"\\""}], ",", RowBox[{ RowBox[{"StringTake", "[", RowBox[{"name", ",", RowBox[{"-", RowBox[{"Min", "[", RowBox[{"3", ",", RowBox[{"StringLength", "[", "name", "]"}]}], "]"}]}]}], "]"}], "==", "\"\<.nb\>\""}]}], "]"}], ",", RowBox[{ RowBox[{"ToString", "[", RowBox[{ RowBox[{"Options", "[", RowBox[{"nb", ",", "WindowTitle"}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "2"}], "]"}], "]"}], "]"}], "\[NotEqual]", "\"\\""}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"SetOptions", "[", RowBox[{"nb", ",", RowBox[{"WindowTitle", "->", "Automatic"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"NotebookSave", "[", "nb", "]"}], ";"}], "*)"}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], "]"}], ";"}], "\[IndentingNewLine]", "]"}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{ "With", " ", "the", " ", "technology", " ", "to", " ", "keep", " ", "track", " ", "of", " ", "all", " ", "the", " ", "dynamo_notebooks", " ", "the", " ", "following", " ", "should", " ", "be", " ", "rewritten"}], ";", " ", RowBox[{"only", " ", "v8", " ", "and", " ", RowBox[{"above", ".", " ", "The"}], " ", "use", " ", "of", " ", RowBox[{"Notebooks", "[", "]"}], " ", "crashes", " ", "mathematica", " ", "when", " ", "saving", " ", "figures", " ", "who", " ", "knows", " ", RowBox[{"why", "."}]}]}], " ", "*)"}]}]}], "Input", CellChangeTimes->{ 3.4744628258336067`*^9, 3.474464139362368*^9, {3.4744670890838594`*^9, 3.474467110013955*^9}, {3.4744688011456833`*^9, 3.474468802697915*^9}, { 3.4749407895967093`*^9, 3.4749407915894203`*^9}, {3.481850396037259*^9, 3.4818504258401136`*^9}, {3.481850492976651*^9, 3.481850504062592*^9}, { 3.4818505494778957`*^9, 3.481850629563053*^9}, {3.481850876468085*^9, 3.48185090267577*^9}, {3.481852369224563*^9, 3.481852415130573*^9}, { 3.4818524479077044`*^9, 3.4818524680266333`*^9}, {3.4818525094061346`*^9, 3.4818525146336513`*^9}, {3.4818525834225645`*^9, 3.481852588289563*^9}, { 3.4818905060400004`*^9, 3.481890511207431*^9}, {3.4818907547476244`*^9, 3.481890769178375*^9}, {3.481890965610831*^9, 3.481890977007218*^9}, { 3.481891014891693*^9, 3.48189106793797*^9}, {3.48189119086473*^9, 3.4818912201468353`*^9}, {3.48189171696122*^9, 3.4818917858803205`*^9}, { 3.4819128855365205`*^9, 3.4819130159840946`*^9}, {3.481913126803445*^9, 3.4819131405031443`*^9}, {3.4819133713350644`*^9, 3.481913385875973*^9}, { 3.4819134240708947`*^9, 3.481913424731845*^9}, {3.4819271026797686`*^9, 3.48192712819646*^9}, {3.481927226898386*^9, 3.4819272350200644`*^9}, 3.481927268638405*^9, {3.481927312601621*^9, 3.4819273452786083`*^9}, { 3.481927414508156*^9, 3.4819274840281205`*^9}, {3.481927515132847*^9, 3.481927592544159*^9}, 3.481927701831306*^9, 3.481927802245695*^9, { 3.481927877503911*^9, 3.481927887378109*^9}, {3.481928180058964*^9, 3.481928198886036*^9}, 3.482102927436123*^9, 3.488577291533737*^9, { 3.488578471770835*^9, 3.4885784907481227`*^9}, {3.4885785249773417`*^9, 3.488578668283406*^9}, {3.4885787265071273`*^9, 3.488578791640785*^9}, 3.4885788684111757`*^9, {3.4885790329477673`*^9, 3.488579034670244*^9}, { 3.488579181170902*^9, 3.4885792208980265`*^9}, {3.4887166422958193`*^9, 3.488716710493883*^9}, {3.48871675002072*^9, 3.4887169524217587`*^9}, { 3.4887170168243647`*^9, 3.4887170803156605`*^9}, {3.4887176029471684`*^9, 3.488717793921776*^9}, {3.4887179412636433`*^9, 3.488717952599944*^9}, 3.4919096715747457`*^9, 3.491911804702297*^9, {3.492206707387201*^9, 3.4922067082484393`*^9}, 3.4922070187749543`*^9, {3.493292099055402*^9, 3.4932921103516445`*^9}, {3.4932921819846478`*^9, 3.493292182936016*^9}, { 3.493292331229251*^9, 3.493292334013254*^9}, {3.4932924788515215`*^9, 3.4932925167560253`*^9}, {3.4932925506247263`*^9, 3.493292589400483*^9}, { 3.493292633533944*^9, 3.493292656396819*^9}, {3.493292695603195*^9, 3.4932927427610044`*^9}, {3.4932927988616734`*^9, 3.493292908559411*^9}, { 3.493292985119499*^9, 3.493293027850944*^9}, {3.4932931051320686`*^9, 3.493293263029114*^9}, {3.4932933341714115`*^9, 3.493293501411891*^9}, { 3.4932936199423294`*^9, 3.4932936281541376`*^9}, {3.493293681020155*^9, 3.4932937166213474`*^9}, {3.5134506501871157`*^9, 3.51345066547599*^9}, { 3.513619443890303*^9, 3.513619462332358*^9}, {3.513619503475711*^9, 3.5136195095140567`*^9}, {3.513619585230387*^9, 3.5136195903876824`*^9}, 3.5136198710437346`*^9, {3.5136200334760256`*^9, 3.51362004911592*^9}, { 3.5136201303015633`*^9, 3.5136201526408415`*^9}, 3.5136202407418804`*^9, { 3.5136207304318895`*^9, 3.5136207741163874`*^9}, {3.513620827627448*^9, 3.5136208493186893`*^9}, 3.515960259470087*^9, 3.5192125129840007`*^9, { 3.534877203063891*^9, 3.534877212039724*^9}, {3.534877442005128*^9, 3.534877444294795*^9}, {3.534882576077549*^9, 3.534882585418604*^9}, { 3.534882641837071*^9, 3.534882721421357*^9}, {3.534882892905429*^9, 3.534882937562893*^9}, {3.534883102417454*^9, 3.5348831647559*^9}, { 3.534883232511087*^9, 3.534883238994903*^9}, {3.534883304176552*^9, 3.53488337778108*^9}, {3.534883571215105*^9, 3.534883576340143*^9}, { 3.534883642015004*^9, 3.534883718819896*^9}, {3.534883879507542*^9, 3.534883892605078*^9}, {3.534883949032186*^9, 3.534883974271927*^9}, { 3.534884245526599*^9, 3.534884246177126*^9}, {3.534890502856115*^9, 3.534890525364187*^9}, {3.534890747705965*^9, 3.534890748311044*^9}, { 3.534891083538096*^9, 3.534891097421664*^9}, {3.534891236637099*^9, 3.534891302545374*^9}, {3.53489139160912*^9, 3.534891392685655*^9}, { 3.534891440637543*^9, 3.534891587376244*^9}, {3.534891719030115*^9, 3.534891777505655*^9}, {3.534891811852268*^9, 3.534891938828646*^9}, { 3.534892002663717*^9, 3.534892059795539*^9}, {3.535194716728555*^9, 3.535194749728377*^9}, {3.535194916997455*^9, 3.535194948429304*^9}, { 3.535195142636111*^9, 3.535195145675747*^9}, {3.535195247734684*^9, 3.535195252727247*^9}, {3.53519550849198*^9, 3.535195530669729*^9}, { 3.535195570115893*^9, 3.535195571454197*^9}, {3.535195735877003*^9, 3.535195742461371*^9}, {3.535195773990878*^9, 3.535195775503743*^9}, { 3.535195872354998*^9, 3.535195873093282*^9}, {3.535196003449821*^9, 3.535196019543781*^9}, {3.535196094093035*^9, 3.535196116719279*^9}, { 3.535196204031754*^9, 3.535196271448115*^9}, {3.535196316990155*^9, 3.535196332253896*^9}, {3.53519641162841*^9, 3.535196417375656*^9}, { 3.535196685814177*^9, 3.535196735320065*^9}, {3.535196824014973*^9, 3.535196879945483*^9}, {3.535197038780751*^9, 3.535197211042725*^9}, { 3.53519763548899*^9, 3.535197732148759*^9}, {3.53519776215084*^9, 3.535197763410854*^9}, {3.535197877944032*^9, 3.535197977582992*^9}, { 3.535198015305199*^9, 3.535198119041687*^9}, {3.535198152919574*^9, 3.53519822118637*^9}, {3.535198262415356*^9, 3.535198356967782*^9}, { 3.53519848992645*^9, 3.535198494810415*^9}, {3.535198572657414*^9, 3.53519857660383*^9}, {3.535198653207776*^9, 3.535198664117836*^9}, { 3.535198718269121*^9, 3.535198759997529*^9}, {3.535198835344086*^9, 3.535198849199196*^9}, {3.535198895228369*^9, 3.535198895620291*^9}, 3.53519895267718*^9, {3.535199087859097*^9, 3.535199112954699*^9}, { 3.535199202771707*^9, 3.535199207387837*^9}, {3.535200383657942*^9, 3.535200421570152*^9}, {3.535200477394101*^9, 3.535200562911352*^9}, { 3.535200748642593*^9, 3.535200901602166*^9}, {3.535202915457114*^9, 3.535202948036654*^9}, {3.535208083509515*^9, 3.535208096028963*^9}, { 3.535208514737791*^9, 3.535208525792168*^9}, {3.53520862868647*^9, 3.535208641923977*^9}, {3.535208674167192*^9, 3.535208675764962*^9}, { 3.535302162994192*^9, 3.53530224569201*^9}, {3.535302289291187*^9, 3.535302289833243*^9}, {3.535302422363998*^9, 3.535302427040458*^9}, { 3.535302556435537*^9, 3.535302556843267*^9}, {3.535302701746615*^9, 3.535302712002741*^9}, {3.5396221992587805`*^9, 3.539622206169593*^9}, { 3.539622262626092*^9, 3.539622265590097*^9}, {3.539626849813619*^9, 3.539626855615736*^9}, {3.5396388473876667`*^9, 3.5396388503004274`*^9}, { 3.539639012538885*^9, 3.539639029656252*^9}, {3.5396396754976063`*^9, 3.539639685276086*^9}, {3.5396397404879427`*^9, 3.539639743876923*^9}, { 3.5396397996600103`*^9, 3.539639832948827*^9}, {3.53963995704625*^9, 3.539639976250066*^9}, {3.53964157700106*^9, 3.539641588280031*^9}, { 3.5396416579955626`*^9, 3.5396419357199707`*^9}, {3.539642309743785*^9, 3.5396423099797983`*^9}, {3.539724436468506*^9, 3.5397244462462473`*^9}, 3.5397247242255464`*^9, {3.539724781935875*^9, 3.5397247824134355`*^9}, { 3.539724829891464*^9, 3.5397248356476955`*^9}, {3.5397262743598886`*^9, 3.539726362691605*^9}, {3.5397268130132885`*^9, 3.539726978191264*^9}, { 3.5397271356702614`*^9, 3.539727136708893*^9}, {3.5399709505474215`*^9, 3.5399710306950054`*^9}, {3.539971428676769*^9, 3.5399714552452884`*^9}, { 3.5399720328833275`*^9, 3.5399720358924994`*^9}, {3.539972105522482*^9, 3.5399721286768064`*^9}, {3.5399726360658274`*^9, 3.5399726758191013`*^9}, {3.5399728222164745`*^9, 3.539972885918118*^9}, { 3.5400695880411987`*^9, 3.5400696328233852`*^9}, {3.540212349470435*^9, 3.540212401250454*^9}, {3.5402132082534246`*^9, 3.540213211842168*^9}, { 3.540214941593575*^9, 3.540214951940196*^9}, {3.540218762155703*^9, 3.5402187638035994`*^9}, {3.5402188563957663`*^9, 3.5402188601863203`*^9}, {3.540218988109654*^9, 3.5402189970384827`*^9}, { 3.540219031101911*^9, 3.540219043437808*^9}, {3.5402190792184477`*^9, 3.5402190810177517`*^9}, 3.566816026468449*^9, {3.566817122194599*^9, 3.566817131366986*^9}, {3.566817353169292*^9, 3.566817356704487*^9}, { 3.566817797030224*^9, 3.566817805269693*^9}, {3.5668190375407*^9, 3.566819041238951*^9}, {3.566819185052538*^9, 3.566819186862085*^9}, { 3.56681957438486*^9, 3.566819606188912*^9}, {3.566820465066762*^9, 3.566820465316976*^9}, {3.566820655198971*^9, 3.566820658163562*^9}, { 3.566820824081942*^9, 3.566820829919006*^9}, {3.566820977337488*^9, 3.56682097869982*^9}, {3.566835964608947*^9, 3.566835967381326*^9}, { 3.566836015565601*^9, 3.566836021717571*^9}}, CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{"(*", RowBox[{ RowBox[{ RowBox[{"--", RowBox[{"--", RowBox[{"--", RowBox[{"--", RowBox[{"--", "Redirecting"}]}]}]}]}], " ", "output", " ", "to", " ", "a", " ", "new", " ", RowBox[{ RowBox[{ RowBox[{"notebook", "--"}], "--"}], "--"}]}], "-"}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Which", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Notebooks", "[", "\"\\"", "]"}], "==", RowBox[{"{", "}"}]}], " ", "&&", " ", RowBox[{"OutputToOneNotebook", "==", "1"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"$nb", "=", RowBox[{"CreateWindow", "[", RowBox[{ RowBox[{"WindowSize", "\[Rule]", " ", RowBox[{"{", RowBox[{"650", ",", "550"}], "}"}]}], ",", " ", RowBox[{"WindowTitle", "->", "\"\\""}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"SetOptions", "[", RowBox[{"$nb", ",", RowBox[{"WindowTitle", "->", RowBox[{"Dynamic", "[", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"ToString", "[", RowBox[{"Quiet", "[", RowBox[{"NotebookFileName", "[", "$nb", "]"}], "]"}], "]"}], "!=", "\"\<$Failed\>\""}], ",", "Automatic", ",", "\"\\""}], "]"}], "]"}]}]}], "]"}], ";"}], "\[IndentingNewLine]", "*)"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Not", "[", RowBox[{ RowBox[{"Notebooks", "[", "\"\\"", "]"}], "==", RowBox[{"{", "}"}]}], " ", "]"}], " ", "&&", " ", RowBox[{"OutputToOneNotebook", "==", "1"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"$nb", "=", RowBox[{ RowBox[{"Notebooks", "[", "\"\\"", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"SetSelectedNotebook", "[", "$nb", "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"OutputClearNotebook", "==", "1"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"FrontEndExecute", "[", RowBox[{"FrontEndToken", "[", "\"\\"", "]"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"NotebookDelete", "[", "$nb", "]"}], ";"}]}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"NotebookPut", "[", RowBox[{ RowBox[{"Notebook", "[", RowBox[{"{", "}"}], "]"}], ",", "$nb"}], "]"}], "*)"}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{"OutputToOneNotebook", "==", "0"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"SetNotebookCounter", "[", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "nb", ",", "NotebookCounter", ",", "notebook", ",", "namelength", ",", "tmpstring", ",", "tmpcounter"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"NotebookCounter", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"notebook", "=", "1"}], ",", RowBox[{"notebook", "<=", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"Notebooks", "[", "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", RowBox[{"notebook", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"nb", "=", RowBox[{ RowBox[{"Notebooks", "[", "]"}], "[", RowBox[{"[", "notebook", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"namelength", "=", RowBox[{"StringLength", "[", RowBox[{"CurrentValue", "[", RowBox[{"nb", ",", "\"\\""}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"namelength", ">", "14"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"tmpstring", "=", RowBox[{"StringTake", "[", RowBox[{ RowBox[{"CurrentValue", "[", RowBox[{"nb", ",", "\"\\""}], "]"}], ",", "14"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"tmpcounter", "=", RowBox[{"ToExpression", "[", RowBox[{"StringTake", "[", RowBox[{ RowBox[{"CurrentValue", "[", RowBox[{"nb", ",", "\"\\""}], "]"}], ",", RowBox[{"{", RowBox[{"15", ",", "namelength"}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"tmpcounter", " ", "=", RowBox[{"If", "[", RowBox[{ RowBox[{"IntegerQ", "[", "tmpcounter", "]"}], ",", "tmpcounter", ",", "0"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"Print", "[", RowBox[{"tmpstring", ",", "tmpcounter"}], "]"}], ";"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"If", "[", " ", RowBox[{ RowBox[{ RowBox[{"tmpstring", "==", "\"\\""}], " ", "&&", " ", RowBox[{"Not", "[", RowBox[{"tmpcounter", " ", "<=", "0"}], " ", "]"}], " ", "&&", " ", RowBox[{"tmpcounter", ">", "NotebookCounter"}]}], ",", RowBox[{"NotebookCounter", "=", "tmpcounter"}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"NotebookCounter", "++"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"NotebookCounter", "==", "2"}], " ", "&&", " ", RowBox[{ RowBox[{"Notebooks", "[", "\"\\"", "]"}], "==", RowBox[{"{", "}"}]}]}], ",", RowBox[{"NotebookCounter", "=", "1"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"(*", "\[IndentingNewLine]", RowBox[{ RowBox[{"While", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Not", "[", RowBox[{ RowBox[{"Notebooks", "[", RowBox[{"\"\\"", "~~", RowBox[{"ToString", "[", "NotebookCounter", "]"}]}], "]"}], "==", RowBox[{"{", "}"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"NotebookCounter", "=", RowBox[{"NotebookCounter", "+", "1"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", "*)"}], "\[IndentingNewLine]", "NotebookCounter"}]}], "\[IndentingNewLine]", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"$nb", "=", RowBox[{"CreateWindow", "[", RowBox[{ RowBox[{"WindowSize", "\[Rule]", " ", RowBox[{"{", RowBox[{"650", ",", "550"}], "}"}]}], ",", RowBox[{"WindowTitle", "->", RowBox[{"\"\\"", "~~", RowBox[{"ToString", "[", RowBox[{"SetNotebookCounter", "[", "]"}], "]"}]}]}]}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"$DisplayFunction", "=", RowBox[{ RowBox[{"NotebookWrite", "[", RowBox[{"$nb", ",", RowBox[{"Cell", "[", RowBox[{ RowBox[{"BoxData", "[", RowBox[{"MakeBoxes", "[", RowBox[{"#", ",", "StandardForm"}], "]"}], "]"}], ",", "\"\\""}], "]"}]}], "]"}], "&"}]}], " ", ";"}], "\[IndentingNewLine]", RowBox[{"(*", " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"$DisplayFunction", "=", RowBox[{ RowBox[{"NotebookWrite", "[", RowBox[{"$nb", ",", " ", RowBox[{"Cell", "[", RowBox[{ RowBox[{"GraphicsData", "[", RowBox[{"\"\\"", ",", " ", RowBox[{"ExportString", "[", RowBox[{"#", ",", "\"\\""}], "]"}]}], "]"}], ",", "\"\\""}], "]"}]}], "]"}], "&"}]}], " ", ";"}], "\[IndentingNewLine]", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"$Post", "=", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"#", "=!=", " ", "Null"}], ",", RowBox[{"NotebookWrite", "[", RowBox[{"$nb", ",", RowBox[{"Cell", "[", RowBox[{ RowBox[{"BoxData", "[", RowBox[{"MakeBoxes", "[", RowBox[{"#", ",", "StandardForm"}], "]"}], "]"}], ",", "\"\\""}], "]"}]}], "]"}]}], "]"}], "&"}]}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Unprotect", "[", "Print", "]"}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Print", "[", "x_", "]"}], " ", ":=", " ", RowBox[{"NotebookWrite", "[", RowBox[{"$nb", ",", RowBox[{"Cell", "[", RowBox[{"BoxData", "[", RowBox[{"MakeBoxes", "[", RowBox[{"x", ",", "StandardForm"}], "]"}], "]"}], "]"}]}], "]"}]}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Print", "[", "x__", "]"}], " ", ":=", RowBox[{"Map", "[", RowBox[{"Print", ",", RowBox[{"{", "x", "}"}]}], "]"}]}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Protect", "[", "Print", "]"}], " ", ";"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{ RowBox[{"--", RowBox[{"--", RowBox[{"--", RowBox[{"--", RowBox[{"--", RowBox[{"--", RowBox[{"--", RowBox[{"--", "Redirecting"}]}]}]}]}]}]}]}], " ", "code", " ", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"ends", "--"}], "--"}], "--"}], "--"}], "--"}]}], "-", RowBox[{"--", RowBox[{"--", "-"}]}]}], "*)"}]}]}]], "Input", CellChangeTimes->{ 3.4744628258336067`*^9, 3.474464139362368*^9, {3.4744670890838594`*^9, 3.474467110013955*^9}, {3.4744688011456833`*^9, 3.474468802697915*^9}, { 3.4749407895967093`*^9, 3.4749407915894203`*^9}, {3.481850396037259*^9, 3.4818504258401136`*^9}, {3.481850492976651*^9, 3.481850504062592*^9}, { 3.4818505494778957`*^9, 3.481850629563053*^9}, {3.481850876468085*^9, 3.48185090267577*^9}, {3.481852369224563*^9, 3.481852415130573*^9}, { 3.4818524479077044`*^9, 3.4818524680266333`*^9}, {3.4818525094061346`*^9, 3.4818525146336513`*^9}, {3.4818525834225645`*^9, 3.481852588289563*^9}, { 3.4818905060400004`*^9, 3.481890511207431*^9}, {3.4818907547476244`*^9, 3.481890769178375*^9}, {3.481890965610831*^9, 3.481890977007218*^9}, { 3.481891014891693*^9, 3.48189106793797*^9}, {3.48189119086473*^9, 3.4818912201468353`*^9}, {3.48189171696122*^9, 3.4818917858803205`*^9}, { 3.4819128855365205`*^9, 3.4819130159840946`*^9}, {3.481913126803445*^9, 3.4819131405031443`*^9}, {3.4819133713350644`*^9, 3.481913385875973*^9}, { 3.4819134240708947`*^9, 3.481913424731845*^9}, {3.4819271026797686`*^9, 3.48192712819646*^9}, {3.481927226898386*^9, 3.4819272350200644`*^9}, 3.481927268638405*^9, {3.481927312601621*^9, 3.4819273452786083`*^9}, { 3.481927414508156*^9, 3.4819274840281205`*^9}, {3.481927515132847*^9, 3.481927592544159*^9}, 3.481927701831306*^9, 3.481927802245695*^9, { 3.481927877503911*^9, 3.481927887378109*^9}, {3.481928180058964*^9, 3.481928198886036*^9}, 3.482102927436123*^9, 3.488577291533737*^9, { 3.488578471770835*^9, 3.4885784907481227`*^9}, {3.4885785249773417`*^9, 3.488578668283406*^9}, {3.4885787265071273`*^9, 3.488578791640785*^9}, 3.4885788684111757`*^9, {3.4885790329477673`*^9, 3.488579034670244*^9}, { 3.488579181170902*^9, 3.4885792208980265`*^9}, {3.4887166422958193`*^9, 3.488716710493883*^9}, {3.48871675002072*^9, 3.4887169524217587`*^9}, { 3.4887170168243647`*^9, 3.4887170803156605`*^9}, {3.4887176029471684`*^9, 3.488717793921776*^9}, {3.4887179412636433`*^9, 3.488717952599944*^9}, 3.4919096715747457`*^9, 3.491911804702297*^9, {3.492206707387201*^9, 3.4922067082484393`*^9}, 3.4922070187749543`*^9, {3.493292099055402*^9, 3.4932921103516445`*^9}, {3.4932921819846478`*^9, 3.493292182936016*^9}, { 3.493292331229251*^9, 3.493292334013254*^9}, {3.4932924788515215`*^9, 3.4932925167560253`*^9}, {3.4932925506247263`*^9, 3.493292589400483*^9}, { 3.493292633533944*^9, 3.493292656396819*^9}, {3.493292695603195*^9, 3.4932927427610044`*^9}, {3.4932927988616734`*^9, 3.493292908559411*^9}, { 3.493292985119499*^9, 3.493293027850944*^9}, {3.4932931051320686`*^9, 3.493293263029114*^9}, {3.4932933341714115`*^9, 3.493293501411891*^9}, { 3.4932936199423294`*^9, 3.4932936281541376`*^9}, {3.493293681020155*^9, 3.4932937166213474`*^9}, {3.5134506501871157`*^9, 3.51345066547599*^9}, { 3.513619443890303*^9, 3.513619462332358*^9}, {3.513619503475711*^9, 3.5136195095140567`*^9}, {3.513619585230387*^9, 3.5136195903876824`*^9}, 3.5136198710437346`*^9, {3.5136200334760256`*^9, 3.51362004911592*^9}, { 3.5136201303015633`*^9, 3.5136201526408415`*^9}, 3.5136202407418804`*^9, { 3.5136207304318895`*^9, 3.5136207741163874`*^9}, {3.513620827627448*^9, 3.5136208493186893`*^9}, 3.515960259470087*^9, 3.5192125129840007`*^9, { 3.534877203063891*^9, 3.534877212039724*^9}, {3.534877442005128*^9, 3.534877444294795*^9}, {3.534882576077549*^9, 3.534882585418604*^9}, { 3.534882641837071*^9, 3.534882721421357*^9}, {3.534882892905429*^9, 3.534882937562893*^9}, {3.534883102417454*^9, 3.5348831647559*^9}, { 3.534883232511087*^9, 3.534883238994903*^9}, {3.534883304176552*^9, 3.53488337778108*^9}, {3.534883571215105*^9, 3.534883576340143*^9}, { 3.534883642015004*^9, 3.534883718819896*^9}, {3.534883879507542*^9, 3.534883892605078*^9}, {3.534883949032186*^9, 3.534883974271927*^9}, { 3.534884245526599*^9, 3.534884246177126*^9}, {3.534890502856115*^9, 3.534890525364187*^9}, {3.534890747705965*^9, 3.534890748311044*^9}, { 3.534891083538096*^9, 3.534891097421664*^9}, {3.534891236637099*^9, 3.534891302545374*^9}, {3.53489139160912*^9, 3.534891392685655*^9}, { 3.534891440637543*^9, 3.534891587376244*^9}, {3.534891719030115*^9, 3.534891777505655*^9}, {3.534891811852268*^9, 3.534891938828646*^9}, { 3.534892002663717*^9, 3.534892059795539*^9}, {3.535194716728555*^9, 3.535194749728377*^9}, {3.535194916997455*^9, 3.535194948429304*^9}, { 3.535195142636111*^9, 3.535195145675747*^9}, {3.535195247734684*^9, 3.535195252727247*^9}, {3.53519550849198*^9, 3.535195530669729*^9}, { 3.535195570115893*^9, 3.535195571454197*^9}, {3.535195735877003*^9, 3.535195742461371*^9}, {3.535195773990878*^9, 3.535195775503743*^9}, { 3.535195872354998*^9, 3.535195873093282*^9}, {3.535196003449821*^9, 3.535196019543781*^9}, {3.535196094093035*^9, 3.535196116719279*^9}, { 3.535196204031754*^9, 3.535196271448115*^9}, {3.535196316990155*^9, 3.535196332253896*^9}, {3.53519641162841*^9, 3.535196417375656*^9}, { 3.535196685814177*^9, 3.535196735320065*^9}, {3.535196824014973*^9, 3.535196879945483*^9}, {3.535197038780751*^9, 3.535197211042725*^9}, { 3.53519763548899*^9, 3.535197732148759*^9}, {3.53519776215084*^9, 3.535197763410854*^9}, {3.535197877944032*^9, 3.535197977582992*^9}, { 3.535198015305199*^9, 3.535198119041687*^9}, {3.535198152919574*^9, 3.53519822118637*^9}, {3.535198262415356*^9, 3.535198356967782*^9}, { 3.53519848992645*^9, 3.535198494810415*^9}, {3.535198572657414*^9, 3.53519857660383*^9}, {3.535198653207776*^9, 3.535198664117836*^9}, { 3.535198718269121*^9, 3.535198759997529*^9}, {3.535198835344086*^9, 3.535198849199196*^9}, {3.535198895228369*^9, 3.535198895620291*^9}, 3.53519895267718*^9, {3.535199087859097*^9, 3.535199112954699*^9}, { 3.535199202771707*^9, 3.535199207387837*^9}, {3.535200383657942*^9, 3.535200421570152*^9}, {3.535200477394101*^9, 3.535200562911352*^9}, { 3.535200748642593*^9, 3.535200901602166*^9}, {3.535202915457114*^9, 3.535202948036654*^9}, {3.535208083509515*^9, 3.535208096028963*^9}, { 3.535208514737791*^9, 3.535208525792168*^9}, {3.53520862868647*^9, 3.535208641923977*^9}, {3.535208674167192*^9, 3.535208675764962*^9}, { 3.535302162994192*^9, 3.53530224569201*^9}, {3.535302289291187*^9, 3.535302289833243*^9}, {3.535302422363998*^9, 3.535302427040458*^9}, { 3.535302556435537*^9, 3.535302556843267*^9}, {3.535302701746615*^9, 3.535302712002741*^9}, {3.5396221992587805`*^9, 3.539622206169593*^9}, { 3.539622262626092*^9, 3.539622265590097*^9}, {3.539626849813619*^9, 3.539626855615736*^9}, {3.5396388473876667`*^9, 3.5396388503004274`*^9}, { 3.539639012538885*^9, 3.539639029656252*^9}, {3.5396396754976063`*^9, 3.539639685276086*^9}, {3.5396397404879427`*^9, 3.539639743876923*^9}, { 3.5396397996600103`*^9, 3.539639832948827*^9}, {3.53963995704625*^9, 3.539639976250066*^9}, {3.53964157700106*^9, 3.539641588280031*^9}, { 3.5396416579955626`*^9, 3.5396419357199707`*^9}, {3.539642309743785*^9, 3.5396423099797983`*^9}, {3.539724436468506*^9, 3.5397244462462473`*^9}, 3.5397247242255464`*^9, {3.539724781935875*^9, 3.5397247824134355`*^9}, { 3.539724829891464*^9, 3.5397248356476955`*^9}, {3.5397262743598886`*^9, 3.539726362691605*^9}, {3.5397268130132885`*^9, 3.539726978191264*^9}, { 3.5397271356702614`*^9, 3.539727136708893*^9}, {3.5399709505474215`*^9, 3.5399710306950054`*^9}, {3.539971428676769*^9, 3.5399714552452884`*^9}, { 3.5399720328833275`*^9, 3.5399720358924994`*^9}, {3.539972105522482*^9, 3.5399721286768064`*^9}, {3.5399726360658274`*^9, 3.5399726758191013`*^9}, {3.5399728222164745`*^9, 3.539972885918118*^9}, { 3.5400695880411987`*^9, 3.5400696328233852`*^9}, {3.540212349470435*^9, 3.540212401250454*^9}, {3.5402132082534246`*^9, 3.540213211842168*^9}, { 3.540214941593575*^9, 3.540214951940196*^9}, {3.540218762155703*^9, 3.5402187638035994`*^9}, {3.5402188563957663`*^9, 3.5402188601863203`*^9}, {3.540218988109654*^9, 3.5402189970384827`*^9}, { 3.540219034230105*^9, 3.540219077698072*^9}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{"SelectionMove", "[", RowBox[{"$nb", ",", "After", ",", "Notebook"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"NotebookWrite", "[", RowBox[{"$nb", ",", RowBox[{"Cell", "[", RowBox[{ RowBox[{"TextData", "[", "\"\\"", "]"}], ",", "\"\\"", ",", " ", RowBox[{"FontFamily", "->", "\"\\""}], ",", RowBox[{"FontColor", "\[Rule]", " ", RowBox[{"GrayLevel", "[", ".7", "]"}]}], ",", RowBox[{"Background", "\[Rule]", " ", RowBox[{"Hue", "[", RowBox[{ RowBox[{"RandomReal", "[", "]"}], ",", ".4"}], "]"}]}], ",", RowBox[{"TextAlignment", "\[Rule]", " ", "Center"}], ",", RowBox[{"CellFrame", "\[Rule]", " ", "False"}]}], "]"}]}], "]"}], " ", ";"}]}], "Input", CellChangeTimes->{{3.474918875798506*^9, 3.4749188776311407`*^9}, { 3.511177082574048*^9, 3.511177108876659*^9}, {3.511177337997253*^9, 3.5111773433881273`*^9}, {3.5111774000655003`*^9, 3.51117741257031*^9}, { 3.511177574540593*^9, 3.5111775811971292`*^9}, {3.5111776635531683`*^9, 3.511177700489028*^9}, 3.511177873820657*^9, {3.511177928407447*^9, 3.511177938870274*^9}, {3.5111779904665613`*^9, 3.511177994801902*^9}, { 3.511178028660982*^9, 3.5111780346115437`*^9}, {3.511178241249456*^9, 3.511178251540807*^9}, {3.5111783198532963`*^9, 3.511178361902246*^9}, { 3.511178405786429*^9, 3.51117840921915*^9}, {3.5111785934373198`*^9, 3.511178648471777*^9}, {3.511278428985016*^9, 3.5112784313406396`*^9}, { 3.515960147849703*^9, 3.5159601673408175`*^9}, 3.580473171065348*^9}, CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[CellGroupData[{ Cell["Text output - the game", "Text", CellTags->"corecell"], Cell[BoxData[ RowBox[{ RowBox[{"Print", "[", RowBox[{"Style", "[", RowBox[{ RowBox[{"DisplayForm", "[", RowBox[{"GridBox", "[", RowBox[{"{", RowBox[{ RowBox[{"{", "\"\<\>\"", "}"}], ",", RowBox[{"{", "\"\\"", "}"}]}], "}"}], "]"}], "]"}], ",", "\"\\""}], "]"}], "]"}], ";"}]], "Input", CellChangeTimes->{{3.4744652297202253`*^9, 3.4744652305013485`*^9}, 3.4744652739137726`*^9, {3.47446538996064*^9, 3.4744654114415283`*^9}, { 3.4744657681945133`*^9, 3.4744658496516433`*^9}, {3.474465912091427*^9, 3.4744659346037984`*^9}, {3.4744761436922846`*^9, 3.4744762944891195`*^9}, {3.474476361195038*^9, 3.474476407892185*^9}, { 3.474476518981924*^9, 3.474476528335374*^9}, {3.4744770460698395`*^9, 3.474477081831262*^9}, {3.474477217456281*^9, 3.4744772567227435`*^9}, { 3.474477311120964*^9, 3.4744773117518716`*^9}, 3.4744792889549503`*^9, { 3.474479577770246*^9, 3.474479630065443*^9}, {3.474479705734249*^9, 3.4744797091491594`*^9}, {3.474479746492857*^9, 3.474479838815611*^9}, { 3.4744799072840633`*^9, 3.474479933932382*^9}, {3.474479972587966*^9, 3.474480022910326*^9}, {3.474480076717697*^9, 3.474480078730592*^9}, { 3.4744801120985727`*^9, 3.4744802178806796`*^9}, {3.4744802661000156`*^9, 3.4744805247218957`*^9}, {3.4744805637780557`*^9, 3.474480644454062*^9}, { 3.4744806825187964`*^9, 3.474480733251747*^9}, {3.474480765978806*^9, 3.4744807751119385`*^9}, {3.4747484930067997`*^9, 3.4747484955204144`*^9}, {3.474748696409278*^9, 3.474748729687129*^9}, { 3.47474879334867*^9, 3.474748838373412*^9}, {3.4747488966872635`*^9, 3.4747489445060234`*^9}, {3.4747490727103724`*^9, 3.474749112627771*^9}, { 3.474749204740222*^9, 3.4747492219850187`*^9}, {3.4747493148385353`*^9, 3.474749315299198*^9}, {3.474918934412789*^9, 3.4749190461634784`*^9}, 3.4749191678083954`*^9, 3.4749217394963007`*^9, {3.4750252650253696`*^9, 3.4750252801471133`*^9}, {3.4818889226375294`*^9, 3.481888959170061*^9}, { 3.493148569432272*^9, 3.493148587287947*^9}, {3.493148638781992*^9, 3.4931486737723055`*^9}, {3.493182858068296*^9, 3.4931828662700896`*^9}, { 3.4931829768691235`*^9, 3.493182995195475*^9}, {3.493183791029829*^9, 3.4931838062917747`*^9}, {3.507464028658447*^9, 3.507464045883215*^9}, { 3.5074646586393824`*^9, 3.5074646690143013`*^9}, {3.5074647984655104`*^9, 3.507464824973627*^9}, {3.507464855815859*^9, 3.5074648669446816`*^9}, { 3.5074649468839936`*^9, 3.507464974954357*^9}, {3.507465012708645*^9, 3.507465021491274*^9}, {3.5074650544586782`*^9, 3.507465056661846*^9}, { 3.507465211794917*^9, 3.5074652407064896`*^9}, {3.507465753243617*^9, 3.5074657612351084`*^9}, {3.507981944622572*^9, 3.5079819517628393`*^9}, { 3.507985201453397*^9, 3.507985203661572*^9}, {3.5106650256092606`*^9, 3.510665131561612*^9}, 3.510665189635118*^9, {3.510665232116203*^9, 3.5106652480090556`*^9}, 3.510665359859889*^9, 3.5106655198499436`*^9, { 3.5106658176231885`*^9, 3.5106658409166827`*^9}, {3.5106658857010794`*^9, 3.510665966006553*^9}, {3.510666155218627*^9, 3.510666171582156*^9}, { 3.510924417999257*^9, 3.510924424245224*^9}, {3.510924938723393*^9, 3.510924960495397*^9}, {3.5109250222983513`*^9, 3.510925033297825*^9}, { 3.510941857623761*^9, 3.510941868739745*^9}, {3.5109435349816513`*^9, 3.5109435685399055`*^9}, {3.5110117542104177`*^9, 3.5110117551517715`*^9}, {3.511017927055215*^9, 3.5110179417758036`*^9}, { 3.5110179981949124`*^9, 3.5110182563981867`*^9}, {3.511018315981435*^9, 3.5110183219396935`*^9}, {3.5110403884457855`*^9, 3.511040393162568*^9}, { 3.5110418077417*^9, 3.5110418282912493`*^9}, {3.511045501275484*^9, 3.5110455078649597`*^9}, 3.5110931744738865`*^9, {3.511093288718162*^9, 3.5110933851368055`*^9}, {3.5110936952927876`*^9, 3.5110937174546547`*^9}, {3.51109577703052*^9, 3.5110957771866693`*^9}, { 3.511175839410593*^9, 3.51117593834101*^9}, {3.5111759712151737`*^9, 3.511175973263085*^9}, 3.511176027967751*^9, 3.539712534261118*^9, 3.569645548112671*^9, {3.569674320026764*^9, 3.569674320832268*^9}, 3.569687196516368*^9}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"FormatNumberSingle", "[", RowBox[{"x_", ",", RowBox[{"maxdenominator_:", "20"}], ",", RowBox[{"precision_:", "5"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"aux1", ",", "aux2"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"aux1", "=", RowBox[{"N", "[", RowBox[{"x", ",", "precision"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"aux2", "=", RowBox[{"Rationalize", "[", RowBox[{"aux1", ",", RowBox[{"10", "^", RowBox[{"(", RowBox[{"-", "precision"}], ")"}]}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Denominator", "[", "aux2", "]"}], ">", "maxdenominator"}], ",", "aux1", ",", "aux2"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"FormatNumber", "[", RowBox[{"x_", ",", RowBox[{"maxdenominator_:", "20"}], ",", RowBox[{"precision_:", "5"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"f", ",", "arg", ",", "d", ",", "aux"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"f", "[", "arg_", "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Depth", "[", "arg", "]"}], "\[Equal]", "1"}], ",", RowBox[{"FormatNumberSingle", "[", RowBox[{"arg", ",", "maxdenominator", ",", "precision"}], "]"}], ",", "arg"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"d", "=", RowBox[{"Depth", "[", "x", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"aux", "=", RowBox[{"Apart", "[", "x", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{"d", ">", "0"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"aux", "=", RowBox[{"Map", "[", RowBox[{"f", ",", "aux", ",", RowBox[{"{", "d", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"d", "--"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", "aux"}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"FormatState", "[", RowBox[{"x_", ",", RowBox[{"maxdenominator_:", "20"}], ",", RowBox[{"precision_:", "5"}]}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", "x", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "==", "1"}], ",", "\[IndentingNewLine]", RowBox[{"FormatNumber", "[", RowBox[{ RowBox[{"x", "[", RowBox[{"[", "1", "]"}], "]"}], ",", "maxdenominator", ",", "precision"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"FormatNumber", "[", RowBox[{"x", ",", "maxdenominator", ",", "precision"}], "]"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.4744652297202253`*^9, 3.4744652305013485`*^9}, 3.4744652739137726`*^9, {3.47446538996064*^9, 3.4744654114415283`*^9}, { 3.4744657681945133`*^9, 3.4744658496516433`*^9}, {3.474465912091427*^9, 3.4744659346037984`*^9}, {3.4744761436922846`*^9, 3.4744762944891195`*^9}, {3.474476361195038*^9, 3.474476407892185*^9}, { 3.474476518981924*^9, 3.474476528335374*^9}, {3.4744770460698395`*^9, 3.474477081831262*^9}, {3.474477217456281*^9, 3.4744772567227435`*^9}, { 3.474477311120964*^9, 3.4744773117518716`*^9}, 3.4744792889549503`*^9, { 3.474479577770246*^9, 3.474479630065443*^9}, {3.474479705734249*^9, 3.4744797091491594`*^9}, {3.474479746492857*^9, 3.474479838815611*^9}, { 3.4744799072840633`*^9, 3.474479933932382*^9}, {3.474479972587966*^9, 3.474480022910326*^9}, {3.474480076717697*^9, 3.474480078730592*^9}, { 3.4744801120985727`*^9, 3.4744802178806796`*^9}, {3.4744802661000156`*^9, 3.4744805247218957`*^9}, {3.4744805637780557`*^9, 3.474480644454062*^9}, { 3.4744806825187964`*^9, 3.474480733251747*^9}, {3.474480765978806*^9, 3.4744807751119385`*^9}, {3.4747484930067997`*^9, 3.4747484955204144`*^9}, {3.474748696409278*^9, 3.474748729687129*^9}, { 3.47474879334867*^9, 3.474748838373412*^9}, {3.4747488966872635`*^9, 3.4747489445060234`*^9}, {3.4747490727103724`*^9, 3.474749112627771*^9}, { 3.474749204740222*^9, 3.4747492219850187`*^9}, {3.4747493148385353`*^9, 3.474749315299198*^9}, {3.474918934412789*^9, 3.4749190461634784`*^9}, 3.4749191678083954`*^9, 3.4749217394963007`*^9, {3.4750252650253696`*^9, 3.4750252801471133`*^9}, {3.4818889226375294`*^9, 3.481888959170061*^9}, { 3.493148569432272*^9, 3.493148587287947*^9}, {3.493148638781992*^9, 3.4931486737723055`*^9}, {3.493182858068296*^9, 3.4931828662700896`*^9}, { 3.4931829768691235`*^9, 3.493182995195475*^9}, {3.493183791029829*^9, 3.4931838062917747`*^9}, {3.507464028658447*^9, 3.507464045883215*^9}, { 3.5074646586393824`*^9, 3.5074646690143013`*^9}, {3.5074647984655104`*^9, 3.507464824973627*^9}, {3.507464855815859*^9, 3.5074648669446816`*^9}, { 3.5074649468839936`*^9, 3.507464974954357*^9}, {3.507465012708645*^9, 3.507465021491274*^9}, {3.5074650544586782`*^9, 3.507465056661846*^9}, { 3.507465211794917*^9, 3.5074652407064896`*^9}, {3.507465753243617*^9, 3.5074657612351084`*^9}, {3.507981944622572*^9, 3.5079819517628393`*^9}, { 3.507985201453397*^9, 3.507985203661572*^9}, {3.5106650256092606`*^9, 3.510665131561612*^9}, 3.510665189635118*^9, {3.510665232116203*^9, 3.5106652480090556`*^9}, 3.510665359859889*^9, 3.5106655198499436`*^9, { 3.5106658176231885`*^9, 3.5106658409166827`*^9}, {3.5106658857010794`*^9, 3.510665966006553*^9}, {3.510666155218627*^9, 3.510666171582156*^9}, { 3.510924417999257*^9, 3.510924424245224*^9}, {3.510924938723393*^9, 3.510924960495397*^9}, {3.5109250222983513`*^9, 3.510925033297825*^9}, { 3.510941857623761*^9, 3.510941868739745*^9}, {3.5109435349816513`*^9, 3.5109435685399055`*^9}, {3.5110117542104177`*^9, 3.5110117551517715`*^9}, {3.511017927055215*^9, 3.5110179417758036`*^9}, { 3.5110179981949124`*^9, 3.5110182563981867`*^9}, {3.511018315981435*^9, 3.5110183219396935`*^9}, {3.5110403884457855`*^9, 3.511040393162568*^9}, { 3.5110418077417*^9, 3.5110418282912493`*^9}, {3.511045501275484*^9, 3.5110455078649597`*^9}, 3.5110931744738865`*^9, {3.511093288718162*^9, 3.5110933851368055`*^9}, {3.5110936952927876`*^9, 3.5110937174546547`*^9}, {3.51109577703052*^9, 3.5110957771866693`*^9}, { 3.511175839410593*^9, 3.51117593834101*^9}, {3.5111759712151737`*^9, 3.511175973263085*^9}, 3.511176027967751*^9, 3.539712534261118*^9, 3.569645548112671*^9, {3.569674320026764*^9, 3.569674320832268*^9}, 3.569687196516368*^9, {3.569699729329828*^9, 3.569699895935127*^9}, 3.569700076577663*^9, {3.578833575698833*^9, 3.578833588894507*^9}}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"gamekind", "==", "NormalGame"}], ",", RowBox[{"Print", "[", RowBox[{"Row", "[", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< Normal form game: \>\"", "}"}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"DisplayForm", "[", RowBox[{"GridBox", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"strategy", "[", "1", "]"}], "}"}], ",", RowBox[{"{", RowBox[{"strategy", "[", "2", "]"}], "}"}], ",", RowBox[{"{", RowBox[{"strategy", "[", "3", "]"}], "}"}], ",", RowBox[{"{", RowBox[{"strategy", "[", "4", "]"}], "}"}]}], "}"}], "]"}], "]"}], " ", ",", "\[IndentingNewLine]", RowBox[{"MatrixForm", "[", "A", "]"}]}], "}"}], "]"}], "\[IndentingNewLine]", "]"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{"Row", "[", RowBox[{"{", RowBox[{ RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< Payoff vector field: F\>\"", "}"}], "]"}], "]"}], ",", RowBox[{"MatrixForm", "[", RowBox[{"{", RowBox[{"w", ",", "x", ",", "y", ",", "z"}], "}"}], "]"}], ",", " ", RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< = \>\"", "}"}], "]"}], "]"}], ",", RowBox[{"MatrixForm", "[", RowBox[{"Flatten", "[", RowBox[{"F", "[", RowBox[{"{", RowBox[{"w", ",", "x", ",", "y", ",", "z"}], "}"}], "]"}], "]"}], "]"}]}], "}"}], "]"}], "]"}], " ", ";"}]}], "Input", CellChangeTimes->{{3.4744652297202253`*^9, 3.4744652305013485`*^9}, 3.4744652739137726`*^9, {3.47446538996064*^9, 3.4744654114415283`*^9}, { 3.4744657681945133`*^9, 3.4744658496516433`*^9}, {3.474465912091427*^9, 3.4744659346037984`*^9}, {3.4744761436922846`*^9, 3.4744762944891195`*^9}, {3.474476361195038*^9, 3.474476407892185*^9}, { 3.474476518981924*^9, 3.474476528335374*^9}, {3.4744770460698395`*^9, 3.474477081831262*^9}, {3.474477217456281*^9, 3.4744772567227435`*^9}, { 3.474477311120964*^9, 3.4744773117518716`*^9}, 3.4744792889549503`*^9, { 3.474479577770246*^9, 3.474479630065443*^9}, {3.474479705734249*^9, 3.4744797091491594`*^9}, {3.474479746492857*^9, 3.474479838815611*^9}, { 3.4744799072840633`*^9, 3.474479933932382*^9}, {3.474479972587966*^9, 3.474480022910326*^9}, {3.474480076717697*^9, 3.474480078730592*^9}, { 3.4744801120985727`*^9, 3.4744802178806796`*^9}, {3.4744802661000156`*^9, 3.4744805247218957`*^9}, {3.4744805637780557`*^9, 3.474480644454062*^9}, { 3.4744806825187964`*^9, 3.474480733251747*^9}, {3.474480765978806*^9, 3.4744807751119385`*^9}, {3.4747484930067997`*^9, 3.4747484955204144`*^9}, {3.474748696409278*^9, 3.474748729687129*^9}, { 3.47474879334867*^9, 3.474748838373412*^9}, {3.4747488966872635`*^9, 3.4747489445060234`*^9}, {3.4747490727103724`*^9, 3.474749112627771*^9}, { 3.474749204740222*^9, 3.4747492219850187`*^9}, {3.4747493148385353`*^9, 3.474749315299198*^9}, {3.474918934412789*^9, 3.4749190461634784`*^9}, 3.4749191678083954`*^9, 3.4749217394963007`*^9, {3.4750252650253696`*^9, 3.4750252801471133`*^9}, {3.4818889226375294`*^9, 3.481888959170061*^9}, { 3.493148569432272*^9, 3.493148587287947*^9}, {3.493148638781992*^9, 3.4931486737723055`*^9}, {3.493182858068296*^9, 3.4931828662700896`*^9}, { 3.4931829768691235`*^9, 3.493182995195475*^9}, {3.493183791029829*^9, 3.4931838062917747`*^9}, {3.507464028658447*^9, 3.507464045883215*^9}, { 3.5074646586393824`*^9, 3.5074646690143013`*^9}, {3.5074647984655104`*^9, 3.507464824973627*^9}, {3.507464855815859*^9, 3.5074648669446816`*^9}, { 3.5074649468839936`*^9, 3.507464974954357*^9}, {3.507465012708645*^9, 3.507465021491274*^9}, {3.5074650544586782`*^9, 3.507465056661846*^9}, { 3.507465211794917*^9, 3.5074652407064896`*^9}, {3.507465753243617*^9, 3.5074657612351084`*^9}, {3.507981944622572*^9, 3.5079819517628393`*^9}, { 3.507985201453397*^9, 3.507985203661572*^9}, {3.5106650256092606`*^9, 3.510665131561612*^9}, 3.510665189635118*^9, {3.510665232116203*^9, 3.5106652480090556`*^9}, 3.510665359859889*^9, 3.5106655198499436`*^9, { 3.5106658176231885`*^9, 3.5106658409166827`*^9}, {3.5106658857010794`*^9, 3.510665966006553*^9}, {3.510666155218627*^9, 3.510666171582156*^9}, { 3.510924417999257*^9, 3.510924424245224*^9}, {3.510924938723393*^9, 3.510924960495397*^9}, {3.5109250222983513`*^9, 3.510925033297825*^9}, { 3.510941857623761*^9, 3.510941868739745*^9}, {3.5109435349816513`*^9, 3.5109435685399055`*^9}, {3.5110117542104177`*^9, 3.5110117551517715`*^9}, {3.511017927055215*^9, 3.5110179417758036`*^9}, { 3.5110179981949124`*^9, 3.5110182563981867`*^9}, {3.511018315981435*^9, 3.5110183219396935`*^9}, {3.5110403884457855`*^9, 3.511040393162568*^9}, { 3.5110418077417*^9, 3.5110418282912493`*^9}, {3.511045501275484*^9, 3.5110455078649597`*^9}, 3.5110931744738865`*^9, {3.511093288718162*^9, 3.5110933851368055`*^9}, {3.5110936952927876`*^9, 3.5110937174546547`*^9}, {3.51109577703052*^9, 3.5110957771866693`*^9}, { 3.511175839410593*^9, 3.51117593834101*^9}, {3.5111759712151737`*^9, 3.511175973263085*^9}, 3.511176027967751*^9, 3.539712534261118*^9, 3.5397126052051263`*^9, {3.56964543839266*^9, 3.56964544231797*^9}, { 3.569671450731139*^9, 3.569671452632897*^9}, 3.571985401466716*^9, 3.580473240566928*^9, {3.580473343623561*^9, 3.580473344007842*^9}, { 3.580648600358225*^9, 3.580648601620962*^9}, 3.580651317511886*^9}, CellTags->{"corecell", "differentacrossnotebooks"}], Cell[BoxData[ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"findnashequilibria", "\[Equal]", "1"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", "NEa", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", "1"}], ",", RowBox[{"Print", "[", RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< Nash equilibrium:\>\"", "}"}], "]"}], "]"}], "]"}], ",", RowBox[{"Print", "[", RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< Nash equilibria:\>\"", "}"}], "]"}], "]"}], "]"}]}], "]"}], " ", ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{"Row", "[", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< \>\"", "}"}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"TableForm", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"MatrixForm", "[", RowBox[{"{", RowBox[{"FormatState", "[", RowBox[{ RowBox[{"NEa", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "maxdenominator"}], "]"}], "}"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "NEa", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], "]"}]}], "\[IndentingNewLine]", "}"}], "]"}], "]"}], "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"findESSs", "==", "1"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Which", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", "ESSs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "==", "0"}], ",", RowBox[{"Print", "[", RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< No regular ESSs found\>\"", "}"}], "]"}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", "ESSs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", "1"}], ",", RowBox[{"Print", "[", RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< Regular ESS:\>\"", "}"}], "]"}], "]"}], "]"}], ",", "\[IndentingNewLine]", "True", ",", RowBox[{"Print", "[", RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< Regular ESSs:\>\"", "}"}], "]"}], "]"}], "]"}]}], "\[IndentingNewLine]", "]"}], " ", ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", "ESSs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], ">", "0"}], ",", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Row", "[", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< \>\"", "}"}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"TableForm", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"MatrixForm", "[", RowBox[{"{", RowBox[{"FormatState", "[", RowBox[{ RowBox[{"ESSs", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "maxdenominator"}], "]"}], "}"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "ESSs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], "]"}]}], "\[IndentingNewLine]", "}"}], "]"}], "]"}]}], "\[IndentingNewLine]", "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]], "Input", CellChangeTimes->{{3.4744652297202253`*^9, 3.4744652305013485`*^9}, 3.4744652739137726`*^9, {3.47446538996064*^9, 3.4744654114415283`*^9}, { 3.4744657681945133`*^9, 3.4744658496516433`*^9}, {3.474465912091427*^9, 3.4744659346037984`*^9}, {3.4744761436922846`*^9, 3.4744762944891195`*^9}, {3.474476361195038*^9, 3.474476407892185*^9}, { 3.474476518981924*^9, 3.474476528335374*^9}, {3.4744770460698395`*^9, 3.474477081831262*^9}, {3.474477217456281*^9, 3.4744772567227435`*^9}, { 3.474477311120964*^9, 3.4744773117518716`*^9}, 3.4744792889549503`*^9, { 3.474479577770246*^9, 3.474479630065443*^9}, {3.474479705734249*^9, 3.4744797091491594`*^9}, {3.474479746492857*^9, 3.474479838815611*^9}, { 3.4744799072840633`*^9, 3.474479933932382*^9}, {3.474479972587966*^9, 3.474480022910326*^9}, {3.474480076717697*^9, 3.474480078730592*^9}, { 3.4744801120985727`*^9, 3.4744802178806796`*^9}, {3.4744802661000156`*^9, 3.4744805247218957`*^9}, {3.4744805637780557`*^9, 3.474480644454062*^9}, { 3.4744806825187964`*^9, 3.474480733251747*^9}, {3.474480765978806*^9, 3.4744807751119385`*^9}, {3.4747484930067997`*^9, 3.4747484955204144`*^9}, {3.474748696409278*^9, 3.474748729687129*^9}, { 3.47474879334867*^9, 3.474748838373412*^9}, {3.4747488966872635`*^9, 3.4747489445060234`*^9}, {3.4747490727103724`*^9, 3.474749112627771*^9}, { 3.474749204740222*^9, 3.4747492219850187`*^9}, {3.4747493148385353`*^9, 3.474749315299198*^9}, {3.474918934412789*^9, 3.4749190461634784`*^9}, 3.4749191678083954`*^9, 3.4749217394963007`*^9, {3.4750252650253696`*^9, 3.4750252801471133`*^9}, {3.4818889226375294`*^9, 3.481888959170061*^9}, { 3.493148569432272*^9, 3.493148587287947*^9}, {3.493148638781992*^9, 3.4931486737723055`*^9}, {3.493182858068296*^9, 3.4931828662700896`*^9}, { 3.4931829768691235`*^9, 3.493182995195475*^9}, {3.493183791029829*^9, 3.4931838062917747`*^9}, {3.507464028658447*^9, 3.507464045883215*^9}, { 3.5074646586393824`*^9, 3.5074646690143013`*^9}, {3.5074647984655104`*^9, 3.507464824973627*^9}, {3.507464855815859*^9, 3.5074648669446816`*^9}, { 3.5074649468839936`*^9, 3.507464974954357*^9}, {3.507465012708645*^9, 3.507465021491274*^9}, {3.5074650544586782`*^9, 3.507465056661846*^9}, { 3.507465211794917*^9, 3.5074652407064896`*^9}, {3.507465753243617*^9, 3.5074657612351084`*^9}, {3.507981944622572*^9, 3.5079819517628393`*^9}, { 3.507985201453397*^9, 3.507985203661572*^9}, {3.5106650256092606`*^9, 3.510665131561612*^9}, 3.510665189635118*^9, {3.510665232116203*^9, 3.5106652480090556`*^9}, 3.510665359859889*^9, 3.5106655198499436`*^9, { 3.5106658176231885`*^9, 3.5106658409166827`*^9}, {3.5106658857010794`*^9, 3.510665966006553*^9}, {3.510666155218627*^9, 3.510666171582156*^9}, { 3.510924417999257*^9, 3.510924424245224*^9}, {3.510924938723393*^9, 3.510924960495397*^9}, {3.5109250222983513`*^9, 3.510925033297825*^9}, { 3.510941857623761*^9, 3.510941868739745*^9}, {3.5109435349816513`*^9, 3.5109435685399055`*^9}, {3.5110117542104177`*^9, 3.5110117551517715`*^9}, {3.511017927055215*^9, 3.5110179417758036`*^9}, { 3.5110179981949124`*^9, 3.5110182563981867`*^9}, {3.511018315981435*^9, 3.5110183219396935`*^9}, {3.5110403884457855`*^9, 3.511040393162568*^9}, { 3.5110418077417*^9, 3.5110418282912493`*^9}, {3.511045501275484*^9, 3.5110455078649597`*^9}, 3.5110931744738865`*^9, {3.511093288718162*^9, 3.5110933851368055`*^9}, {3.5110936952927876`*^9, 3.5110937174546547`*^9}, {3.51109577703052*^9, 3.5110957771866693`*^9}, { 3.511175839410593*^9, 3.51117593834101*^9}, {3.5111759712151737`*^9, 3.511175973263085*^9}, 3.511176027967751*^9, 3.539712534261118*^9, 3.5397126052051263`*^9, {3.569671504101698*^9, 3.569671522024721*^9}, { 3.569699912196235*^9, 3.569699913475361*^9}, {3.580473256303953*^9, 3.580473266066558*^9}, {3.580473338480006*^9, 3.580473341512413*^9}, 3.580514491748373*^9}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Text output - the dynamic", "Text", CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"Print", "[", RowBox[{"Style", "[", RowBox[{ RowBox[{"DisplayForm", "[", RowBox[{"GridBox", "[", RowBox[{"{", RowBox[{ RowBox[{"{", "\"\<\>\"", "}"}], ",", RowBox[{"{", "\"\\"", "}"}]}], "}"}], "]"}], "]"}], ",", "\"\\""}], "]"}], "]"}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Print", "[", RowBox[{"Row", "[", RowBox[{"{", RowBox[{ RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< Name of dynamic: \>\"", "}"}], "]"}], "]"}], ",", " ", "dyn"}], "}"}], "]"}], "]"}], ";"}], "\n"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Print", "[", RowBox[{ RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< Law of motion: \>\"", "}"}], "]"}], "]"}], ",", " ", RowBox[{"Row", "[", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< \!\(\*SubscriptBox[\(V\), \(F\)]\)\>\"", "}"}], "]"}], "]"}], ",", RowBox[{"MatrixForm", "[", RowBox[{"{", RowBox[{"w", ",", "x", ",", "y", ",", "z"}], "}"}], "]"}], ",", " ", RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< = \>\"", "}"}], "]"}], "]"}], ",", RowBox[{"MatrixForm", "[", RowBox[{"Simplify", "[", RowBox[{"Flatten", "[", RowBox[{"dyn", "[", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{"w", ",", "x", ",", "y", ",", "z"}], "}"}], "}"}], ",", "Fmp"}], "]"}], "]"}], "]"}], "]"}]}], " ", "\[IndentingNewLine]", "}"}], "]"}]}], "]"}], ";"}], " "}]}], "Input", CellChangeTimes->{{3.4744075007209635`*^9, 3.4744075347599087`*^9}, { 3.4744660145287247`*^9, 3.47446606534179*^9}, {3.474480893792593*^9, 3.4744810714280205`*^9}, {3.474749510860401*^9, 3.4747495506976843`*^9}, { 3.481418886107008*^9, 3.481418886107008*^9}, {3.4817354833245296`*^9, 3.481735483334544*^9}, {3.569671583405945*^9, 3.569671598354111*^9}, { 3.569671634406624*^9, 3.569671678079186*^9}, 3.569672274980706*^9, { 3.571986046036521*^9, 3.571986057631458*^9}, {3.580473463495322*^9, 3.580473466860606*^9}}, CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[CellGroupData[{ Cell["Text output - stability of rest points", "Text", CellTags->"corecell"], Cell[BoxData[ RowBox[{"If", "[", RowBox[{ RowBox[{"findrestpoints", "\[Equal]", "1"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", "SRPs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", "1"}], ",", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< Stable rest point:\>\"", "}"}], "]"}], "]"}], "]"}], ",", RowBox[{"Print", "[", RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< Stable rest points:\>\"", "}"}], "]"}], "]"}], "]"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", "SRPs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", "0"}], ",", RowBox[{"Print", "[", RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< None\>\"", "}"}], "]"}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"SCharacterization", "[", "dyn", "]"}], "==", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{ "{", "\"\< (state x, relevant eigenvalues of \ \!\(\*SubscriptBox[\(DV\), \(F\)]\)[x], relevant eigenvectors of \ \!\(\*SubscriptBox[\(DV\), \(F\)]\)[x])\>\"", "}"}], "]"}], "]"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Row", "[", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< \>\"", "}"}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"TableForm", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"MatrixForm", "[", RowBox[{"{", RowBox[{"FormatState", "[", RowBox[{ RowBox[{"SRPs", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "maxdenominator"}], "]"}], "}"}], "]"}], ",", RowBox[{"MatrixForm", "[", RowBox[{"{", RowBox[{"FormatState", "[", RowBox[{ RowBox[{"SRPvs", "[", RowBox[{"[", RowBox[{"j", ",", "1"}], "]"}], "]"}], ",", "maxdenominator"}], "]"}], "}"}], "]"}], ",", RowBox[{"MatrixForm", "[", RowBox[{"{", RowBox[{"FormatState", "[", RowBox[{ RowBox[{"SRPvs", "[", RowBox[{"[", RowBox[{"j", ",", "2"}], "]"}], "]"}], ",", "maxdenominator"}], "]"}], "}"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "SRPs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"TableAlignments", "\[Rule]", "Top"}]}], "]"}]}], "\[IndentingNewLine]", "}"}], " ", "]"}], "]"}], ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{"Row", "[", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< \>\"", "}"}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"TableForm", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"MatrixForm", "[", RowBox[{"{", RowBox[{"FormatState", "[", RowBox[{ RowBox[{"SRPs", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "maxdenominator"}], "]"}], "}"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "SRPs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], "]"}]}], "\[IndentingNewLine]", "}"}], " ", "]"}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", "USRPs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", "1"}], ",", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< Unstable rest point:\>\"", "}"}], "]"}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< Unstable rest points:\>\"", "}"}], "]"}], "]"}], "]"}]}], "]"}], " ", ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", "USRPs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "\[Equal]", "0"}], ",", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< None\>\"", "}"}], "]"}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"SCharacterization", "[", "dyn", "]"}], "==", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{ "{", "\"\< (state x, relevant eigenvalues of \ \!\(\*SubscriptBox[\(DV\), \(F\)]\)[x], relevant eigenvectors of \ \!\(\*SubscriptBox[\(DV\), \(F\)]\)[x])\>\"", "}"}], "]"}], "]"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Row", "[", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< \>\"", "}"}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"TableForm", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"MatrixForm", "[", RowBox[{"{", RowBox[{"FormatState", "[", RowBox[{ RowBox[{"USRPs", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "maxdenominator"}], "]"}], "}"}], "]"}], ",", RowBox[{"MatrixForm", "[", RowBox[{"{", RowBox[{"FormatState", "[", RowBox[{ RowBox[{"USRPvs", "[", RowBox[{"[", RowBox[{"j", ",", "1"}], "]"}], "]"}], ",", "maxdenominator"}], "]"}], "}"}], "]"}], ",", RowBox[{"MatrixForm", "[", RowBox[{"{", RowBox[{"FormatState", "[", RowBox[{ RowBox[{"USRPvs", "[", RowBox[{"[", RowBox[{"j", ",", "2"}], "]"}], "]"}], ",", "maxdenominator"}], "]"}], "}"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "USRPs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"TableAlignments", "\[Rule]", "Top"}]}], "]"}]}], "\[IndentingNewLine]", "}"}], " ", "]"}], "]"}], ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{"Row", "[", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\< \>\"", "}"}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"TableForm", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"MatrixForm", "[", RowBox[{"{", RowBox[{"FormatState", "[", RowBox[{ RowBox[{"USRPs", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "maxdenominator"}], "]"}], "}"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "USRPs", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], "]"}]}], "\[IndentingNewLine]", "}"}], "]"}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}]], "Input", CellChangeTimes->{{3.4744811007802267`*^9, 3.4744811710512714`*^9}, { 3.474481208264782*^9, 3.474481211339203*^9}, 3.4744812504854927`*^9, { 3.47448132363067*^9, 3.474481814296212*^9}, {3.474481853382416*^9, 3.4744820200721035`*^9}, {3.4744820531997385`*^9, 3.474482227570472*^9}, { 3.474921890112877*^9, 3.4749218918653965`*^9}, {3.474921990917827*^9, 3.4749220127191763`*^9}, {3.47492206314168*^9, 3.474922086004555*^9}, { 3.492809114832117*^9, 3.492809118447315*^9}, {3.4928091971104274`*^9, 3.492809203229226*^9}, {3.4928108148866754`*^9, 3.4928108168394833`*^9}, { 3.492810871307805*^9, 3.492810875664069*^9}, {3.493183022074125*^9, 3.493183032218712*^9}, {3.493183178278736*^9, 3.4931831881028624`*^9}, { 3.4931837700797043`*^9, 3.4931837769796257`*^9}, {3.49318381955084*^9, 3.4931838306868525`*^9}, {3.507464682403554*^9, 3.5074646904050593`*^9}, { 3.5074657919192305`*^9, 3.507465802955099*^9}, {3.507981961486821*^9, 3.5079819688273764`*^9}, {3.5079852099105577`*^9, 3.507985220440699*^9}, 3.510688007830267*^9, {3.5106880446932735`*^9, 3.510688058372944*^9}, { 3.510688088666504*^9, 3.510688129815674*^9}, {3.510688210191248*^9, 3.5106882184931855`*^9}, {3.510688249337538*^9, 3.5106883060090275`*^9}, { 3.5106883367832785`*^9, 3.510688381838064*^9}, 3.51068845033069*^9, { 3.510688528273696*^9, 3.5106885356743374`*^9}, {3.510688703675912*^9, 3.510688704767482*^9}, {3.5106889361201506`*^9, 3.510688942108762*^9}, { 3.51068897601752*^9, 3.510688983518306*^9}, {3.510689201256372*^9, 3.5106892442653036`*^9}, {3.5106892918367133`*^9, 3.510689388966379*^9}, { 3.5106894640643644`*^9, 3.510689464444912*^9}, {3.510689535457022*^9, 3.510689578128381*^9}, {3.510690851194027*^9, 3.510691043831025*^9}, { 3.510691436746009*^9, 3.5106914404313087`*^9}, {3.5106915304307213`*^9, 3.5106915959449263`*^9}, {3.510691765318473*^9, 3.510691770475889*^9}, { 3.510691807969803*^9, 3.510691815841121*^9}, {3.51069191133844*^9, 3.510691936664857*^9}, {3.510691967389036*^9, 3.5106920297787485`*^9}, { 3.5106920681439147`*^9, 3.5106921117766557`*^9}, {3.510924448223147*^9, 3.510924454461604*^9}, {3.510924522227621*^9, 3.510924559324623*^9}, { 3.510924775050046*^9, 3.510924811101347*^9}, {3.510924882857869*^9, 3.5109249066561823`*^9}, {3.510925002422447*^9, 3.510925016911188*^9}, { 3.510941874818486*^9, 3.510941900805854*^9}, {3.5109435996446323`*^9, 3.5109436775666785`*^9}, {3.51101101993952*^9, 3.5110110352915955`*^9}, { 3.5110117564135857`*^9, 3.511011759528064*^9}, {3.5110182949421287`*^9, 3.511018302368745*^9}, {3.511018337551158*^9, 3.5110184035658875`*^9}, { 3.511041696041083*^9, 3.51104177578575*^9}, {3.5110419690336266`*^9, 3.511041981100979*^9}, {3.511093390915114*^9, 3.511093411194274*^9}, { 3.519553642086157*^9, 3.519553643085214*^9}, {3.56969991443132*^9, 3.569699920922037*^9}, 3.569700589597515*^9, {3.58048543872457*^9, 3.580485452965883*^9}, {3.580514492369445*^9, 3.580514497223866*^9}}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["Generating the phase diagram on simplex ", "Text", CellTags->"corecell"], Cell[BoxData[ RowBox[{"If", "[", RowBox[{ RowBox[{"drawphasediagram", "\[Equal]", "1"}], ",", "\[IndentingNewLine]", " ", RowBox[{"Show", "[", RowBox[{ RowBox[{"{", RowBox[{ "simplex", ",", "trajLines", ",", "cTrajLines", ",", "cLines", ",", "trajAr", ",", "cTrajAr", ",", "neDots", ",", "srpDots", ",", "urpDots", ",", "cDots", ",", "cWDots", ",", "cText", ",", "\[IndentingNewLine]", RowBox[{"Graphics3D", "[", "simplexStrategies", "]"}]}], "\[IndentingNewLine]", "}"}], ",", "\[IndentingNewLine]", RowBox[{"Boxed", "\[Rule]", " ", "False"}], ",", "\[IndentingNewLine]", RowBox[{"PlotRange", "\[Rule]", "simplexPlotRange"}], ",", "\[IndentingNewLine]", RowBox[{"AspectRatio", "\[Rule]", " ", "Automatic"}], ",", RowBox[{"BaseStyle", "->", RowBox[{"{", RowBox[{ RowBox[{"FontFamily", "\[Rule]", "font"}], ",", RowBox[{"FontSize", "\[Rule]", "10"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"ViewPoint", "\[Rule]", " ", "vpoint"}], ",", "\[IndentingNewLine]", RowBox[{"Lighting", "\[Rule]", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "1", ",", "1"}], "]"}], ",", RowBox[{"simplexLighting", "[", RowBox[{"[", "j", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "simplexLighting", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], "]"}]], "Input", CellChangeTimes->{ 3.4747501886470375`*^9, {3.4749337998901076`*^9, 3.4749338018028584`*^9}, 3.4919260498364735`*^9, {3.5134241012662144`*^9, 3.5134241023872786`*^9}, { 3.514555814318804*^9, 3.5145558163929224`*^9}, {3.514637511573911*^9, 3.5146375161671743`*^9}, 3.5191380693220444`*^9, 3.5191381009678545`*^9, { 3.5191381997345037`*^9, 3.519138229445203*^9}, {3.5191393329623203`*^9, 3.5191393458400574`*^9}, {3.519139451113078*^9, 3.5191394521371365`*^9}, 3.5191413486686125`*^9, {3.519141389995976*^9, 3.519141412003235*^9}, 3.519141538421466*^9, {3.519141580372865*^9, 3.519141581036903*^9}, 3.519141618069021*^9, 3.5192044234093037`*^9, {3.519204533461598*^9, 3.5192045360467463`*^9}, {3.5192892043142214`*^9, 3.5192892270995245`*^9}, {3.519289621996111*^9, 3.519289654576975*^9}, { 3.519290919388318*^9, 3.5192909235775576`*^9}, {3.5193085665286765`*^9, 3.5193085673677244`*^9}, 3.51948880636762*^9, {3.539376322930021*^9, 3.539376343762155*^9}, {3.539377568915223*^9, 3.539377576209223*^9}, 3.5397132108710365`*^9, 3.539713340270968*^9, 3.568667909686398*^9, { 3.569581537497145*^9, 3.569581580041415*^9}, 3.569581654005683*^9, { 3.569581723824517*^9, 3.569581753152887*^9}, 3.569582074600121*^9, 3.569582134689206*^9, {3.569582169475651*^9, 3.569582213875976*^9}, { 3.569637671377392*^9, 3.569637672133668*^9}, 3.569668468476589*^9, 3.569668829832995*^9, {3.570132720979689*^9, 3.570132725772509*^9}, 3.571958016955835*^9, {3.571958066814336*^9, 3.571958068159714*^9}, { 3.571987408430663*^9, 3.571987439170782*^9}, 3.572377988458759*^9, 3.580473580874903*^9, {3.580475656873819*^9, 3.58047569470045*^9}, { 3.580476002988646*^9, 3.580476005193437*^9}, {3.580476035500764*^9, 3.580476055556421*^9}, {3.580476119924844*^9, 3.580476241951673*^9}, 3.580476640825646*^9}, CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[CellGroupData[{ Cell["Printing time elapsed", "Text", CellChangeTimes->{{3.474917604905984*^9, 3.4749176096928673`*^9}, 3.511176162238818*^9}, CellTags->"corecell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"PrintTimeElapsed", "[", "t_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "dif", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"dif", "=", RowBox[{"DateList", "[", RowBox[{ RowBox[{"AbsoluteTime", "[", "]"}], "-", "t"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"Row", "[", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\\"", "}"}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"dif", "[", RowBox[{"[", "5", "]"}], "]"}], "<", "10"}], ",", RowBox[{"Row", "[", RowBox[{"{", RowBox[{ RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\<0\>\"", "}"}], "]"}], "]"}], ",", RowBox[{"dif", "[", RowBox[{"[", "5", "]"}], "]"}]}], "}"}], "]"}], ",", RowBox[{"dif", "[", RowBox[{"[", "5", "]"}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\<:\>\"", "}"}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Floor", "[", RowBox[{"dif", "[", RowBox[{"[", "6", "]"}], "]"}], "]"}], "<", "10"}], ",", RowBox[{"Row", "[", RowBox[{"{", RowBox[{ RowBox[{"DisplayForm", "[", RowBox[{"RowBox", "[", RowBox[{"{", "\"\<0\>\"", "}"}], "]"}], "]"}], ",", RowBox[{"Floor", "[", RowBox[{"dif", "[", RowBox[{"[", "6", "]"}], "]"}], "]"}]}], "}"}], "]"}], ",", RowBox[{"Floor", "[", RowBox[{"dif", "[", RowBox[{"[", "6", "]"}], "]"}], "]"}]}], "]"}]}], " ", "\[IndentingNewLine]", "}"}], "]"}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"PrintTimeElapsed", "[", "time1", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{"Row", "[", RowBox[{"{", "}"}], "]"}], "]"}], ";"}]}], "Input", CellChangeTimes->{{3.474469352418374*^9, 3.4744693581065536`*^9}, { 3.474751622691947*^9, 3.4747516398966866`*^9}, {3.474751672513587*^9, 3.474751689237635*^9}, {3.474751726040555*^9, 3.474751730086373*^9}, { 3.4747517957007217`*^9, 3.4747518073174257`*^9}, {3.474751944634878*^9, 3.474751965474845*^9}, {3.4747521102430115`*^9, 3.474752124924122*^9}, { 3.4747522923148174`*^9, 3.4747522925351343`*^9}, {3.474752453726917*^9, 3.4747524697900143`*^9}, {3.474752530737653*^9, 3.4747525343628654`*^9}, { 3.474752731001686*^9, 3.474752820951027*^9}, {3.4747529104096622`*^9, 3.4747529481439214`*^9}, {3.474753130586261*^9, 3.4747531369954767`*^9}, { 3.4747531837126527`*^9, 3.4747532973660784`*^9}, {3.4747533306439295`*^9, 3.474753346887286*^9}, {3.474753483303443*^9, 3.4747535108230143`*^9}, { 3.4747535509907722`*^9, 3.47475355287348*^9}, {3.474753610626525*^9, 3.4747537008863115`*^9}, {3.4807853786547556`*^9, 3.480785419372463*^9}, { 3.4886284886367583`*^9, 3.48862851256116*^9}, {3.4919143059727964`*^9, 3.4919143820521927`*^9}, {3.4919144726524696`*^9, 3.491914503276505*^9}, { 3.49191453465162*^9, 3.491914548821996*^9}, {3.4919145834818344`*^9, 3.4919146767859993`*^9}, 3.4919147454092917`*^9, {3.491914784260234*^9, 3.4919147878253603`*^9}, {3.4919148313479433`*^9, 3.4919148832826214`*^9}, {3.4919149360885525`*^9, 3.491914936929762*^9}, { 3.4919348385569973`*^9, 3.4919348466686616`*^9}, {3.4919348888993864`*^9, 3.491935091931332*^9}, {3.4919351355640726`*^9, 3.4919351499347367`*^9}, { 3.491935190082466*^9, 3.4919352218982153`*^9}, {3.491935258500847*^9, 3.491935266432252*^9}, {3.491935307821767*^9, 3.491935386404764*^9}, { 3.492280514018053*^9, 3.4922805233314447`*^9}, 3.492280682579484*^9, { 3.492280726412513*^9, 3.492280754042242*^9}, {3.49228080875091*^9, 3.4922808378727846`*^9}, {3.492280965661604*^9, 3.492280967754614*^9}, { 3.4932326695185633`*^9, 3.4932326724327536`*^9}}, CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell["End redirection", "Text", CellChangeTimes->{{3.519293386924453*^9, 3.5192934223244777`*^9}, { 3.5192935062902803`*^9, 3.5192935066613016`*^9}}], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{ RowBox[{"--", RowBox[{"--", RowBox[{"--", RowBox[{"--", RowBox[{"--", "Returning"}]}]}]}]}], " ", "to", " ", "original", " ", "output", " ", RowBox[{ RowBox[{ RowBox[{"production", "--"}], "--"}], "--"}]}], "-"}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"$DisplayFunction", "=", "Identity"}], ";"}], "\n", RowBox[{ RowBox[{"$Post", "=", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"#1", "=!=", "Null"}], ",", RowBox[{"CellPrint", "[", RowBox[{"Cell", "[", RowBox[{ RowBox[{"BoxData", "[", RowBox[{"MakeBoxes", "[", RowBox[{"#1", ",", "StandardForm"}], "]"}], "]"}], ",", "\"\\""}], "]"}], "]"}]}], "]"}], "&"}]}], ";"}], "\n", RowBox[{ RowBox[{"Unprotect", "[", "Print", "]"}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"Print", "[", "x_", "]"}], ":=", RowBox[{"CellPrint", "[", RowBox[{"Cell", "[", RowBox[{"BoxData", "[", RowBox[{"MakeBoxes", "[", RowBox[{"x", ",", "StandardForm"}], "]"}], "]"}], "]"}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"Print", "[", "x__", "]"}], ":=", RowBox[{"Print", "/@", RowBox[{"{", "x", "}"}]}]}], ";"}], "\n", RowBox[{ RowBox[{"Protect", "[", "Print", "]"}], ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{ RowBox[{"--", RowBox[{"--", RowBox[{"--", RowBox[{"--", RowBox[{"--", RowBox[{"--", RowBox[{"--", RowBox[{"--", "code"}]}]}]}]}]}]}]}], " ", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"ends", "--"}], "--"}], "--"}], "--"}], "--"}]}], "-", RowBox[{"--", RowBox[{"--", "-"}]}]}], "*)"}]}]}]], "Input", CellChangeTimes->{{3.474463029536517*^9, 3.4744630427254815`*^9}, { 3.474464168474229*^9, 3.4744641696559277`*^9}, {3.474464379727997*^9, 3.474464386367544*^9}, {3.474467076205341*^9, 3.4744670820537505`*^9}, { 3.474468634325808*^9, 3.4744686348465567`*^9}, {3.474469449648184*^9, 3.47446945054948*^9}, {3.474469481123443*^9, 3.4744694823251715`*^9}, { 3.5134516087329407`*^9, 3.5134516103430333`*^9}}, CellTags->"corecell"] }, Closed]] }, Closed]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Procedures; Maintenance", "Subtitle", CellChangeTimes->{{3.510069615192811*^9, 3.5100696169137373`*^9}, 3.569744605944674*^9}], Cell[CellGroupData[{ Cell["Procedures", "Section", CellChangeTimes->{{3.492208005463666*^9, 3.492208032121999*^9}, { 3.569744624668716*^9, 3.569744627552562*^9}}, CellTags->"initcell"], Cell[CellGroupData[{ Cell["Preliminary definitions and calculations", "Subsection", CellTags->"initcell"], Cell[CellGroupData[{ Cell["Norm", "Subsubsection", CellChangeTimes->{{3.4927035476118064`*^9, 3.4927035620826144`*^9}, { 3.492812547197616*^9, 3.4928125521647587`*^9}, {3.4928128620603666`*^9, 3.4928128997044964`*^9}, {3.493151231640339*^9, 3.4931512369479713`*^9}, { 3.571921939502137*^9, 3.571921942108179*^9}}, CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{"dim", "=", RowBox[{"{", "4", "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"NormalGame", "=", "1"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"QuadraticGame", "=", "2"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"CongestionGame", "=", "3"}], ";"}]}], "Input", CellChangeTimes->{{3.492685876870861*^9, 3.4926859140242853`*^9}, { 3.4926859750720673`*^9, 3.4926859760634933`*^9}, 3.4926954200431075`*^9, { 3.4926956840727634`*^9, 3.4926957523168793`*^9}, {3.492695931032943*^9, 3.4926959334363985`*^9}, {3.4926959739346323`*^9, 3.4926960022052836`*^9}, {3.492818553689595*^9, 3.492818572216235*^9}, 3.493129143512046*^9, {3.539723825865969*^9, 3.539723860040309*^9}, { 3.5586249363598814`*^9, 3.558624956771049*^9}, {3.5586251901313963`*^9, 3.558625273367157*^9}, {3.5586253240880585`*^9, 3.558625382085376*^9}, { 3.5586254234637423`*^9, 3.558625466921228*^9}, {3.558625501241191*^9, 3.558625508710618*^9}, {3.5586259170309725`*^9, 3.55862591751*^9}, { 3.5586386315110188`*^9, 3.558638651165143*^9}, {3.5586388597080708`*^9, 3.5586388830474057`*^9}, 3.5586389191654716`*^9, {3.5586389660761547`*^9, 3.5586390191321898`*^9}, {3.5586442349195156`*^9, 3.5586442358795705`*^9}, {3.558644572823842*^9, 3.558644573381874*^9}, 3.558644753106154*^9, {3.5586450479730196`*^9, 3.558645048949075*^9}, { 3.56854174383713*^9, 3.568541746133914*^9}, {3.568541871996656*^9, 3.56854187862657*^9}, {3.568541936114507*^9, 3.568541941354117*^9}, { 3.568978226409765*^9, 3.568978436371108*^9}, {3.568978468302534*^9, 3.568978524773533*^9}, 3.569666536462631*^9, {3.569745630229281*^9, 3.569745713708716*^9}, {3.571822631608726*^9, 3.571822660902201*^9}, 3.571921885132814*^9, {3.571922018228694*^9, 3.571922019906379*^9}, 3.580474494898818*^9, {3.580650773545268*^9, 3.580650777482834*^9}, { 3.580650917769917*^9, 3.580650918556538*^9}}, CellTags->{"initcell", "differentacrossnotebooks"}], Cell[BoxData[{ RowBox[{ RowBox[{"pop", "=", RowBox[{ RowBox[{"Dimensions", "[", "dim", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"stateNorm", "[", RowBox[{"x_", ",", RowBox[{"p_:", "2"}]}], "]"}], ":=", RowBox[{"Norm", "[", RowBox[{ RowBox[{"Flatten", "[", "x", "]"}], ",", "p"}], "]"}]}], ";", RowBox[{ RowBox[{"stateNorm", "[", RowBox[{"x_", ",", RowBox[{"p_:", "2"}]}], "]"}], ":=", RowBox[{"Norm", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"Norm", "[", RowBox[{ RowBox[{"Drop", "[", RowBox[{ RowBox[{"x", "[", RowBox[{"[", "j", "]"}], "]"}], ",", RowBox[{"-", "1"}]}], "]"}], ",", "p"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "x", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], ",", "p"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"stateNorm", "[", RowBox[{"x_", ",", RowBox[{"p_:", "2"}]}], "]"}], ":=", RowBox[{"Norm", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"Norm", "[", RowBox[{ RowBox[{"x", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "p"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "x", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], ",", "p"}], "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.492685876870861*^9, 3.4926859140242853`*^9}, { 3.4926859750720673`*^9, 3.4926859760634933`*^9}, 3.4926954200431075`*^9, { 3.4926956840727634`*^9, 3.4926957523168793`*^9}, {3.492695931032943*^9, 3.4926959334363985`*^9}, {3.4926959739346323`*^9, 3.4926960022052836`*^9}, {3.492818553689595*^9, 3.492818572216235*^9}, 3.493129143512046*^9, {3.539723825865969*^9, 3.539723860040309*^9}, { 3.5586249363598814`*^9, 3.558624956771049*^9}, {3.5586251901313963`*^9, 3.558625273367157*^9}, {3.5586253240880585`*^9, 3.558625382085376*^9}, { 3.5586254234637423`*^9, 3.558625466921228*^9}, {3.558625501241191*^9, 3.558625508710618*^9}, {3.5586259170309725`*^9, 3.55862591751*^9}, { 3.5586386315110188`*^9, 3.558638651165143*^9}, {3.5586388597080708`*^9, 3.5586388830474057`*^9}, 3.5586389191654716`*^9, {3.5586389660761547`*^9, 3.5586390191321898`*^9}, {3.5586442349195156`*^9, 3.5586442358795705`*^9}, {3.558644572823842*^9, 3.558644573381874*^9}, 3.558644753106154*^9, {3.5586450479730196`*^9, 3.558645048949075*^9}, { 3.56854174383713*^9, 3.568541746133914*^9}, {3.568541871996656*^9, 3.56854187862657*^9}, {3.568541936114507*^9, 3.568541941354117*^9}, { 3.568978226409765*^9, 3.568978436371108*^9}, {3.568978468302534*^9, 3.568978524773533*^9}, 3.569666536462631*^9, {3.569745630229281*^9, 3.569745713708716*^9}, {3.571822631608726*^9, 3.571822660902201*^9}, 3.571921885132814*^9, {3.571922021663559*^9, 3.571922023167*^9}}, CellTags->"initcell"] }, Closed]], Cell[CellGroupData[{ Cell["General Purpose Routines", "Subsubsection", CellChangeTimes->{{3.4927035476118064`*^9, 3.4927035620826144`*^9}, { 3.492812547197616*^9, 3.4928125521647587`*^9}}, CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"emptyVector", "[", RowBox[{"name_", ",", "dim_", ",", RowBox[{"var_:", "\"\<\>\""}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"j", ",", "x"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"x", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "<=", "dim"}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"x", "=", RowBox[{"Join", "[", RowBox[{"x", ",", RowBox[{"{", RowBox[{"ToExpression", "[", RowBox[{"ToString", "[", RowBox[{"Row", "[", RowBox[{"{", RowBox[{"name", ",", "j", ",", "var"}], "}"}], "]"}], "]"}], "]"}], "}"}]}], "]"}]}], ";"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"x", "=", RowBox[{"Join", "[", RowBox[{"x", ",", RowBox[{"{", RowBox[{"ToExpression", "[", RowBox[{"StringJoin", "[", RowBox[{ RowBox[{"ToString", "[", "name", "]"}], ",", RowBox[{"ToString", "[", "j", "]"}], ",", RowBox[{"ToString", "[", "var", "]"}]}], "]"}], "]"}], "}"}]}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", "x"}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{"Print", "[", RowBox[{"emptyVector", "[", RowBox[{"y", ",", "3", ",", "\"\<_\>\""}], "]"}], "]"}], ";"}], " ", "*)"}]}]}], "Input", CellChangeTimes->CompressedData[" 1:eJwdyGkog3EAx/HH5GhsuWovLOYoJSG1vZDGU0SMWMILRjIRY2bDapmWa4WJ lZuiHEsRLxwvlOsNmmvNUd54YdlaQ0ly/n/Pi2+f+kZVN0vlLIqiIkiwLXl0 VunjpPeWqQW4G/B8BhO8RFb4plHdwZSuA98WoqbBxIb+IyVcWDbL4cH7sa9w WCuXzMMEAdsCaUerl4poLSrlQG6Nu7uD+Pe50gPHs+odkFOc/gxL2m1uOFRh 8cBEVy+tJRq4x9mw3ywpgHP2YUazR6uf8nXSEe9PffBXuH5vjXbSWp3nASbZ P8rPidvt35XwZ3FPAWVWThPUyV6aLomPkeZmmLNjVMNpV6gGfvFOOqF9tVsP Y9TL8itinai3FqrcZ2HXRK6nkQf3TUF8GMKPZTRmHsZBVt5APAzkb4jhnHdw BtytKhyCgsTJYSjdct8w+vvdwpZzgcRGVApSGR0Tayb4eppmZv6veAkeCXMZ hYqZ/E2Tk74YNBTAfxNQ6IQ= "], CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"vectorReplace", "[", RowBox[{"orig_", ",", "replace_", ",", "positions_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"j", ",", "counter", ",", "result"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"result", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"counter", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "<=", RowBox[{ RowBox[{"Dimensions", "[", "orig", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"positions", "[", RowBox[{"[", "j", "]"}], "]"}], "==", "1"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"result", "=", RowBox[{"Join", "[", RowBox[{"result", ",", RowBox[{"{", RowBox[{"replace", "[", RowBox[{"[", "counter", "]"}], "]"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"counter", "++"}], ";"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"result", "=", RowBox[{"Join", "[", RowBox[{"result", ",", RowBox[{"{", RowBox[{"orig", "[", RowBox[{"[", "j", "]"}], "]"}], "}"}]}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", "result"}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{"Print", "[", RowBox[{"vectorReplace", "[", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1"}], "}"}]}], "]"}], "]"}], ";"}], " ", "*)"}]}]}], "Input", CellChangeTimes->{{3.4931238869534855`*^9, 3.4931240282065973`*^9}, { 3.493124108742402*^9, 3.4931241467470503`*^9}, {3.493124353764727*^9, 3.49312453865058*^9}, {3.4931252506844344`*^9, 3.4931252972513943`*^9}, { 3.507981247520029*^9, 3.5079812477303314`*^9}, {3.565001370194773*^9, 3.565001384483836*^9}}, CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"eliminateDuplicates", "[", RowBox[{"delta_", ",", "reallist_", ",", RowBox[{"norm_:", "Norm"}], ",", RowBox[{"complist_:", RowBox[{"{", "}"}]}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"j", ",", "k", ",", "reducedreallist", ",", "reducedcomplist"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"complist", "==", RowBox[{"{", "}"}]}], ",", RowBox[{"reducedcomplist", "=", "reallist"}], ",", RowBox[{"reducedcomplist", "=", "complist"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"reducedreallist", "=", "reallist"}], ";", "\[IndentingNewLine]", RowBox[{"j", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{"j", "<=", RowBox[{ RowBox[{"Dimensions", "[", "reducedcomplist", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"k", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{"k", "<=", RowBox[{ RowBox[{"Dimensions", "[", "reducedcomplist", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Not", "[", RowBox[{"j", "==", "k"}], "]"}], " ", "&&", " ", RowBox[{ RowBox[{"norm", "[", RowBox[{ RowBox[{"reducedcomplist", "[", RowBox[{"[", "j", "]"}], "]"}], "-", RowBox[{"reducedcomplist", "[", RowBox[{"[", "k", "]"}], "]"}]}], "]"}], "<", "delta"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"reducedcomplist", "=", RowBox[{"Drop", "[", RowBox[{"reducedcomplist", ",", RowBox[{"{", "k", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"reducedreallist", "=", RowBox[{"Drop", "[", RowBox[{"reducedreallist", ",", RowBox[{"{", "k", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"Print", "[", RowBox[{"j", ",", "k"}], "]"}], ";"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"Continue", "[", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"k", "++"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"j", "++"}]}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", "reducedreallist"}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"(*", " ", RowBox[{"eliminateDuplicates", "[", RowBox[{"2", ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"6", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"1.1", ",", ".9"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "7"}], "}"}], ",", RowBox[{"{", RowBox[{"10", ",", "20"}], "}"}], ",", RowBox[{"{", RowBox[{"1.1", ",", ".95"}], "}"}]}], "}"}]}], "]"}], " ", "*)"}]}]}], "Input", CellChangeTimes->{{3.4922176943407907`*^9, 3.49221785299893*^9}, { 3.492217905023738*^9, 3.4922179096103334`*^9}, {3.49225814633099*^9, 3.4922581642818017`*^9}, {3.492287687663436*^9, 3.492287805562967*^9}, 3.492287860141447*^9, {3.4922878908856544`*^9, 3.4922879942542915`*^9}, { 3.492288025929839*^9, 3.492288032068666*^9}, {3.492288076903135*^9, 3.4922880788359137`*^9}, {3.4922881186331396`*^9, 3.492288169736623*^9}, { 3.492288293985284*^9, 3.4922884291596546`*^9}, {3.492288474825319*^9, 3.492288499851304*^9}, {3.492288685498252*^9, 3.4922887101136465`*^9}, { 3.4922887960071554`*^9, 3.4922888052204037`*^9}, {3.4922888856560645`*^9, 3.492288998538381*^9}, {3.492289120974436*^9, 3.492289136877303*^9}, { 3.492289195201168*^9, 3.4922891984858913`*^9}, {3.4922897179228053`*^9, 3.4922898327479153`*^9}, {3.4922899331923475`*^9, 3.4922899497060933`*^9}, {3.4922900755570583`*^9, 3.4922901174172497`*^9}, {3.4922901552616673`*^9, 3.4922901802275667`*^9}, {3.4922902757148705`*^9, 3.4922902914975653`*^9}, {3.492290340037362*^9, 3.49229034064824*^9}, { 3.492290386594308*^9, 3.4922903898890452`*^9}, {3.4922904673304005`*^9, 3.492290468642287*^9}, {3.492290509360837*^9, 3.4922905221592407`*^9}, { 3.4922908409226675`*^9, 3.492290846290386*^9}, {3.492290893928887*^9, 3.4922909445116215`*^9}, {3.4922910000214405`*^9, 3.492291015243328*^9}, { 3.492291070112226*^9, 3.492291131170023*^9}, {3.5079812523669987`*^9, 3.5079812569936404`*^9}, {3.565001418201373*^9, 3.565001422217051*^9}, 3.568977879634011*^9, {3.568978013288202*^9, 3.568978036325175*^9}}, CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"subMatrix", "[", RowBox[{"matrix_", ",", "positions_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"j", ",", "k", ",", "dim", ",", "result"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"dim", "=", RowBox[{ RowBox[{"Dimensions", "[", "positions", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"result", "=", "matrix"}], ";", "\[IndentingNewLine]", RowBox[{"j", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"result", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"DeleteCases", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"positions", "[", RowBox[{"[", "k", "]"}], "]"}], "==", "1"}], ",", RowBox[{"result", "[", RowBox[{"[", RowBox[{"j", ",", "k"}], "]"}], "]"}], ",", "\"\\""}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "dim"}], "}"}]}], "]"}], ",", "\"\\""}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "dim"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"result", "=", RowBox[{"DeleteCases", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"positions", "[", RowBox[{"[", "j", "]"}], "]"}], "==", "1"}], ",", RowBox[{"result", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "\"\\""}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "dim"}], "}"}]}], "]"}], ",", "\"\\""}], "]"}]}], ";", "\[IndentingNewLine]", "result"}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"(*", " ", RowBox[{"subMatrix", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "3", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "5", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "9", ",", "8"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "1"}], "}"}]}], "]"}], " ", "*)"}]}]}], "Input", CellChangeTimes->{{3.4933905614818573`*^9, 3.49339088156211*^9}, { 3.4933909239630795`*^9, 3.4933909734943023`*^9}, {3.493391012520419*^9, 3.4933910351429486`*^9}, 3.49339109605398*^9, {3.493391133369259*^9, 3.4933912900345325`*^9}, {3.493391339195222*^9, 3.493391354907816*^9}, { 3.493391388996833*^9, 3.4933914629341493`*^9}, {3.507981263845468*^9, 3.507981264054768*^9}, {3.565001466497927*^9, 3.56500146777892*^9}}, CellTags->"initcell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"simplexQ", "[", RowBox[{"x_", ",", RowBox[{"accuracy_:", "8"}]}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Max", "[", "x", "]"}], ">", "1"}], "||", RowBox[{ RowBox[{"Min", "[", "x", "]"}], "<", "0"}], "||", RowBox[{ RowBox[{"Abs", "[", RowBox[{ RowBox[{"Total", "[", "x", "]"}], "-", "1"}], "]"}], ">", RowBox[{"10", "^", RowBox[{"(", RowBox[{"-", "accuracy"}], ")"}]}]}]}], ",", "False", ",", "True"}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.4922176943407907`*^9, 3.49221785299893*^9}, { 3.492217905023738*^9, 3.4922179096103334`*^9}, {3.49225814633099*^9, 3.4922581642818017`*^9}, {3.5074086040718455`*^9, 3.5074086127543306`*^9}, {3.5074086477746873`*^9, 3.507408724615178*^9}, 3.565001517145268*^9, 3.578923770519437*^9}, CellTags->"initcell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"checkBoundary", "[", RowBox[{"x_", ",", "delta_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"j", ",", "boundaryvector"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"boundaryvector", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "<=", RowBox[{ RowBox[{"Dimensions", "[", "x", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Abs", "[", RowBox[{"x", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], "<", "delta"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"boundaryvector", "=", RowBox[{"Append", "[", RowBox[{"boundaryvector", ",", "1"}], "]"}]}], ";"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"boundaryvector", "=", RowBox[{"Append", "[", RowBox[{"boundaryvector", ",", "0"}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", "boundaryvector"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.4922176943407907`*^9, 3.49221785299893*^9}, { 3.492217905023738*^9, 3.4922179096103334`*^9}, {3.49225814633099*^9, 3.4922581642818017`*^9}, {3.507981270416357*^9, 3.5079812706829376`*^9}, 3.565001574199294*^9, {3.568548163861234*^9, 3.568548174454891*^9}}, CellTags->"initcell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"sampleAround", "[", RowBox[{"x_", ",", "eps_", ",", RowBox[{"n_:", "1"}], ",", RowBox[{"variant_:", "\"\\""}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"validpoints", ",", "j", ",", "point"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"validpoints", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "<=", "n"}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"point", " ", "=", " ", RowBox[{"RandomReal", "[", RowBox[{"1", ",", RowBox[{ RowBox[{"Dimensions", "[", "x", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"point", "=", RowBox[{"point", "-", RowBox[{"Mean", "[", "point", "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"variant", "==", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"point", " ", "=", RowBox[{ RowBox[{"RandomReal", "[", RowBox[{"{", RowBox[{"0", ",", "eps"}], "}"}], "]"}], "*", RowBox[{"point", "/", RowBox[{"Norm", "[", "point", "]"}]}]}]}], ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"point", " ", "=", RowBox[{"eps", "*", RowBox[{"point", "/", RowBox[{"Norm", "[", "point", "]"}]}]}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"point", " ", "=", RowBox[{"x", "+", "point"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"simplexQ", "[", "point", "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"validpoints", " ", "=", RowBox[{"Append", "[", RowBox[{"validpoints", ",", "point"}], "]"}]}], ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"j", "--"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", "validpoints"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.4841517214515386`*^9, 3.4841517247262473`*^9}, { 3.4841774393019915`*^9, 3.4841774451604156`*^9}, {3.484183866113292*^9, 3.4841838889761677`*^9}, {3.48418403555694*^9, 3.4841840433982153`*^9}, 3.4922779201532907`*^9, {3.4928173034217987`*^9, 3.4928173171915984`*^9}, { 3.5079322795294523`*^9, 3.5079323808150935`*^9}, {3.5079812758327904`*^9, 3.507981276075136*^9}, 3.558883820643627*^9, 3.565001620743792*^9, { 3.568548096372006*^9, 3.568548157481129*^9}, {3.569775857655394*^9, 3.569775888386827*^9}, {3.569775950991475*^9, 3.569775967496944*^9}, { 3.569776037476771*^9, 3.569776074015517*^9}}, CellTags->"initcell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"numberSystem", "[", RowBox[{"npositions_", ",", "npossibilities_", ",", "j_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"leftover", ",", "x"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"leftover", "=", RowBox[{"j", "-", "1"}]}], ";", "\[IndentingNewLine]", RowBox[{"x", "=", RowBox[{"ConstantArray", "[", RowBox[{"0", ",", "npositions"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"x", "[", RowBox[{"[", "k", "]"}], "]"}], "=", RowBox[{"IntegerPart", "[", RowBox[{"leftover", "/", RowBox[{"npossibilities", "^", RowBox[{"(", RowBox[{"npositions", "-", "k"}], ")"}]}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"leftover", "=", RowBox[{"leftover", "-", RowBox[{ RowBox[{"x", "[", RowBox[{"[", "k", "]"}], "]"}], "*", RowBox[{"npossibilities", "^", RowBox[{"(", RowBox[{"npositions", "-", "k"}], ")"}]}]}]}]}], ";"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"k", ",", "npositions"}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", "x"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.5158613135357037`*^9, 3.515861612057778*^9}, { 3.5158616486758723`*^9, 3.515861677798538*^9}, {3.5158617503256865`*^9, 3.5158617612923136`*^9}, {3.515861916961218*^9, 3.5158619185713096`*^9}, { 3.5158624090003605`*^9, 3.5158624101194243`*^9}, {3.515862672394426*^9, 3.5158626821859856`*^9}, {3.565001903173182*^9, 3.565001909601768*^9}, 3.565002010393186*^9}, CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"discSimplex", "[", RowBox[{"n_", ",", "dim_", ",", RowBox[{"perturbed_:", "False"}], ",", RowBox[{"eps_:", "Infinity"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "j", ",", "k", ",", "epsilon", ",", "x", ",", "grid", ",", "leftover", ",", "nc"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"perturbed", "==", "True"}], " ", "&&", " ", RowBox[{"eps", ">", RowBox[{"1", "/", RowBox[{"(", RowBox[{"2", "*", "dim"}], ")"}]}]}]}], ",", RowBox[{"epsilon", "=", " ", RowBox[{"1", "/", RowBox[{"(", RowBox[{"2", "*", "dim"}], ")"}]}]}], ",", RowBox[{"epsilon", "=", "eps"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"grid", " ", "=", " ", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"nc", "=", RowBox[{ RowBox[{"(", RowBox[{"n", "+", "1"}], ")"}], "^", "dim"}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "<=", "nc"}], ",", RowBox[{"j", "+=", "n"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"x", "=", RowBox[{"numberSystem", "[", RowBox[{"dim", ",", RowBox[{"n", "+", "1"}], ",", "j"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Total", "[", "x", "]"}], "==", " ", "n"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"x", "=", RowBox[{"x", "/", "n"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"perturbed", "==", "True"}], ",", RowBox[{"x", "=", RowBox[{ RowBox[{"sampleAround", "[", RowBox[{"x", ",", "epsilon"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"grid", "=", RowBox[{"Append", "[", RowBox[{"grid", ",", "x"}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", "grid"}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"(*", "\[IndentingNewLine]", RowBox[{ RowBox[{"ListPointPlot3D", "[", RowBox[{"discSimplex", "[", RowBox[{"50", ",", "3"}], "]"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Dimensions", "[", RowBox[{"discSimplex", "[", RowBox[{"50", ",", "3"}], "]"}], "]"}], ";"}], "\[IndentingNewLine]", "*)"}]}]}], "Input", CellChangeTimes->{{3.5158620478207026`*^9, 3.515862213644187*^9}, { 3.51586233363605*^9, 3.515862333932067*^9}, {3.5158624540689383`*^9, 3.5158624745091076`*^9}, {3.515862517539569*^9, 3.5158625222378373`*^9}, { 3.5158625895476875`*^9, 3.515862592885878*^9}, 3.565001598537931*^9, { 3.565002005584083*^9, 3.565002033902193*^9}, 3.565002069778929*^9}, CellTags->"initcell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"support", "[", RowBox[{"x_", ",", RowBox[{"accuracy_:", "8"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "tolLevel", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"tolLevel", "=", RowBox[{"10", "^", RowBox[{"(", RowBox[{"-", "accuracy"}], ")"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Abs", "[", RowBox[{"x", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], ">", "tolLevel"}], ",", "1", ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "x", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.5158431432344217`*^9, 3.5158431650806713`*^9}, 3.565002195072414*^9, {3.568829855090309*^9, 3.568829858523706*^9}}, CellTags->"initcell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"simplexSupport", "[", RowBox[{"x_", ",", RowBox[{"accuracy_:", "8"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "tolLevel", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"tolLevel", "=", RowBox[{"10", "^", RowBox[{"(", RowBox[{"-", "accuracy"}], ")"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"x", "[", RowBox[{"[", "j", "]"}], "]"}], ">", "tolLevel"}], ",", "1", ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "x", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.5158431432344217`*^9, 3.5158431650806713`*^9}, { 3.5163869212186813`*^9, 3.5163869344314365`*^9}, {3.565002196611813*^9, 3.565002214995478*^9}, {3.568829859759375*^9, 3.568829861496666*^9}}, CellTags->"initcell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"simplexClosestPoint", "[", "x_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "j", ",", "k", ",", "m", ",", "dim", ",", "nc", ",", "boundaries", ",", "reduced", ",", "npos", ",", "flag", ",", "project", ",", "result"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"dim", "=", RowBox[{ RowBox[{"Dimensions", "[", "x", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"result", "=", RowBox[{"ConstantArray", "[", RowBox[{"0", ",", "dim"}], "]"}]}], ";", "\[IndentingNewLine]", " ", RowBox[{"nc", "=", RowBox[{"2", "^", "dim"}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "2"}], ",", RowBox[{"j", "<=", "nc"}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"boundaries", "=", RowBox[{"numberSystem", "[", RowBox[{"dim", ",", "2", ",", "j"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"npos", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"reduced", "=", RowBox[{"ConstantArray", "[", RowBox[{"0", ",", "dim"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"boundaries", "[", RowBox[{"[", "k", "]"}], "]"}], "==", "1"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"reduced", "[", RowBox[{"[", "npos", "]"}], "]"}], "=", RowBox[{"x", "[", RowBox[{"[", "k", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"npos", "++"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"k", ",", "dim"}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"npos", "--"}], ";", "\[IndentingNewLine]", RowBox[{"project", "=", RowBox[{ RowBox[{"IdentityMatrix", "[", "npos", "]"}], "-", RowBox[{ RowBox[{"1", "/", "npos"}], "*", RowBox[{"ConstantArray", "[", RowBox[{"1", ",", RowBox[{"{", RowBox[{"npos", ",", "npos"}], "}"}]}], "]"}]}]}]}], ";", "\[IndentingNewLine]", RowBox[{"reduced", "=", RowBox[{ RowBox[{"project", ".", RowBox[{"Take", "[", RowBox[{"reduced", ",", "npos"}], "]"}]}], "+", RowBox[{ RowBox[{"1", "/", "npos"}], "*", RowBox[{"ConstantArray", "[", RowBox[{"1", ",", "npos"}], "]"}]}]}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Min", "[", "reduced", "]"}], "<", "0"}], ",", " ", RowBox[{"Continue", "[", "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"flag", "=", "False"}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"And", "[", RowBox[{ RowBox[{ RowBox[{"boundaries", "[", RowBox[{"[", "k", "]"}], "]"}], "==", "0"}], ",", RowBox[{ RowBox[{ RowBox[{"x", "[", RowBox[{"[", RowBox[{ RowBox[{"Position", "[", RowBox[{"boundaries", ",", "1"}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], "]"}], "]"}], "-", RowBox[{"x", "[", RowBox[{"[", "k", "]"}], "]"}], "-", RowBox[{"reduced", "[", RowBox[{"[", "1", "]"}], "]"}]}], "<", "0"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"flag", "=", "True"}], ";", "\[IndentingNewLine]", RowBox[{"Break", "[", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"k", ",", "dim"}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{"flag", ",", RowBox[{"Continue", "[", "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"m", "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"boundaries", "[", RowBox[{"[", "k", "]"}], "]"}], "==", "1"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"result", "[", RowBox[{"[", "k", "]"}], "]"}], "=", RowBox[{"reduced", "[", RowBox[{"[", "m", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"m", "++"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"k", ",", "dim"}], "}"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Break", "[", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", "result"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.5158610264992857`*^9, 3.5158611842993116`*^9}, { 3.5158628005917587`*^9, 3.5158630618697023`*^9}, {3.5158631055882034`*^9, 3.515863193911255*^9}, {3.51586322547406*^9, 3.515863342412749*^9}, 3.5158634026771955`*^9, {3.5158634466807127`*^9, 3.515863477944501*^9}, 3.5158635440622826`*^9, {3.515863586523711*^9, 3.5158636740217156`*^9}, { 3.5158637462118444`*^9, 3.5158638202180777`*^9}, {3.5158639196487646`*^9, 3.5158639402629433`*^9}, {3.5158639975272193`*^9, 3.515864274551064*^9}, { 3.5158647809020257`*^9, 3.5158648189702024`*^9}, {3.5158648573193965`*^9, 3.515864869824112*^9}, {3.5158649057141647`*^9, 3.5158649114164906`*^9}, { 3.515864958944209*^9, 3.5158649654255795`*^9}, {3.5158650186346235`*^9, 3.5158651631418886`*^9}, {3.5158662208313847`*^9, 3.5158662404495068`*^9}, {3.515866396670442*^9, 3.5158664147144747`*^9}, { 3.515866716775751*^9, 3.5158667470044804`*^9}, 3.515866834261471*^9, { 3.515866884230329*^9, 3.515866919060321*^9}, 3.5158669958897157`*^9, { 3.5158670831157045`*^9, 3.515867126987214*^9}, {3.515940216575699*^9, 3.5159402360598135`*^9}, {3.5159406099401984`*^9, 3.515940641584008*^9}, 3.56500200645568*^9, 3.565002271909319*^9}, CellTags->"initcell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"projectionMatrix", "[", "dim_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "pop", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"pop", "=", RowBox[{ RowBox[{"Dimensions", "[", "dim", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Flatten", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"Transpose", "[", RowBox[{"Join", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"ConstantArray", "[", RowBox[{"0", ",", RowBox[{"{", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"p", "==", "1"}], ",", "0", ",", RowBox[{"Product", "[", RowBox[{ RowBox[{"dim", "[", RowBox[{"[", "k", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "1", ",", RowBox[{"p", "-", "1"}]}], "}"}]}], "]"}]}], "]"}], ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"IdentityMatrix", "[", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], "-", RowBox[{ RowBox[{"1", "/", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "*", RowBox[{"ConstantArray", "[", RowBox[{"1", ",", RowBox[{"{", RowBox[{ RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}], ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}]}]}], ",", "\[IndentingNewLine]", RowBox[{"ConstantArray", "[", RowBox[{"0", ",", RowBox[{"{", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"p", "==", "pop"}], ",", "0", ",", RowBox[{"Product", "[", RowBox[{ RowBox[{"dim", "[", RowBox[{"[", "k", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"p", "+", "1"}], ",", "pop"}], "}"}]}], "]"}]}], "]"}], ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}]}], "\[IndentingNewLine]", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], ",", "1"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.4922176943407907`*^9, 3.49221785299893*^9}, { 3.492217905023738*^9, 3.4922179096103334`*^9}, {3.49225814633099*^9, 3.4922581642818017`*^9}, {3.507981270416357*^9, 3.5079812706829376`*^9}, 3.565001574199294*^9, {3.568548163861234*^9, 3.568548174454891*^9}, { 3.56899036093993*^9, 3.568990377610872*^9}, {3.568990461862211*^9, 3.568990538338224*^9}}, CellTags->"initcell"] }, Closed]], Cell[CellGroupData[{ Cell["General Game Theory Routines", "Subsubsection", CellChangeTimes->{{3.4927035476118064`*^9, 3.4927035620826144`*^9}, { 3.492812547197616*^9, 3.4928125521647587`*^9}, {3.492812641853725*^9, 3.492812647141328*^9}}, CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"bestResponse", "::", "multip"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"bestResponse", "[", RowBox[{"x_", ",", "F_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"Fx", ",", "y"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Fx", "=", RowBox[{"F", "[", "x", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"y", "=", RowBox[{"ConstantArray", "[", RowBox[{"0", ",", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"y", "[", RowBox[{"[", RowBox[{"Ordering", "[", RowBox[{ RowBox[{"Fx", "[", RowBox[{"[", "p", "]"}], "]"}], ",", RowBox[{"-", "1"}]}], "]"}], "]"}], "]"}], "=", "1"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"Position", "[", RowBox[{ RowBox[{"Fx", "[", RowBox[{"[", "p", "]"}], "]"}], ",", RowBox[{"Max", "[", RowBox[{"Fx", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}]}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], ">", "1"}], ",", RowBox[{"Message", "[", RowBox[{"bestResponse", "::", "multip"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", "y"}], ",", RowBox[{"{", RowBox[{"p", ",", RowBox[{ RowBox[{"Dimensions", "[", "x", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.507981293117962*^9, 3.5079812934258614`*^9}, { 3.565002306736852*^9, 3.565002309437866*^9}, {3.568571839358576*^9, 3.568571907750358*^9}, {3.571820705550477*^9, 3.571820706511558*^9}}, CellTags->"initcell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"bestResponseSet", "[", RowBox[{"x_", ",", "F_", ",", RowBox[{"accuracy_:", "8"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"Fx", ",", "max"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Fx", "=", RowBox[{"Round", "[", RowBox[{ RowBox[{"F", "[", "x", "]"}], ",", RowBox[{"10", "^", RowBox[{"(", RowBox[{"-", "accuracy"}], ")"}]}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"max", "=", RowBox[{"Max", "[", RowBox[{"Fx", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Fx", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], "==", "max"}], ",", "1", ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}], ",", RowBox[{"{", RowBox[{"p", ",", RowBox[{ RowBox[{"Dimensions", "[", "x", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.492771607389555*^9, 3.492771615170744*^9}, { 3.4927716584830236`*^9, 3.4927716977194433`*^9}, {3.4927717440460577`*^9, 3.492771748722782*^9}, {3.4927720951409073`*^9, 3.4927722986335154`*^9}, { 3.492772637460725*^9, 3.492772685680061*^9}, {3.492772787927085*^9, 3.4927728425055647`*^9}, {3.492772877345662*^9, 3.4927728982056575`*^9}, { 3.4927729334263024`*^9, 3.492773060969701*^9}, {3.492773106665408*^9, 3.4927731145867987`*^9}, {3.492773264272035*^9, 3.4927732651232595`*^9}, { 3.492773529042757*^9, 3.492773589129157*^9}, {3.492773651989546*^9, 3.492773657367278*^9}, {3.492810187294242*^9, 3.492810189146906*^9}, 3.492812651587722*^9, {3.50798130105005*^9, 3.507981301372611*^9}, { 3.508769607818768*^9, 3.508769638583005*^9}, {3.5087697145822864`*^9, 3.5087697191388383`*^9}, {3.508783530267227*^9, 3.5087835556136737`*^9}, { 3.5087838134744596`*^9, 3.508783813664733*^9}, {3.5087841208414993`*^9, 3.508784126599779*^9}, {3.508784194968088*^9, 3.5087841954788227`*^9}, { 3.515843252859692*^9, 3.515843253757743*^9}, 3.565002315668596*^9, { 3.568571935954388*^9, 3.56857201790816*^9}}, CellTags->"initcell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"quasiStrictEqQ", "[", RowBox[{"x_", ",", "F_", ",", RowBox[{"accuracy_:", "8"}]}], "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], ">", "0"}], ",", "1", ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", RowBox[{ RowBox[{"Dimensions", "[", "x", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], "==", RowBox[{"bestResponseSet", "[", RowBox[{"x", ",", "F", ",", "accuracy"}], "]"}]}], ",", "True", ",", "False"}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.492771607389555*^9, 3.492771615170744*^9}, { 3.4927716584830236`*^9, 3.4927716977194433`*^9}, {3.4927717440460577`*^9, 3.492771748722782*^9}, {3.4927720951409073`*^9, 3.4927722986335154`*^9}, { 3.492772637460725*^9, 3.492772685680061*^9}, {3.492772787927085*^9, 3.4927728425055647`*^9}, {3.492772877345662*^9, 3.4927728982056575`*^9}, { 3.4927729334263024`*^9, 3.492773060969701*^9}, {3.492773106665408*^9, 3.4927731145867987`*^9}, {3.492773264272035*^9, 3.4927732651232595`*^9}, { 3.492773529042757*^9, 3.492773589129157*^9}, {3.492773651989546*^9, 3.492773657367278*^9}, {3.492810187294242*^9, 3.492810189146906*^9}, 3.492812651587722*^9, {3.5079813067780743`*^9, 3.507981307078506*^9}, { 3.5087679470707293`*^9, 3.508767953039312*^9}, {3.508767996481779*^9, 3.5087680048237743`*^9}, {3.5087680460330305`*^9, 3.5087680873524446`*^9}, 3.5087695150353518`*^9, 3.508769840553424*^9, {3.5087700564939313`*^9, 3.50877007103484*^9}, {3.5087702664858847`*^9, 3.508770287616269*^9}, { 3.5087703782766323`*^9, 3.5087703902838974`*^9}, {3.5087704217491426`*^9, 3.50877044757628*^9}, {3.5087704895466304`*^9, 3.5087705280620127`*^9}, { 3.5087707114857635`*^9, 3.508770761177216*^9}, {3.5087707918613377`*^9, 3.5087708187199583`*^9}, 3.5087709119840655`*^9, {3.508771159790394*^9, 3.5087711640965853`*^9}, {3.5087835827226543`*^9, 3.5087836053251553`*^9}, {3.508783660234111*^9, 3.5087836792814994`*^9}, { 3.5087838015873666`*^9, 3.5087838018777843`*^9}, 3.515843256474899*^9, 3.565002317194565*^9, 3.565002419653941*^9, {3.568572065572681*^9, 3.568572099079215*^9}}, CellTags->"initcell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"nashEqQ", "[", RowBox[{"x_", ",", "F_", ",", RowBox[{"accuracy_:", "8"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "BRS", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"BRS", "=", RowBox[{"bestResponseSet", "[", RowBox[{"x", ",", "F", ",", "accuracy"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Total", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Total", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], ">", "0"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"BRS", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], "==", "1"}], ",", "1", ",", "0"}], "]"}], ",", "1"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], "]"}], "==", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", "1", ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", RowBox[{ RowBox[{"Dimensions", "[", "x", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], "]"}], "==", RowBox[{ RowBox[{"Dimensions", "[", "x", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", "True", ",", "False"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.492771607389555*^9, 3.492771615170744*^9}, { 3.4927716584830236`*^9, 3.4927716977194433`*^9}, {3.4927717440460577`*^9, 3.492771748722782*^9}, {3.4927720951409073`*^9, 3.4927722986335154`*^9}, { 3.492772637460725*^9, 3.492772685680061*^9}, {3.492772787927085*^9, 3.4927728425055647`*^9}, {3.492772877345662*^9, 3.4927728982056575`*^9}, { 3.4927729334263024`*^9, 3.492773060969701*^9}, {3.492773106665408*^9, 3.4927731145867987`*^9}, {3.492773264272035*^9, 3.4927732651232595`*^9}, { 3.492773529042757*^9, 3.492773589129157*^9}, {3.492773651989546*^9, 3.492773657367278*^9}, {3.492810187294242*^9, 3.492810189146906*^9}, 3.492812651587722*^9, {3.5079813067780743`*^9, 3.507981307078506*^9}, { 3.5087679470707293`*^9, 3.508767953039312*^9}, {3.508767996481779*^9, 3.5087680048237743`*^9}, {3.5087680460330305`*^9, 3.5087680873524446`*^9}, 3.5087695150353518`*^9, 3.508769840553424*^9, {3.5087700564939313`*^9, 3.50877007103484*^9}, {3.5087702664858847`*^9, 3.508770287616269*^9}, { 3.5087703782766323`*^9, 3.5087703902838974`*^9}, {3.5087704217491426`*^9, 3.50877044757628*^9}, {3.5087704895466304`*^9, 3.5087705280620127`*^9}, { 3.5087707114857635`*^9, 3.508770761177216*^9}, {3.5087707918613377`*^9, 3.5087708187199583`*^9}, {3.5087709119840655`*^9, 3.5087709456725073`*^9}, {3.5087711546930637`*^9, 3.5087711571866493`*^9}, {3.5087835930975733`*^9, 3.5087836084596624`*^9}, {3.5087836483570323`*^9, 3.5087836499192786`*^9}, {3.508783684819463*^9, 3.508783687433221*^9}, { 3.5087838182513285`*^9, 3.5087838184416018`*^9}, 3.5158432580919914`*^9, 3.565002318873617*^9, 3.565002482480643*^9, {3.568572166520815*^9, 3.568572180758783*^9}, {3.56857225919258*^9, 3.568572327230462*^9}, { 3.568572394428983*^9, 3.568572497804054*^9}}, CellTags->"initcell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"variationalIneqCheck", "[", RowBox[{"x_", ",", "support_", ",", "Fx_", ",", RowBox[{"variant_:", "\"\\""}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"j", ",", "dim", ",", "flag"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"flag", "=", "True"}], ";", "\[IndentingNewLine]", RowBox[{"dim", "=", RowBox[{ RowBox[{"Dimensions", "[", "x", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "<=", "dim"}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"support", "[", RowBox[{"[", "j", "]"}], "]"}], "==", "0"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"variant", "==", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"flag", "=", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"x", "-", RowBox[{"UnitVector", "[", RowBox[{"dim", ",", "j"}], "]"}]}], ")"}], ".", "Fx"}], ">", "0"}]}], ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"flag", "=", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"x", "-", RowBox[{"UnitVector", "[", RowBox[{"dim", ",", "j"}], "]"}]}], ")"}], ".", "Fx"}], ">=", "0"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"Not", "[", "flag", "]"}], ",", RowBox[{"Break", "[", "]"}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", "flag"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.480859755914381*^9, 3.480859803086256*^9}, { 3.4927384949225636`*^9, 3.4927384965649247`*^9}, {3.492738611690467*^9, 3.492738618640461*^9}, {3.4927389969340396`*^9, 3.492739202284768*^9}, { 3.492739241991864*^9, 3.4927392776030703`*^9}, {3.4927393098294096`*^9, 3.492739365639661*^9}, {3.49273965990279*^9, 3.4927398218055954`*^9}, { 3.4927401200143986`*^9, 3.4927401332634497`*^9}, {3.4927402656037455`*^9, 3.4927402715623136`*^9}, {3.4927403242380576`*^9, 3.4927403915748835`*^9}, {3.492740424862749*^9, 3.4927404981681566`*^9}, { 3.4927410839003983`*^9, 3.4927411585076785`*^9}, {3.49274119194576*^9, 3.4927412457331023`*^9}, {3.4927414952418785`*^9, 3.49274154670588*^9}, { 3.4927415926018753`*^9, 3.492741811536688*^9}, {3.4927737123463345`*^9, 3.49277372551527*^9}, {3.492773790318453*^9, 3.4927739962445602`*^9}, { 3.492774040337963*^9, 3.492774047878806*^9}, {3.492774122205683*^9, 3.4927741233172817`*^9}, {3.4928030379840384`*^9, 3.492803080354965*^9}, { 3.4928031328905077`*^9, 3.4928031330707664`*^9}, {3.492803206506362*^9, 3.492803211894109*^9}, {3.492809882485949*^9, 3.4928099376552787`*^9}, { 3.492811854701856*^9, 3.4928118613414035`*^9}, {3.4928231607942867`*^9, 3.492823209934947*^9}, {3.4928254702951856`*^9, 3.492825474701522*^9}, { 3.4928255099121523`*^9, 3.492825554316002*^9}, 3.4928255864321823`*^9, { 3.493118619884822*^9, 3.4931187334845266`*^9}, 3.493118768437043*^9, { 3.493118806389835*^9, 3.4931188168979745`*^9}, {3.493118914786354*^9, 3.493118932785063*^9}, {3.493118963268123*^9, 3.4931190782962537`*^9}, { 3.493119135718641*^9, 3.493119230732557*^9}, {3.493119393705306*^9, 3.493119407476181*^9}, {3.493119458089608*^9, 3.4931194726242003`*^9}, { 3.4931195670718007`*^9, 3.4931195763050776`*^9}, {3.4931197496042695`*^9, 3.493119835107217*^9}, {3.4931198689659033`*^9, 3.493119924936385*^9}, { 3.493119980546348*^9, 3.4931200701351705`*^9}, {3.4931202061607656`*^9, 3.493120616881353*^9}, {3.493120701452961*^9, 3.4931207637124853`*^9}, { 3.4931282185219755`*^9, 3.493128397228943*^9}, {3.4931284369160104`*^9, 3.493128503772145*^9}, {3.49312859072718*^9, 3.493128596886036*^9}, { 3.4931290508788457`*^9, 3.4931290743125415`*^9}, 3.493129434640668*^9, { 3.493129477872833*^9, 3.493129498562583*^9}, {3.493129564747753*^9, 3.4931295767750473`*^9}, {3.493129828607164*^9, 3.4931300776552773`*^9}, { 3.4931301655416517`*^9, 3.493130375173087*^9}, {3.4931305681706038`*^9, 3.4931308477325945`*^9}, {3.493148731735653*^9, 3.493148732086157*^9}, { 3.4931488597597427`*^9, 3.4931488678513775`*^9}, {3.493149443539176*^9, 3.4931494727812243`*^9}, {3.493149512818795*^9, 3.493149540829072*^9}, { 3.4931496837746177`*^9, 3.493149709141093*^9}, {3.49314977386416*^9, 3.4931499187324705`*^9}, {3.4931499502477875`*^9, 3.4931499934198656`*^9}, {3.4931500737353535`*^9, 3.493150080635275*^9}, { 3.4931534301115856`*^9, 3.4931534434908237`*^9}, {3.4931757142108655`*^9, 3.4931757245757694`*^9}, {3.493177091831787*^9, 3.493177118460077*^9}, { 3.4931774631457105`*^9, 3.493177474371853*^9}, {3.4931784287642016`*^9, 3.4931785281521826`*^9}, {3.4931785963502464`*^9, 3.493178609358952*^9}, { 3.4931787224115133`*^9, 3.4931787226718884`*^9}, {3.493178759995557*^9, 3.493178835594262*^9}, {3.4931788852156143`*^9, 3.493178933475008*^9}, { 3.493178964860138*^9, 3.4931789666827583`*^9}, {3.4931790169049745`*^9, 3.493179023484435*^9}, {3.4931790644733744`*^9, 3.493179065785261*^9}, { 3.493179268286443*^9, 3.4931792911092606`*^9}, {3.493179333149712*^9, 3.493179343925206*^9}, {3.4931794598418865`*^9, 3.493179465570123*^9}, { 3.4931795568513794`*^9, 3.4931795835697985`*^9}, {3.493210770288602*^9, 3.4932107765826526`*^9}, {3.493210808037883*^9, 3.493210963932048*^9}, { 3.493210999187743*^9, 3.4932110399864087`*^9}, {3.4932116965955663`*^9, 3.4932117923132014`*^9}, {3.4932119627332535`*^9, 3.4932119926562805`*^9}, {3.4932122278644934`*^9, 3.4932122502616987`*^9}, {3.4932123411874437`*^9, 3.4932123940784974`*^9}, {3.4932124784247813`*^9, 3.4932125080173335`*^9}, {3.493212607445304*^9, 3.493212777399686*^9}, { 3.4932128346169605`*^9, 3.4932128771130667`*^9}, {3.4932129254225326`*^9, 3.4932129311307406`*^9}, {3.493212964959384*^9, 3.4932130115413656`*^9}, { 3.4932130509280005`*^9, 3.493213060451695*^9}, {3.493213093784625*^9, 3.493213141252881*^9}, {3.4932304372995567`*^9, 3.493230446362991*^9}, { 3.4932305116095705`*^9, 3.4932305121461644`*^9}, {3.4932305741978664`*^9, 3.4932306014590936`*^9}, {3.4932307456320677`*^9, 3.493230773878895*^9}, { 3.4932308296086855`*^9, 3.493230885292202*^9}, {3.4932309584957905`*^9, 3.4932311120825996`*^9}, {3.493231155655254*^9, 3.493231177366473*^9}, { 3.4932313170072665`*^9, 3.4932313337112856`*^9}, {3.4932313767131195`*^9, 3.4932304833349857`*^9}, {3.493231867004605*^9, 3.4932318932022753`*^9}, { 3.4932322080850544`*^9, 3.493232228183955*^9}, {3.493232260660654*^9, 3.4932322707852125`*^9}, {3.4932695180153246`*^9, 3.4932695197378016`*^9}, {3.4932696938081026`*^9, 3.4932697581105647`*^9}, {3.493269851174384*^9, 3.493269852356083*^9}, { 3.4932702736118193`*^9, 3.49327031849636*^9}, {3.4933779894139757`*^9, 3.4933779990177855`*^9}, {3.4933781126912403`*^9, 3.4933783242854977`*^9}, {3.4933784533210416`*^9, 3.49337856959824*^9}, { 3.4933786279120913`*^9, 3.493378646759192*^9}, {3.4933786965007167`*^9, 3.493378874456605*^9}, {3.4934031443286133`*^9, 3.493403186919856*^9}, { 3.493403217784237*^9, 3.4934032211691046`*^9}, {3.507402745162653*^9, 3.5074028861954484`*^9}, {3.507403078497032*^9, 3.5074030958019156`*^9}, { 3.5074034271130886`*^9, 3.5074034272933474`*^9}, {3.5074038088871202`*^9, 3.507403893628973*^9}, {3.507404918137347*^9, 3.507404945646904*^9}, { 3.5074052694725423`*^9, 3.507405271235077*^9}, {3.5074053554122186`*^9, 3.507405356356061*^9}, {3.5074054221171026`*^9, 3.5074055518536544`*^9}, { 3.5074056108384705`*^9, 3.5074056251089907`*^9}, {3.50740658809383*^9, 3.5074065896160192`*^9}, {3.5074067052923536`*^9, 3.507406741425291*^9}, { 3.5074067717898226`*^9, 3.507406772221687*^9}, {3.5074068130824156`*^9, 3.507406897814254*^9}, {3.507407086004859*^9, 3.507407086765953*^9}, { 3.507407124059579*^9, 3.5074071262427177`*^9}, {3.507407358852262*^9, 3.50740737056911*^9}, {3.507407409905673*^9, 3.5074074568631945`*^9}, { 3.507407571798464*^9, 3.5074076550381565`*^9}, {3.507407705864667*^9, 3.507407706034202*^9}, {3.5074077532844954`*^9, 3.507407761576419*^9}, { 3.5074080777750683`*^9, 3.507408202304132*^9}, {3.507408900382826*^9, 3.507408948301892*^9}, {3.507408989090543*^9, 3.507409019364074*^9}, { 3.507409077217263*^9, 3.5074090988383527`*^9}, {3.507409164592903*^9, 3.5074091925030355`*^9}, {3.5074092466772604`*^9, 3.507409294614933*^9}, 3.5074093327497683`*^9, {3.507409415789173*^9, 3.507409551824783*^9}, 3.5074095885676165`*^9, {3.5074096370373125`*^9, 3.5074096425252037`*^9}, { 3.507409699229843*^9, 3.50740970357926*^9}, {3.507409811182789*^9, 3.5074098754151506`*^9}, {3.5074099165442915`*^9, 3.5074099402183332`*^9}, {3.5074100172591124`*^9, 3.507410090181966*^9}, { 3.507410135379363*^9, 3.5074101366101756`*^9}, {3.507410199155735*^9, 3.5074102406153507`*^9}, {3.507410307341298*^9, 3.5074104113459167`*^9}, { 3.5074104942715235`*^9, 3.507410494735777*^9}, {3.507410673978632*^9, 3.5074107008072095`*^9}, {3.5074107351065297`*^9, 3.507410761704776*^9}, { 3.507410800760936*^9, 3.507410828600968*^9}, {3.5074108722537374`*^9, 3.5074109060923953`*^9}, {3.5074109378676157`*^9, 3.507410966274177*^9}, { 3.507411014473307*^9, 3.5074110213632145`*^9}, {3.5074111192840176`*^9, 3.5074111715291424`*^9}, 3.5074133137945113`*^9, {3.507429697020052*^9, 3.507429697580858*^9}, {3.5074297563653865`*^9, 3.507429758258108*^9}, { 3.5074297983457513`*^9, 3.5074298011798267`*^9}, {3.5074302419737926`*^9, 3.507430317051749*^9}, {3.5074304835912213`*^9, 3.5074305171795187`*^9}, { 3.5074305749225492`*^9, 3.507430616902914*^9}, {3.507430714152753*^9, 3.5074307330799685`*^9}, {3.5074308407848406`*^9, 3.507430845671868*^9}, { 3.5074309085622997`*^9, 3.5074309864469614`*^9}, {3.5074310257058115`*^9, 3.507431100753725*^9}, {3.5074312094629297`*^9, 3.5074312147805758`*^9}, { 3.507431267666622*^9, 3.507431283038726*^9}, {3.507431334582843*^9, 3.507431366969413*^9}, {3.50743145062971*^9, 3.507431453644045*^9}, { 3.507431526639006*^9, 3.507431533038208*^9}, 3.5074315770114384`*^9, { 3.5074317413877997`*^9, 3.507431752013078*^9}, {3.507431799901939*^9, 3.5074318517064304`*^9}, {3.507431885174555*^9, 3.507431888769725*^9}, { 3.507432021355441*^9, 3.5074320249906683`*^9}, {3.507432062104035*^9, 3.5074321689576826`*^9}, {3.5074322979832125`*^9, 3.5074323036713915`*^9}, {3.5074323375132103`*^9, 3.5074323409217577`*^9}, {3.5074324216360846`*^9, 3.507432436477425*^9}, { 3.507432483284731*^9, 3.507432485507928*^9}, {3.507432546425523*^9, 3.507432549029267*^9}, {3.507432612851038*^9, 3.507432634982862*^9}, { 3.5074326983539853`*^9, 3.507432707567233*^9}, {3.5074327552958636`*^9, 3.507432783596558*^9}, {3.507433759623076*^9, 3.5074338199197783`*^9}, { 3.507433862240633*^9, 3.507433883771593*^9}, {3.5074339344644856`*^9, 3.5074339465919237`*^9}, {3.5074339992276106`*^9, 3.507434036771596*^9}, { 3.507434072231654*^9, 3.5074340727125945`*^9}, {3.507434190978402*^9, 3.507434197718094*^9}, {3.507434253338071*^9, 3.50743425786458*^9}, { 3.507434534136908*^9, 3.507434645737382*^9}, {3.5074347427068167`*^9, 3.5074349673498373`*^9}, {3.5074350329141145`*^9, 3.5074351091437273`*^9}, {3.5074351391668987`*^9, 3.507435139927993*^9}, { 3.5074351839813385`*^9, 3.50743519147211*^9}, 3.5074352393008842`*^9, { 3.507435376419031*^9, 3.5074353767134867`*^9}, 3.507435505518754*^9, { 3.5074355408796005`*^9, 3.507435634384053*^9}, {3.50743570470517*^9, 3.5074357228612776`*^9}, {3.5074721547880163`*^9, 3.5074721555991826`*^9}, {3.5079092010115876`*^9, 3.5079092063492627`*^9}, {3.5079093533023605`*^9, 3.5079093535627356`*^9}, {3.507981461921159*^9, 3.5079814846939044`*^9}, { 3.5079853078814325`*^9, 3.5079853472680683`*^9}, {3.5130124616650877`*^9, 3.5130124664419565`*^9}, {3.5130129969447823`*^9, 3.513013032646118*^9}, { 3.513013247104494*^9, 3.513013249417821*^9}, {3.513013398752554*^9, 3.5130134215152845`*^9}, {3.513013484485832*^9, 3.5130134890523987`*^9}, { 3.5130184917959905`*^9, 3.5130184935785537`*^9}, {3.5130185260452385`*^9, 3.513018537281395*^9}, {3.5130185854506593`*^9, 3.5130186205210876`*^9}, 3.565002767446707*^9, {3.568828084876328*^9, 3.568828107203159*^9}, { 3.568828170480275*^9, 3.568828189437389*^9}, {3.569758200559709*^9, 3.569758237507665*^9}}, CellTags->"initcell"] }, Closed]], Cell[CellGroupData[{ Cell["Differential Equations Routines", "Subsubsection", CellChangeTimes->{{3.4927035476118064`*^9, 3.4927035620826144`*^9}, { 3.492812547197616*^9, 3.4928125521647587`*^9}, {3.5586450187563486`*^9, 3.5586450259217577`*^9}}, CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{"Protect", "[", "Xt", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"pattern", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"__", "?", "NumberQ"}], "}"}], "..."}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"X", "[", "t_", "]"}], ":=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "result", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"result", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Xt", "[", "p", "]"}], "[", "j", "]"}], "[", "t", "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}], "-", "1"}]}], "}"}]}], "]"}]}], ";", RowBox[{"Append", "[", RowBox[{"result", ",", RowBox[{"1", "-", RowBox[{"Total", "[", "result", "]"}]}]}], "]"}]}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.492685876870861*^9, 3.4926859140242853`*^9}, { 3.4926859750720673`*^9, 3.4926859760634933`*^9}, 3.4926954200431075`*^9, { 3.4926956840727634`*^9, 3.4926957523168793`*^9}, {3.492695931032943*^9, 3.4926959334363985`*^9}, {3.4926959739346323`*^9, 3.4926960022052836`*^9}, {3.492818553689595*^9, 3.492818572216235*^9}, 3.493129143512046*^9, {3.539723825865969*^9, 3.539723860040309*^9}, { 3.5586249363598814`*^9, 3.558624956771049*^9}, {3.5586251901313963`*^9, 3.558625273367157*^9}, {3.5586253240880585`*^9, 3.558625382085376*^9}, { 3.5586254234637423`*^9, 3.558625466921228*^9}, {3.558625501241191*^9, 3.558625508710618*^9}, {3.5586259170309725`*^9, 3.55862591751*^9}, { 3.5586386315110188`*^9, 3.558638651165143*^9}, {3.5586388597080708`*^9, 3.5586388830474057`*^9}, 3.5586389191654716`*^9, {3.5586389660761547`*^9, 3.5586390191321898`*^9}, {3.5586442349195156`*^9, 3.5586442358795705`*^9}, {3.558644572823842*^9, 3.558644573381874*^9}, 3.558644753106154*^9, {3.5650011736184*^9, 3.565001175089341*^9}, { 3.568541760917001*^9, 3.568541800917922*^9}, {3.568541894025357*^9, 3.5685419470183*^9}, {3.569752945773311*^9, 3.569753022910902*^9}, { 3.580640888602146*^9, 3.580640890402175*^9}}, CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"scalarDyn", "[", RowBox[{ RowBox[{"p_", "?", "NumericQ"}], ",", RowBox[{"j_", "?", "NumericQ"}], ",", RowBox[{"x", ":", "pattern"}], ",", "F_"}], "]"}], ":=", RowBox[{ RowBox[{"dyn", "[", RowBox[{"x", ",", "F"}], "]"}], "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"difEqSol", "[", RowBox[{"x_", ",", "dyn_", ",", "F_", ",", "t0_", ",", "T_", ",", RowBox[{"condition_:", "\"\\""}], ",", RowBox[{"altopt_:", "False"}], ",", RowBox[{"accuracy_:", "10"}], ",", RowBox[{"maxsteps_:", "10000"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "cond", ",", "method", ",", "ms", ",", "solvedelayed", ",", "d"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Which", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"condition", "==", "\"\\""}], " ", ",", RowBox[{ RowBox[{"cond", "=", "t0"}], ";"}], ",", "\[IndentingNewLine]", RowBox[{"condition", "==", "\"\\""}], " ", ",", RowBox[{ RowBox[{"cond", "=", "T"}], ";"}], ",", "\[IndentingNewLine]", "True", ",", RowBox[{ RowBox[{"cond", "=", "condition"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{"altopt", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"method", "=", "\"\\""}], ";", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"method", "=", "\"\\""}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"method", "=", "\"\\""}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"method", "=", "\"\\""}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{"ms", "=", RowBox[{ RowBox[{"10", "/", "maxsteps"}], "*", RowBox[{"(", RowBox[{"T", "-", "t0"}], ")"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"solvedelayed", "=", "False"}], ";", "\[IndentingNewLine]", RowBox[{"d", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"scalarDyn", "[", RowBox[{"p", ",", "j", ",", RowBox[{"X", "[", "t", "]"}], ",", "F"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"method", "=", "\"\\""}], ";", "\[IndentingNewLine]", RowBox[{"ms", "=", "Automatic"}], ";", "\[IndentingNewLine]", RowBox[{"solvedelayed", "=", "False"}], ";", "\[IndentingNewLine]", RowBox[{"d", "=", RowBox[{"dyn", "[", RowBox[{ RowBox[{"X", "[", "t", "]"}], ",", "F"}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"NDSolve", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Flatten", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"Xt", "[", "p", "]"}], "[", "j", "]"}], "'"}], "[", "t", "]"}], "\[Equal]", RowBox[{"d", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Xt", "[", "p", "]"}], "[", "j", "]"}], "[", "cond", "]"}], "\[Equal]", RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}], "-", "1"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], ",", "1"}], "]"}], "\[IndentingNewLine]", ",", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Xt", "[", "p", "]"}], "[", "j", "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}], "-", "1"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"t", ",", "t0", ",", "T"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"AccuracyGoal", "\[Rule]", "accuracy"}], ",", RowBox[{"PrecisionGoal", "->", "accuracy"}], ",", "\[IndentingNewLine]", RowBox[{"Method", "->", "method"}], ",", "\[IndentingNewLine]", RowBox[{"MaxSteps", "->", "maxsteps"}], ",", "\[IndentingNewLine]", RowBox[{"MaxStepSize", "\[Rule]", "ms"}], ",", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"MaxStepFraction", "->", "ms"}], ","}], "*)"}], "\[IndentingNewLine]", RowBox[{"SolveDelayed", "->", "solvedelayed"}]}], "\[IndentingNewLine]", "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.492685876870861*^9, 3.4926859140242853`*^9}, { 3.4926859750720673`*^9, 3.4926859760634933`*^9}, 3.4926954200431075`*^9, { 3.4926956840727634`*^9, 3.4926957523168793`*^9}, {3.492695931032943*^9, 3.4926959334363985`*^9}, {3.4926959739346323`*^9, 3.4926960022052836`*^9}, {3.492818553689595*^9, 3.492818572216235*^9}, 3.493129143512046*^9, {3.507930806471298*^9, 3.5079308195901623`*^9}, { 3.507930909479417*^9, 3.507930944329529*^9}, {3.507931084591215*^9, 3.5079311356245975`*^9}, 3.5079312172019*^9, {3.5079312571893992`*^9, 3.507931263949119*^9}, 3.5079315007195787`*^9, 3.507931605870778*^9, { 3.5079474930948815`*^9, 3.507947511381176*^9}, {3.507951869241627*^9, 3.5079518744991875`*^9}, {3.507981391707519*^9, 3.5079813945215654`*^9}, { 3.5079830583416986`*^9, 3.5079830583416986`*^9}, {3.507983372698722*^9, 3.5079833727137437`*^9}, {3.5080185564216337`*^9, 3.508018564212837*^9}, { 3.5080185977009907`*^9, 3.5080186050816035`*^9}, {3.5080187812148705`*^9, 3.5080189213363557`*^9}, {3.508021289782013*^9, 3.5080213236106567`*^9}, 3.508021400801652*^9, {3.508021495818279*^9, 3.5080215019170485`*^9}, { 3.5160388141421576`*^9, 3.516038819696475*^9}, {3.516038859102729*^9, 3.516038859440748*^9}, 3.516039055351954*^9, 3.5160391207526946`*^9, 3.5160392407855597`*^9, 3.5160393857108493`*^9, {3.5160466441200066`*^9, 3.516046647283188*^9}, {3.5160477754117126`*^9, 3.5160478161390424`*^9}, { 3.516047878392603*^9, 3.5160478843099413`*^9}, {3.5162146630956945`*^9, 3.516214773653018*^9}, {3.516214850752428*^9, 3.516214893887895*^9}, { 3.516215007372386*^9, 3.516215019699091*^9}, {3.5162164391022763`*^9, 3.5162164837668314`*^9}, 3.516216776228559*^9, 3.516216930379376*^9, { 3.5162170706253977`*^9, 3.5162170714334435`*^9}, {3.5162177849492545`*^9, 3.516217852017091*^9}, {3.516217924719249*^9, 3.5162179438743443`*^9}, { 3.5162180843183775`*^9, 3.5162181927785807`*^9}, {3.5162189157239313`*^9, 3.5162189191591277`*^9}, {3.516219222997506*^9, 3.516219226946732*^9}, { 3.5162192687931256`*^9, 3.5162192778466434`*^9}, {3.516274225802577*^9, 3.5162742315189037`*^9}, {3.516275100527608*^9, 3.516275106072925*^9}, { 3.516275218491355*^9, 3.516275244329833*^9}, 3.516275442277155*^9, 3.5162756364542613`*^9, {3.5162761511166983`*^9, 3.5162761519057436`*^9}, { 3.516276214629331*^9, 3.516276215523382*^9}, {3.51627624573411*^9, 3.5162762999032087`*^9}, {3.516386025383442*^9, 3.516386027141543*^9}, { 3.516386064604686*^9, 3.5163860651337156`*^9}, {3.516386109721266*^9, 3.5163862498682823`*^9}, {3.5163863031643305`*^9, 3.516386316727106*^9}, 3.5163863839769526`*^9, {3.5163864969164124`*^9, 3.516386586768552*^9}, { 3.5164184284257903`*^9, 3.516418431607972*^9}, {3.521153098505105*^9, 3.5211531184532456`*^9}, 3.5211531943995895`*^9, {3.5211532825356307`*^9, 3.5211533236019793`*^9}, {3.5211533601620708`*^9, 3.521153405857684*^9}, { 3.521637043319827*^9, 3.521637062411399*^9}, {3.5216370942592907`*^9, 3.5216371178638105`*^9}, {3.558620351021615*^9, 3.558620418174456*^9}, { 3.558620870583332*^9, 3.5586208987869453`*^9}, {3.5586247744956236`*^9, 3.55862477513666*^9}, {3.558624840768414*^9, 3.5586248490108857`*^9}, { 3.55862491273253*^9, 3.5586249205409765`*^9}, {3.5586257653902993`*^9, 3.558625768987505*^9}, {3.558637784207556*^9, 3.5586377888658223`*^9}, { 3.5586382010593987`*^9, 3.558638259716753*^9}, {3.5586382976689243`*^9, 3.5586383114947147`*^9}, 3.5586384280453815`*^9, {3.558638511088131*^9, 3.5586385211067038`*^9}, {3.55863866930418*^9, 3.558638695980706*^9}, { 3.5586390214533224`*^9, 3.558639028325715*^9}, {3.5586442902416797`*^9, 3.5586442926708183`*^9}, {3.5586481853404665`*^9, 3.5586482770597124`*^9}, {3.565000968711419*^9, 3.565000969684009*^9}, 3.565001036214117*^9, {3.568542105700873*^9, 3.568542113280424*^9}, { 3.568542146827201*^9, 3.568542172935487*^9}, {3.568542265310028*^9, 3.568542295061872*^9}, {3.568542362188522*^9, 3.568542363876217*^9}, 3.568542437978345*^9, {3.568542579943589*^9, 3.568542580204728*^9}, { 3.568542619194094*^9, 3.5685427065336*^9}, {3.56854293192797*^9, 3.568542945092706*^9}, {3.568543256338675*^9, 3.568543256579353*^9}, { 3.569671848556508*^9, 3.569671853030525*^9}, {3.56967227646599*^9, 3.569672280229266*^9}, {3.569752406411822*^9, 3.569752407065286*^9}, { 3.569752457444502*^9, 3.569752457861936*^9}, {3.569757539002903*^9, 3.569757549423612*^9}, {3.569856373550456*^9, 3.569856378909003*^9}, { 3.569856412826683*^9, 3.569856416112827*^9}, {3.572118065052033*^9, 3.572118070028603*^9}, {3.572172979985382*^9, 3.57217299051662*^9}, { 3.580640556287066*^9, 3.580640563323592*^9}, {3.580641869922801*^9, 3.580641871727995*^9}, {3.580642332899635*^9, 3.580642341369067*^9}, { 3.580644611512535*^9, 3.580644611692108*^9}, 3.580644921483152*^9}, CellTags->"initcell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"difEqAdvance", "[", RowBox[{"x_", ",", "dyn_", ",", "F_", ",", "T_", ",", RowBox[{"altopt_:", "False"}], ",", RowBox[{"accuracy_:", "10"}], ",", RowBox[{"maxsteps_:", "10000"}], ",", RowBox[{"method_:", "\"\\""}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"maxstepsize", ",", "result", ",", "r"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"method", "=", "\"\\""}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"method", "=", "\"\\""}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"method", "=", "\"\\""}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"result", "=", RowBox[{"difEqSol", "[", RowBox[{ "x", ",", "dyn", ",", "F", ",", "0", ",", "T", ",", "\"\\"", ",", "altopt", ",", "accuracy", ",", "maxsteps"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", "\[IndentingNewLine]", RowBox[{ RowBox[{"result", "=", RowBox[{"NDSolve", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "d", "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"d", "=", RowBox[{"dyn", "[", RowBox[{ RowBox[{"X", "[", "t", "]"}], ",", "F"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Flatten", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"Xt", "[", "p", "]"}], "[", "j", "]"}], "'"}], "[", "t", "]"}], "\[Equal]", RowBox[{"d", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}]}], ",", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Xt", "[", "p", "]"}], "[", "j", "]"}], "[", "0", "]"}], "\[Equal]", RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}], "-", "1"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], ",", "1"}], "]"}]}]}], "\[IndentingNewLine]", "]"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Xt", "[", "p", "]"}], "[", "j", "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}], "-", "1"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], "]"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"t", ",", "0", ",", "T"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"AccuracyGoal", "\[Rule]", "accuracy"}], ",", RowBox[{"PrecisionGoal", "->", "Infinity"}], ",", "\[IndentingNewLine]", RowBox[{"Method", "->", "method"}], ",", "\[IndentingNewLine]", RowBox[{"MaxSteps", "->", "maxsteps"}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", "*)"}], "\[IndentingNewLine]", RowBox[{"result", "=", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"Drop", "[", RowBox[{ RowBox[{ RowBox[{"X", "[", "T", "]"}], "[", RowBox[{"[", "p", "]"}], "]"}], ",", RowBox[{"-", "1"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], "]"}], "/.", "\[InvisibleSpace]", "result"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"r", "=", RowBox[{"result", "[", RowBox[{"[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"p", "==", "1"}], ",", "0", ",", RowBox[{"Product", "[", RowBox[{ RowBox[{ RowBox[{"dim", "[", RowBox[{"[", "j", "]"}], "]"}], "-", "1"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"p", "-", "1"}]}], "}"}]}], "]"}]}], "]"}], "+", "1"}], ";;", "\[IndentingNewLine]", RowBox[{"Product", "[", RowBox[{ RowBox[{ RowBox[{"dim", "[", RowBox[{"[", "j", "]"}], "]"}], "-", "1"}], ",", RowBox[{"{", RowBox[{"j", ",", "p"}], "}"}]}], "]"}]}], "\[IndentingNewLine]", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Append", "[", RowBox[{"r", ",", RowBox[{"1", "-", RowBox[{"Total", "[", "r", "]"}]}]}], "]"}]}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.557689825087273*^9, 3.557689829737721*^9}, { 3.55768986090595*^9, 3.557689865115477*^9}, {3.557689933965158*^9, 3.557690051153547*^9}, {3.557690123479296*^9, 3.55769016110612*^9}, 3.557690233504489*^9, {3.557690641320119*^9, 3.557690683533776*^9}, { 3.557690796073244*^9, 3.557691079482815*^9}, {3.557691147449412*^9, 3.557691241809426*^9}, {3.557691280187725*^9, 3.55769134833166*^9}, { 3.557691401406796*^9, 3.557691545567169*^9}, {3.557691576478633*^9, 3.557691578986042*^9}, {3.557691634200618*^9, 3.557691642372945*^9}, { 3.557691679612523*^9, 3.557691695471587*^9}, {3.557691746954067*^9, 3.557692146608407*^9}, {3.557692204077006*^9, 3.557692214218333*^9}, { 3.557692420634619*^9, 3.557692421222586*^9}, {3.557692601129979*^9, 3.557692650976607*^9}, {3.557692693828507*^9, 3.557692819707601*^9}, { 3.557692849848672*^9, 3.557692902527301*^9}, {3.557692995506108*^9, 3.557693041473971*^9}, {3.557693125132984*^9, 3.557693227326541*^9}, { 3.55769326232499*^9, 3.557693268761132*^9}, {3.557693310039918*^9, 3.557693474844129*^9}, {3.55769351122605*^9, 3.55769366017373*^9}, { 3.557693732774461*^9, 3.557693739519095*^9}, 3.557749030400953*^9, { 3.557749108902443*^9, 3.557749129974648*^9}, {3.5577491675747986`*^9, 3.557749168633859*^9}, {3.557749300679412*^9, 3.557749309428912*^9}, { 3.557749470909148*^9, 3.557749474220338*^9}, {3.5577497696942377`*^9, 3.557749774236498*^9}, {3.55792253499592*^9, 3.557922564866593*^9}, { 3.557923155073567*^9, 3.557923162122001*^9}, {3.5586249963503127`*^9, 3.5586250245059233`*^9}, {3.55862507917205*^9, 3.558625114154051*^9}, { 3.5586384680626698`*^9, 3.5586384954362354`*^9}, {3.55863871038053*^9, 3.5586387176429453`*^9}, {3.5586390296037884`*^9, 3.5586390367361965`*^9}, {3.558639818683921*^9, 3.5586398225401416`*^9}, { 3.5586442937538805`*^9, 3.558644363788886*^9}, {3.5586443982218556`*^9, 3.5586444027641153`*^9}, {3.5586448369329486`*^9, 3.5586448376499896`*^9}, 3.565001220039692*^9, {3.56854278097066*^9, 3.56854281507457*^9}, { 3.568542891335227*^9, 3.568542892714209*^9}, {3.568542951795661*^9, 3.568542965047635*^9}, {3.56854300378729*^9, 3.568543022258348*^9}, { 3.568543062373535*^9, 3.568543079602516*^9}, {3.568543118148931*^9, 3.56854312773308*^9}, {3.568543179805218*^9, 3.568543198153083*^9}, { 3.568543492350667*^9, 3.568543507065747*^9}, {3.568543569982729*^9, 3.568543600726138*^9}, {3.568543690309785*^9, 3.568543850629325*^9}, { 3.569667805841669*^9, 3.569667814270804*^9}, {3.569667870189416*^9, 3.569667903742907*^9}, {3.569746527060001*^9, 3.569746528331759*^9}, { 3.569757485214905*^9, 3.569757524374903*^9}, {3.569757626612602*^9, 3.569757682994552*^9}, {3.580641879917307*^9, 3.580641883011975*^9}, 3.580641914304147*^9, {3.580642035544164*^9, 3.580642087316661*^9}, { 3.580642237208419*^9, 3.580642243755934*^9}, {3.580642314375759*^9, 3.580642319555092*^9}, {3.580642388854497*^9, 3.580642397294632*^9}, { 3.580643967202409*^9, 3.580643968104375*^9}, {3.580644527428339*^9, 3.58064453067642*^9}, {3.58064460413854*^9, 3.58064460506679*^9}}, CellTags->"initcell"] }, Closed]], Cell[CellGroupData[{ Cell["Coordinate transformation (for plotting the phase diagram)", \ "Subsubsection", CellChangeTimes->{{3.569746419858425*^9, 3.569746423125254*^9}}, CellTags->"initcell"], Cell[CellGroupData[{ Cell["\<\ simplexToPlane maps points in the simplex to their 3D represetations for \ graphing. planeToSimplex does the reverse.\ \>", "Text", CellChangeTimes->{{3.4927035476118064`*^9, 3.4927035620826144`*^9}, 3.564999378157588*^9, 3.56499945462633*^9, 3.58051147199144*^9}, CellTags->{"initcell", "differentacrossnotebooks"}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"simplexToPlane", "[", "r_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"centerToOrigin", ",", "TA"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"centerToOrigin", "=", RowBox[{"{", RowBox[{ FractionBox["1", "2"], ",", RowBox[{ RowBox[{"-", FractionBox["1", RowBox[{"4", " ", SqrtBox["3"]}]]}], "+", FractionBox[ SqrtBox["3"], "4"]}], ",", FractionBox["1", RowBox[{"2", " ", SqrtBox["6"]}]]}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"TA", "=", TagBox[ RowBox[{ RowBox[{"(", GridBox[{ {"0", RowBox[{"-", FractionBox["1", "2"]}], FractionBox["1", "2"]}, { RowBox[{"-", FractionBox[ SqrtBox["3"], "3"]}], RowBox[{"-", FractionBox[ SqrtBox["3"], "2"]}], RowBox[{"-", FractionBox[ SqrtBox["3"], "2"]}]}, { FractionBox[ SqrtBox["6"], "3"], "0", "0"} }], ")"}], " "}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"TA", ".", RowBox[{"{", RowBox[{ RowBox[{"r", "\[LeftDoubleBracket]", RowBox[{"1", ",", "1"}], "\[RightDoubleBracket]"}], ",", RowBox[{"r", "\[LeftDoubleBracket]", RowBox[{"1", ",", "2"}], "\[RightDoubleBracket]"}], ",", RowBox[{"r", "\[LeftDoubleBracket]", RowBox[{"1", ",", "3"}], "\[RightDoubleBracket]"}]}], "}"}]}], "+", RowBox[{"{", RowBox[{ FractionBox["1", "2"], ",", FractionBox[ SqrtBox["3"], "2"], ",", "0"}], "}"}], " ", "-", "centerToOrigin"}]}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"planeToSimplex", "[", "c_", "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"centerToOrigin", ",", "TA", ",", "reduced"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"centerToOrigin", "=", RowBox[{"{", RowBox[{ FractionBox["1", "2"], ",", RowBox[{ RowBox[{"-", FractionBox["1", RowBox[{"4", " ", SqrtBox["3"]}]]}], "+", FractionBox[ SqrtBox["3"], "4"]}], ",", FractionBox["1", RowBox[{"2", " ", SqrtBox["6"]}]]}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"TA", "=", TagBox[ RowBox[{ RowBox[{"(", GridBox[{ {"0", RowBox[{"-", FractionBox["1", "2"]}], FractionBox["1", "2"]}, { RowBox[{"-", FractionBox[ SqrtBox["3"], "3"]}], RowBox[{"-", FractionBox[ SqrtBox["3"], "2"]}], RowBox[{"-", FractionBox[ SqrtBox["3"], "2"]}]}, { FractionBox[ SqrtBox["6"], "3"], "0", "0"} }], ")"}], " "}], Function[BoxForm`e$, MatrixForm[BoxForm`e$]]]}], ";", "\[IndentingNewLine]", RowBox[{"reduced", "=", RowBox[{ RowBox[{"Inverse", "[", "TA", "]"}], ".", RowBox[{"(", RowBox[{"c", "-", RowBox[{"{", RowBox[{ FractionBox["1", "2"], ",", FractionBox[ SqrtBox["3"], "2"], ",", "0"}], "}"}], "+", "centerToOrigin"}], ")"}]}]}], " ", ";", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"Append", "[", RowBox[{"reduced", ",", RowBox[{"1", "-", RowBox[{"Total", "[", "reduced", "]"}]}]}], "]"}], "}"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input", CellChangeTimes->{ 3.4749178565978994`*^9, {3.4818174361229935`*^9, 3.4818174636325502`*^9}, { 3.4818175843961997`*^9, 3.48181760508595*^9}, {3.507983058266591*^9, 3.5079830583266773`*^9}, {3.5079833726085925`*^9, 3.5079833726686788`*^9}, {3.554559924187413*^9, 3.554559939940249*^9}, { 3.554561856425631*^9, 3.554561856713756*^9}, 3.564999378838288*^9, { 3.564999429725192*^9, 3.56499945592722*^9}, {3.565000328426468*^9, 3.565000430992858*^9}, 3.566818202970769*^9, {3.569416862021677*^9, 3.56941693837489*^9}, {3.572377964326401*^9, 3.572377965659045*^9}, { 3.572378068750168*^9, 3.572378069929169*^9}, {3.572378135230698*^9, 3.572378136396062*^9}, {3.572378175761053*^9, 3.57237817794124*^9}, 3.580474819294896*^9, {3.580475498476001*^9, 3.58047558020721*^9}, { 3.58047577328475*^9, 3.580475919943616*^9}, {3.580475960071121*^9, 3.580475977774707*^9}, {3.580476249321016*^9, 3.58047632954974*^9}, 3.580476624870197*^9, 3.580476889522029*^9, {3.580478618461341*^9, 3.580478625320591*^9}, {3.580478985389603*^9, 3.580478987836834*^9}, 3.580479683946988*^9}, CellTags->{"initcell", "differentacrossnotebooks"}], Cell[BoxData[{ RowBox[{ RowBox[{"simplexCorners", "=", RowBox[{"Tuples", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"UnitVector", "[", RowBox[{ RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}], ",", "j"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"planeCorners", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"simplexToPlane", "[", RowBox[{"simplexCorners", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "simplexCorners", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}], ";"}]}], "Input", CellChangeTimes->{ 3.4749178565978994`*^9, {3.4818174361229935`*^9, 3.4818174636325502`*^9}, { 3.4818175843961997`*^9, 3.48181760508595*^9}, {3.507983058266591*^9, 3.5079830583266773`*^9}, {3.5079833726085925`*^9, 3.5079833726686788`*^9}, {3.554559924187413*^9, 3.554559939940249*^9}, { 3.554561856425631*^9, 3.554561856713756*^9}, 3.564999378838288*^9, { 3.564999429725192*^9, 3.56499945592722*^9}, {3.565000328426468*^9, 3.565000430992858*^9}, 3.566818202970769*^9, {3.569416862021677*^9, 3.56941693837489*^9}, {3.57192090983366*^9, 3.571920982300742*^9}, { 3.572377878901591*^9, 3.572377880082496*^9}, {3.572378158894012*^9, 3.572378181338409*^9}, {3.572378331651023*^9, 3.572378338916473*^9}, { 3.572378401640321*^9, 3.572378416027096*^9}, {3.572378587937379*^9, 3.572378612329389*^9}, 3.580476545276149*^9, {3.580479054906449*^9, 3.580479063938333*^9}, 3.580479446906775*^9, 3.580483547657911*^9, 3.580483621691424*^9}, CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{"plotRegionExtension", "=", ".04"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"simplexPlotRange", "=", RowBox[{"{", RowBox[{ RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"planeCorners", "[", RowBox[{"[", RowBox[{"2", ",", "1"}], "]"}], "]"}], "-", "plotRegionExtension"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"planeCorners", "[", RowBox[{"[", RowBox[{"3", ",", "1"}], "]"}], "]"}], "+", "plotRegionExtension"}]}], "\[IndentingNewLine]", "}"}], ",", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"planeCorners", "[", RowBox[{"[", RowBox[{"2", ",", "2"}], "]"}], "]"}], "-", "plotRegionExtension"}], ",", RowBox[{ RowBox[{"planeCorners", "[", RowBox[{"[", RowBox[{"4", ",", "2"}], "]"}], "]"}], "+", "plotRegionExtension"}]}], "\[IndentingNewLine]", "}"}], ",", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"planeCorners", "[", RowBox[{"[", RowBox[{"2", ",", "3"}], "]"}], "]"}], "-", "plotRegionExtension"}], ",", RowBox[{ RowBox[{"planeCorners", "[", RowBox[{"[", RowBox[{"1", ",", "3"}], "]"}], "]"}], "+", "plotRegionExtension"}]}], "\[IndentingNewLine]", "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"simplexStrategiesPositions", "=", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"planeCorners", "[", RowBox[{"[", "1", "]"}], "]"}], "+", RowBox[{"{", RowBox[{"0", ",", "0", ",", ".03"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"planeCorners", "[", RowBox[{"[", "2", "]"}], "]"}], "+", RowBox[{"{", RowBox[{ RowBox[{"-", ".03"}], ",", "0", ",", RowBox[{"-", ".015"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"planeCorners", "[", RowBox[{"[", "3", "]"}], "]"}], "+", RowBox[{"{", RowBox[{".03", ",", "0", ",", RowBox[{"-", ".015"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"planeCorners", "[", RowBox[{"[", "4", "]"}], "]"}], "+", RowBox[{"{", RowBox[{"0", ",", ".03", ",", RowBox[{"-", ".015"}]}], "}"}]}]}], "\[IndentingNewLine]", "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"simplexLighting", "=", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"planeCorners", "[", RowBox[{"[", "1", "]"}], "]"}], "+", RowBox[{"{", RowBox[{"0", ",", "0", ",", "1"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"planeCorners", "[", RowBox[{"[", "2", "]"}], "]"}], "-", RowBox[{"{", RowBox[{"1", ",", "0", ",", "0"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"planeCorners", "[", RowBox[{"[", "3", "]"}], "]"}], "+", RowBox[{"{", RowBox[{"1", ",", "0", ",", "0"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"planeCorners", "[", RowBox[{"[", "4", "]"}], "]"}], "+", RowBox[{"{", RowBox[{"0", ",", "1", ",", "0"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"simplexToPlane", "[", RowBox[{"{", RowBox[{"{", RowBox[{ RowBox[{"1", "/", "4"}], ",", RowBox[{"1", "/", "4"}], ",", RowBox[{"1", "/", "4"}], ",", RowBox[{"1", "/", "4"}]}], "}"}], "}"}], "]"}]}], "\[IndentingNewLine]", "}"}]}], ";"}]}], "Input", CellChangeTimes->{ 3.4749178565978994`*^9, {3.4818174361229935`*^9, 3.4818174636325502`*^9}, { 3.4818175843961997`*^9, 3.48181760508595*^9}, {3.507983058266591*^9, 3.5079830583266773`*^9}, {3.5079833726085925`*^9, 3.5079833726686788`*^9}, {3.554559924187413*^9, 3.554559939940249*^9}, { 3.554561856425631*^9, 3.554561856713756*^9}, 3.564999378838288*^9, { 3.564999429725192*^9, 3.56499945592722*^9}, {3.565000328426468*^9, 3.565000430992858*^9}, 3.566818202970769*^9, {3.569416862021677*^9, 3.56941693837489*^9}, {3.572377964326401*^9, 3.572377965659045*^9}, { 3.572378068750168*^9, 3.572378069929169*^9}, {3.572378135230698*^9, 3.572378136396062*^9}, {3.572378175761053*^9, 3.57237817794124*^9}, 3.580474819294896*^9, {3.580475498476001*^9, 3.58047558020721*^9}, { 3.58047577328475*^9, 3.580475919943616*^9}, {3.580475960071121*^9, 3.580475977774707*^9}, {3.580476249321016*^9, 3.58047632954974*^9}, 3.580476624870197*^9, 3.580476889522029*^9, {3.580478618461341*^9, 3.580478625320591*^9}, {3.580478985389603*^9, 3.580478987836834*^9}, 3.580479683946988*^9, {3.580483613000404*^9, 3.580483749601128*^9}, { 3.580483779614736*^9, 3.580483871097364*^9}}, CellTags->{"initcell", "differentacrossnotebooks"}] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Custom Graphics Routines", "Subsubsection", CellChangeTimes->{{3.4927035476118064`*^9, 3.4927035620826144`*^9}, { 3.492812547197616*^9, 3.4928125521647587`*^9}, {3.4928128620603666`*^9, 3.4928128997044964`*^9}, {3.493151231640339*^9, 3.4931512369479713`*^9}, { 3.540032679891961*^9, 3.540032690162765*^9}}, CellTags->"initcell"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"arrowHead3D", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"p1_:", RowBox[{"{", RowBox[{"0", ",", "0", ",", "0"}], "}"}]}], ",", RowBox[{"p2_:", RowBox[{"{", RowBox[{"0", ",", "0", ",", "1"}], "}"}]}]}], "}"}], ",", RowBox[{"headSize_:", ".1"}], ",", RowBox[{"headPos_:", "1"}], ",", RowBox[{"headLength_:", "1"}], ",", RowBox[{"eps_:", ".0001"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "norm", "}"}], ",", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"p1", " ", "and", " ", "p2", " ", "are", " ", "3", "D", " ", RowBox[{"points", ".", "They"}], " ", "are", " ", "passed", " ", "as", " ", "a", " ", "list"}], ",", RowBox[{ RowBox[{ RowBox[{ "to", " ", "conform", " ", "with", " ", "the", " ", "version"}], "-", RowBox[{"6", " ", "syntax", " ", "for", " ", RowBox[{"Cylinder", "[", "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"headSize", " ", "is", " ", "absolut"}], ";", "\[IndentingNewLine]", RowBox[{ "headPos", " ", "is", " ", "realtaive", " ", "to", " ", "the", " ", "line", " ", RowBox[{"(", "norm", ")"}]}], ";", "\[IndentingNewLine]", RowBox[{ "headLength", " ", "is", " ", "relative", " ", "to", " ", "the", " ", "headSize", " ", RowBox[{"(", "norm", ")"}]}], ";", "\[IndentingNewLine]", RowBox[{ "headLentgh", " ", "has", " ", "to", " ", "be", " ", "smaller", " ", "than", " ", "headPos"}], ";"}]}], "\[IndentingNewLine]", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"norm", "=", RowBox[{"Norm", "[", RowBox[{"p2", "-", "p1"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"norm", ">", "eps"}], ",", "\[IndentingNewLine]", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"EdgeForm", "[", "]"}], ",", "\[IndentingNewLine]", RowBox[{"GeometricTransformation", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"GraphicsComplex", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", "headLength"}], " ", "}"}], ",", RowBox[{"{", RowBox[{"0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "0"}], "}"}]}], "}"}], ",", RowBox[{"Polygon", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"3", ",", "4", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "2", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "5", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "3", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "2", ",", "4", ",", "3"}], "}"}]}], "}"}], "]"}]}], "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", RowBox[{"Composition", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"TranslationTransform", "[", RowBox[{"p1", "+", RowBox[{ RowBox[{"(", RowBox[{"p2", "-", "p1"}], ")"}], RowBox[{"(", RowBox[{"headPos", "-", RowBox[{"headLength", "*", RowBox[{"headSize", "/", "norm"}]}]}], ")"}]}]}], " ", "]"}], ",", "\[IndentingNewLine]", RowBox[{"Quiet", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"RotationTransform", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"p2", "-", "p1"}]}], "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"RotationMatrix", "::", "degen"}], ",", RowBox[{"RotationTransform", "::", "spln"}]}], "}"}]}], "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", RowBox[{"ScalingTransform", "[", RowBox[{"headSize", " ", RowBox[{"{", RowBox[{"1", ",", "1", ",", "1"}], "}"}]}], "]"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "}"}], "\[IndentingNewLine]", ",", RowBox[{"{", "}"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.5400337717856135`*^9, 3.540033804564776*^9}, { 3.5400338404338307`*^9, 3.5400338681983566`*^9}, {3.5400366449909644`*^9, 3.5400366540251117`*^9}, {3.5400384809591026`*^9, 3.540038482717326*^9}, { 3.540038571626116*^9, 3.540038601082856*^9}, {3.540038644493369*^9, 3.5400386738350945`*^9}, {3.540038710010689*^9, 3.5400387405870714`*^9}, { 3.5400387762841043`*^9, 3.5400387812902403`*^9}, {3.540038817216302*^9, 3.540038844569275*^9}, {3.540038894779151*^9, 3.540038908619909*^9}, { 3.5400389514343452`*^9, 3.5400391020264683`*^9}, {3.5400391482368364`*^9, 3.5400392418207197`*^9}, {3.540039432122885*^9, 3.540039436765475*^9}, { 3.5400395202385745`*^9, 3.5400398081336327`*^9}, {3.540039838807028*^9, 3.5400398782235327`*^9}, {3.5400399173389997`*^9, 3.5400399390002503`*^9}, {3.5400400286681366`*^9, 3.5400400331462054`*^9}, {3.5400400646517057`*^9, 3.5400401689944563`*^9}, {3.540040205797129*^9, 3.5400402155623693`*^9}, { 3.540040245699196*^9, 3.5400402947154207`*^9}, 3.5400407200434303`*^9, { 3.5400478773037868`*^9, 3.5400478879301367`*^9}, {3.540055089960495*^9, 3.540055271083995*^9}, 3.5400553314521604`*^9, {3.5400594704210625`*^9, 3.540059500860803*^9}, {3.54006343336773*^9, 3.54006348616675*^9}, { 3.5400636941826477`*^9, 3.540063696357772*^9}, {3.540063727891576*^9, 3.5400637356520195`*^9}, {3.5400638350777063`*^9, 3.5400638363577795`*^9}, 3.5400643534143534`*^9, 3.565000530146714*^9}, CellTags->{"initcell", "3Dexclusive"}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"arrow3D", "[", RowBox[{ RowBox[{"{", RowBox[{"p1_", ",", "p2_"}], "}"}], ",", RowBox[{"radius_:", ".1"}], ",", RowBox[{"headScale_:", "3"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"p3", ",", "scale2", ",", "norm", ",", RowBox[{"pyramidHeight", "=", "3"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"p1", " ", "and", " ", "p2", " ", "are", " ", "3", "D", " ", RowBox[{"points", ".", "They"}], " ", "are", " ", "passed", " ", "as", " ", "a", " ", "list"}], ",", RowBox[{ RowBox[{ "to", " ", "conform", " ", "with", " ", "the", " ", "version"}], "-", RowBox[{"6", " ", "syntax", " ", "for", " ", RowBox[{"Cylinder", "[", "]"}]}]}]}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"scale2", "=", RowBox[{"headScale", "*", "radius"}]}], ";", "\[IndentingNewLine]", RowBox[{"norm", "=", RowBox[{"Norm", "[", RowBox[{"p2", "-", "p1"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"norm", ">", RowBox[{"scale2", "*", "pyramidHeight"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"p3", "=", RowBox[{"p1", "+", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"p2", "-", "p1"}], ")"}], "/", "norm"}], " ", RowBox[{"(", RowBox[{"norm", "-", RowBox[{"scale2", " ", "pyramidHeight"}]}], ")"}]}]}]}], ";", "\[IndentingNewLine]", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"EdgeForm", "[", "]"}], ",", "\[IndentingNewLine]", RowBox[{"Cylinder", "[", RowBox[{ RowBox[{"{", RowBox[{"p1", ",", "p3"}], "}"}], ",", "radius"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"GeometricTransformation", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"GraphicsComplex", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", "pyramidHeight"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "1", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "0", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "0", ",", "0"}], "}"}]}], "}"}], ",", RowBox[{"Polygon", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"3", ",", "4", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "2", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "5", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "3", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "2", ",", "4", ",", "3"}], "}"}]}], "}"}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Composition", "[", RowBox[{ RowBox[{"TranslationTransform", "[", "p3", "]"}], ",", "\[IndentingNewLine]", RowBox[{"Quiet", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"RotationTransform", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"p2", "-", "p1"}]}], "}"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"RotationMatrix", "::", "degen"}], ",", RowBox[{"RotationTransform", "::", "spln"}]}], "}"}]}], "\[IndentingNewLine]", "]"}], ",", "\[IndentingNewLine]", RowBox[{"ScalingTransform", "[", RowBox[{"scale2", " ", RowBox[{"{", RowBox[{"1", ",", "1", ",", "1"}], "}"}]}], "]"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "]"}]}], "\[IndentingNewLine]", "}"}]}], "\[IndentingNewLine]", ",", RowBox[{"{", "}"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]"}]], "Input", CellChangeTimes->{{3.5400337717856135`*^9, 3.540033804564776*^9}, { 3.5400338404338307`*^9, 3.5400338681983566`*^9}, {3.5400366449909644`*^9, 3.5400366540251117`*^9}, {3.5400384809591026`*^9, 3.540038482717326*^9}, { 3.540038571626116*^9, 3.540038601082856*^9}, {3.540038644493369*^9, 3.5400386738350945`*^9}, {3.540038710010689*^9, 3.5400387405870714`*^9}, { 3.5400387762841043`*^9, 3.5400387812902403`*^9}, {3.540038817216302*^9, 3.540038844569275*^9}, {3.540038894779151*^9, 3.540038908619909*^9}, { 3.5400389514343452`*^9, 3.5400391020264683`*^9}, {3.5400391482368364`*^9, 3.5400392418207197`*^9}, {3.540039432122885*^9, 3.540039436765475*^9}, { 3.5400395202385745`*^9, 3.5400398081336327`*^9}, {3.540039838807028*^9, 3.5400398782235327`*^9}, {3.5400399173389997`*^9, 3.5400399390002503`*^9}, {3.5400400286681366`*^9, 3.5400400331462054`*^9}, {3.5400400646517057`*^9, 3.5400401689944563`*^9}, {3.540040205797129*^9, 3.5400402155623693`*^9}, { 3.540040245699196*^9, 3.5400402947154207`*^9}, 3.5400407200434303`*^9, { 3.5400478773037868`*^9, 3.5400478879301367`*^9}, {3.540055089960495*^9, 3.540055271083995*^9}, 3.5400553314521604`*^9, 3.540066676526228*^9, 3.5400667085850616`*^9, 3.565000551941677*^9, {3.565000603563863*^9, 3.56500060539807*^9}}, CellTags->{"initcell", "3Dexclusive"}] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Rest Points and Equilibria", "Subsection", CellChangeTimes->{{3.4928924875774913`*^9, 3.492892494457384*^9}}, CellTags->"initcell"], Cell[CellGroupData[{ Cell["Calculation of rest points (continuous dynamics)", "Subsubsection", CellChangeTimes->{{3.5087643373582993`*^9, 3.508764340347404*^9}}, CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"subFindRoot", "::", "inconsistency"}], " ", "=", " ", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"subFindRoot", "[", RowBox[{"dyn_", ",", "F_", ",", "x0_", ",", "indicator_", ",", RowBox[{"accuracy_:", "8"}]}], "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "j", ",", "p", ",", "counter", ",", "pop", ",", "dim", ",", "subdim", ",", "subdimlast", ",", "x", ",", "xp", ",", "equations", ",", "restrictions", ",", "root"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"pop", "=", RowBox[{ RowBox[{"Dimensions", "[", "indicator", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"dim", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"indicator", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"subdim", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Total", "[", RowBox[{"indicator", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"subdimlast", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Max", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"indicator", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], "==", "1"}], ",", "j", ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Total", "[", "subdim", "]"}], ">", "1"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"x", "=", RowBox[{"emptyVector", "[", RowBox[{"\"\\"", ",", RowBox[{"Total", "[", "subdim", "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"x", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"vectorReplace", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"x0", "[", RowBox[{"[", "p", "]"}], "]"}], ",", RowBox[{"x", "[", RowBox[{"[", RowBox[{ RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{"subdim", "[", RowBox[{"[", "j", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"p", "-", "1"}]}], "}"}]}], "]"}], "+", "1"}], ";;", RowBox[{"Sum", "[", RowBox[{ RowBox[{"subdim", "[", RowBox[{"[", "j", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "p"}], "}"}]}], "]"}]}], "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"indicator", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"p", "=", "1"}], ",", RowBox[{"p", "<=", "pop"}], ",", RowBox[{"p", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", RowBox[{"subdimlast", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}], "]"}], "=", "0"}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", RowBox[{"subdimlast", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}], "]"}], "=", RowBox[{"1", "-", RowBox[{"Total", "[", RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}]}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"equations", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"restrictions", " ", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"p", "=", "1"}], ",", RowBox[{"p", "<=", "pop"}], ",", RowBox[{"p", "++"}], ",", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "<=", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"indicator", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], "==", "1"}], " ", "&&", " ", RowBox[{"j", "!=", RowBox[{"subdimlast", "[", RowBox[{"[", "p", "]"}], "]"}]}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"equations", "=", RowBox[{"Append", "[", RowBox[{"equations", ",", RowBox[{ RowBox[{"dyn", "[", RowBox[{"x", ",", "F"}], "]"}], "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"restrictions", " ", "=", " ", RowBox[{"Append", "[", RowBox[{"restrictions", ",", RowBox[{"{", RowBox[{ RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], ",", RowBox[{"x0", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}]}], "}"}]}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"Off", "[", RowBox[{"FindRoot", "::", "jsing"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"root", "=", RowBox[{"FindRoot", "[", RowBox[{"equations", ",", "restrictions", ",", " ", RowBox[{"MaxIterations", " ", "\[Rule]", "1000"}], ",", RowBox[{"AccuracyGoal", "\[Rule]", "accuracy"}], ",", RowBox[{"PrecisionGoal", "\[Rule]", "accuracy"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"On", "[", RowBox[{"FindRoot", "::", "jsing"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"root", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"root", "[", RowBox[{"[", RowBox[{"j", ",", "2"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "root", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}], ";", RowBox[{"root", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"vectorReplace", "[", RowBox[{ RowBox[{"x0", "[", RowBox[{"[", "p", "]"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"Append", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"root", "[", RowBox[{"[", RowBox[{ RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"subdim", "[", RowBox[{"[", "j", "]"}], "]"}], "-", "1"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"p", "-", "1"}]}], "}"}]}], "]"}], "+", "1"}], ";;", RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"subdim", "[", RowBox[{"[", "j", "]"}], "]"}], "-", "1"}], ",", RowBox[{"{", RowBox[{"j", ",", "p"}], "}"}]}], "]"}]}], "]"}], "]"}], "\[IndentingNewLine]", ",", "0"}], "]"}], ",", RowBox[{"indicator", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"root", "[", RowBox[{"[", RowBox[{"p", ",", RowBox[{"subdimlast", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}], "]"}], "=", RowBox[{"1", "-", RowBox[{"Total", "[", RowBox[{"root", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Message", "[", RowBox[{"subFindRoot", "::", "inconsistency"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"dyn", "[", RowBox[{"x0", ",", "F"}], "]"}], "==", RowBox[{"Table", "[", RowBox[{ RowBox[{"ConstantArray", "[", RowBox[{"0", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ",", RowBox[{"root", "=", RowBox[{"{", "x0", "}"}]}], ",", RowBox[{"root", "=", RowBox[{"{", "}"}]}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", "root"}]}], "\[IndentingNewLine]", "]"}]}], ";"}], " "}]}], "Input", CellChangeTimes->{{3.4931211737020216`*^9, 3.4931211961843495`*^9}, { 3.4931212325065784`*^9, 3.4931213398809752`*^9}, {3.4931214668235097`*^9, 3.4931216154572344`*^9}, {3.4931216480040345`*^9, 3.493121684726839*^9}, { 3.493121780444474*^9, 3.4931217953659306`*^9}, {3.4931218419429045`*^9, 3.4931219170709333`*^9}, {3.4931219521113195`*^9, 3.4931219729512854`*^9}, {3.4931220088028374`*^9, 3.4931220697304473`*^9}, {3.493122120353239*^9, 3.493122227246945*^9}, { 3.49312245055805*^9, 3.4931224522705126`*^9}, {3.493122530703294*^9, 3.4931225361611414`*^9}, 3.4931233439927464`*^9, {3.4931250944898376`*^9, 3.4931250984555397`*^9}, {3.4931252129902325`*^9, 3.49312523915786*^9}, { 3.4931253353662004`*^9, 3.4931253487454395`*^9}, {3.4931253898946085`*^9, 3.49312550094429*^9}, {3.493125619274441*^9, 3.493125742551705*^9}, { 3.4931266257616987`*^9, 3.4931266759338427`*^9}, {3.493126709291809*^9, 3.4931267159413705`*^9}, {3.4931268375963016`*^9, 3.4931268837727003`*^9}, {3.4931269427374873`*^9, 3.493126943188135*^9}, { 3.4931270150614843`*^9, 3.493127056170596*^9}, {3.4931271070036907`*^9, 3.49312711260174*^9}, 3.4931272073980503`*^9, {3.493127443427444*^9, 3.4931274492257814`*^9}, {3.493127486609537*^9, 3.493127524904602*^9}, { 3.4931278064194007`*^9, 3.4931278423410535`*^9}, {3.4931278757891493`*^9, 3.493127877421497*^9}, {3.493128628421382*^9, 3.49312863028406*^9}, { 3.493151259350184*^9, 3.4931512631957135`*^9}, {3.4931514316779795`*^9, 3.493151450214634*^9}, {3.4931515690655327`*^9, 3.4931515776078157`*^9}, { 3.4931516078412895`*^9, 3.4931516312549567`*^9}, {3.493151934010298*^9, 3.4931519500533667`*^9}, {3.493152025321597*^9, 3.4931521147201457`*^9}, { 3.4931521456646414`*^9, 3.493152175086949*^9}, {3.493152362155941*^9, 3.493152599997941*^9}, {3.493153034402584*^9, 3.4931530346128864`*^9}, { 3.4931530900826483`*^9, 3.4931531105220385`*^9}, {3.49315315839087*^9, 3.493153286284773*^9}, {3.493153808776078*^9, 3.4931538393900995`*^9}, { 3.4931540951879187`*^9, 3.493154132361371*^9}, {3.493154174161477*^9, 3.4931541745219955`*^9}, {3.493170838199506*^9, 3.4931708438676558`*^9}, { 3.4931709866930285`*^9, 3.4931709900879107`*^9}, {3.4931710685907917`*^9, 3.4931710750901375`*^9}, {3.4931711910568895`*^9, 3.493171203064155*^9}, { 3.4931713722374144`*^9, 3.493171376363347*^9}, {3.493171953963896*^9, 3.493172095757786*^9}, {3.4931721311586895`*^9, 3.4931721631046257`*^9}, { 3.4931722868125086`*^9, 3.4931722874233875`*^9}, {3.493172785639787*^9, 3.4931727880432434`*^9}, {3.493172850252696*^9, 3.4931729367170258`*^9}, { 3.493173140049403*^9, 3.4931731407904687`*^9}, {3.4931732157582674`*^9, 3.493173225792696*^9}, {3.4931734368662047`*^9, 3.4931735038625407`*^9}, { 3.4931735716500144`*^9, 3.493173622583253*^9}, {3.493174017831592*^9, 3.4931740235297856`*^9}, {3.493174786486864*^9, 3.493174790452566*^9}, { 3.4931759822763247`*^9, 3.493175990267816*^9}, {3.493176157418166*^9, 3.4931761651492834`*^9}, {3.4931767599445567`*^9, 3.493176774445408*^9}, { 3.493176908838656*^9, 3.49317693037963*^9}, {3.4931810270554285`*^9, 3.4931810315418797`*^9}, {3.493181088443701*^9, 3.4931810927398787`*^9}, { 3.4931811231836543`*^9, 3.4931811327474065`*^9}, {3.4931813270167522`*^9, 3.4931813325447006`*^9}, {3.4931814008829665`*^9, 3.4931814042177615`*^9}, {3.4931815107108912`*^9, 3.4931815163189554`*^9}, {3.493181567001834*^9, 3.493181580931864*^9}, { 3.4931825000234528`*^9, 3.4931825203426704`*^9}, {3.507909967075178*^9, 3.507910036094423*^9}, {3.507910093486949*^9, 3.5079101075872245`*^9}, { 3.5079104476852417`*^9, 3.5079104493045645`*^9}, {3.507910545211068*^9, 3.507910546623099*^9}, {3.5079105997494907`*^9, 3.5079106477184668`*^9}, { 3.5079108516116505`*^9, 3.5079108610452156`*^9}, {3.507910918437742*^9, 3.507910929343424*^9}, {3.507911387166809*^9, 3.5079113908420935`*^9}, { 3.5079155033657656`*^9, 3.5079155217622185`*^9}, {3.507915878394679*^9, 3.5079158840628295`*^9}, {3.507916261820897*^9, 3.5079162667780247`*^9}, { 3.507916326744252*^9, 3.50791632703467*^9}, {3.5079164190770197`*^9, 3.5079164767098923`*^9}, {3.507916636750018*^9, 3.5079166372907963`*^9}, { 3.5079167643735323`*^9, 3.507916801256567*^9}, {3.5079169157111444`*^9, 3.5079169204179125`*^9}, 3.507922197205697*^9, 3.507932674998108*^9, { 3.507932765348025*^9, 3.507932776714369*^9}, 3.5079329312165318`*^9, { 3.507932963402814*^9, 3.507932971824924*^9}, {3.5079334095643625`*^9, 3.507933430103897*^9}, {3.507933512812826*^9, 3.507933576524439*^9}, { 3.5079819737444468`*^9, 3.50798197862146*^9}, {3.5087954135817566`*^9, 3.5087954149236865`*^9}, 3.565001325856992*^9, {3.565001371485748*^9, 3.565001372770381*^9}, {3.568575847950654*^9, 3.568575928643147*^9}, 3.568575989405669*^9, 3.568576052819748*^9, {3.568576479621514*^9, 3.568576593879849*^9}, {3.568576624910525*^9, 3.568576635219272*^9}, { 3.56857681235516*^9, 3.568576826162153*^9}, {3.568577005899004*^9, 3.568577006275652*^9}, {3.568577038110133*^9, 3.568577182550897*^9}, { 3.56857755644391*^9, 3.568577598585088*^9}, {3.568577635391928*^9, 3.56857781565235*^9}, {3.568577853680738*^9, 3.568577857513446*^9}, { 3.568577887540859*^9, 3.568578011552417*^9}, {3.568578140264348*^9, 3.568578171433316*^9}, {3.568578362062393*^9, 3.56857838815895*^9}, { 3.568578423594796*^9, 3.568578430226354*^9}, {3.568579075238615*^9, 3.568579076042777*^9}, {3.568579106790434*^9, 3.5685791341603*^9}, { 3.568579176706234*^9, 3.568579179058254*^9}, {3.568579354074627*^9, 3.568579378314399*^9}, {3.568579419532807*^9, 3.568579459080656*^9}, { 3.568579555983514*^9, 3.56857955890407*^9}, {3.568579701265958*^9, 3.568579778568219*^9}, {3.568580227807085*^9, 3.568580272492271*^9}, { 3.56858077157623*^9, 3.56858077221191*^9}, {3.568580834401088*^9, 3.568580853092834*^9}, {3.568580974609735*^9, 3.568580975117487*^9}, { 3.568581682509181*^9, 3.568581725783053*^9}, {3.568589728184075*^9, 3.568589843145458*^9}, {3.568589880383173*^9, 3.568589962480004*^9}, { 3.568590024389532*^9, 3.568590047748526*^9}, {3.568590140090106*^9, 3.568590291395336*^9}, {3.569758769638025*^9, 3.569758840012716*^9}, { 3.569758906428952*^9, 3.569758933494245*^9}, {3.569758995963363*^9, 3.569759016282268*^9}, {3.569759049790717*^9, 3.569759093245054*^9}, { 3.569759145198897*^9, 3.569759172806155*^9}, {3.569759209879959*^9, 3.569759285829185*^9}, {3.569759506446935*^9, 3.56975958474467*^9}, { 3.569759620550539*^9, 3.56975962121566*^9}, {3.569759688064415*^9, 3.569759711166038*^9}, {3.569759746791259*^9, 3.569759764614232*^9}, 3.569759802296656*^9, {3.572039917036322*^9, 3.572039928103476*^9}, { 3.57203996039655*^9, 3.572039960727148*^9}, {3.572039995199384*^9, 3.572040015925548*^9}, {3.572040098994732*^9, 3.572040099862809*^9}, { 3.572047769333492*^9, 3.572047810721989*^9}, {3.572047858439129*^9, 3.572047868251023*^9}, 3.57204792708242*^9, {3.572048119661712*^9, 3.572048122838433*^9}, {3.572048343366387*^9, 3.572048350230131*^9}, { 3.572048589534833*^9, 3.572048591859203*^9}, {3.572048671511153*^9, 3.572048672047473*^9}, {3.572048754768239*^9, 3.572048755965627*^9}, { 3.572048786097575*^9, 3.572048801078795*^9}, 3.572049209370126*^9, { 3.580486022324917*^9, 3.58048603626275*^9}, {3.580501481438418*^9, 3.580501483110501*^9}}, CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"restPointsContinuous", "::", "usage"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"restPointsContinuous", "::", "notes"}], " ", "=", " ", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"restPointsContinuous", "::", "inconsistency"}], " ", "=", " ", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"restPointsContinuous", "[", RowBox[{"dyn_", ",", "F_", ",", "startingValues_", ",", RowBox[{"tolLevel_:", ".00001"}], ",", RowBox[{"delta_:", ".001"}], ",", RowBox[{"accuracy_:", "8"}], ",", RowBox[{"sup_:", RowBox[{"{", "}"}]}], ",", RowBox[{"dim_:", "dim"}]}], "]"}], ":=", " ", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "j", ",", "n", ",", "pop", ",", "support", ",", "grid", ",", "roots"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"pop", "=", RowBox[{ RowBox[{"Dimensions", "[", "dim", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", " ", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"sup", "==", RowBox[{"{", "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"support", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"ConstantArray", "[", RowBox[{"1", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"support", "=", "sup"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"n", "=", RowBox[{ RowBox[{"Dimensions", "[", "startingValues", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "Finds", " ", "rest", " ", "points", " ", "by", " ", "grid", " ", "search", " ", "on", " ", "the", " ", "subsimplex", " ", "determined", " ", "by", " ", "support"}], " ", "*)"}], " ", "\[IndentingNewLine]", RowBox[{"roots", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"subFindRoot", "[", RowBox[{"dyn", ",", "F", ",", RowBox[{"startingValues", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "support", ",", "accuracy"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "n"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "Eliminate", " ", "rest", " ", "points", " ", "due", " ", "to", " ", "singularities", " ", "in", " ", "Jacobian"}], "*)"}], "\[IndentingNewLine]", RowBox[{"roots", "=", RowBox[{"DeleteCases", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"And", "[", RowBox[{ RowBox[{ RowBox[{"startingValues", "[", RowBox[{"[", "j", "]"}], "]"}], "==", RowBox[{"roots", "[", RowBox[{"[", "j", "]"}], "]"}]}], ",", RowBox[{ RowBox[{"stateNorm", "[", RowBox[{"F", "[", RowBox[{"roots", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], "]"}], ">", "delta"}]}], "]"}], ",", "\"\\"", ",", RowBox[{"roots", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "n"}], "}"}]}], "]"}], ",", "\"\\""}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"Round", " ", "to", " ", "Accuracy"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"roots", "=", RowBox[{"Round", "[", RowBox[{"roots", ",", RowBox[{"10", "^", RowBox[{"(", RowBox[{"-", "accuracy"}], ")"}]}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"Eliminates", " ", "double", " ", "countings"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"roots", "=", RowBox[{"eliminateDuplicates", "[", RowBox[{"delta", ",", "roots", ",", "stateNorm"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"Print", "[", "roots", "]"}], ";"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"n", "=", RowBox[{ RowBox[{"Dimensions", "[", "roots", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"clever", " ", "code", " ", "by", " ", "emin"}], ",", " ", RowBox[{ RowBox[{ RowBox[{ "similar", " ", "to", " ", "Eliminate", " ", "duplicates", "\[IndentingNewLine]", RowBox[{"reduce", "[", "points_", "]"}]}], ":=", RowBox[{"DeleteCases", "[", RowBox[{ RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"Abs", "[", RowBox[{ RowBox[{"(", RowBox[{"x1", " ", "/.", " ", RowBox[{"points", "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}]}], ")"}], "-", " ", RowBox[{"(", RowBox[{"x1", "/.", " ", RowBox[{"points", "[", RowBox[{"[", RowBox[{"j", ",", "1"}], "]"}], "]"}]}], ")"}]}], "]"}], ">", "delta"}], " ", "||", " ", RowBox[{ RowBox[{"Abs", "[", RowBox[{ RowBox[{"(", RowBox[{"x2", " ", "/.", " ", RowBox[{"points", "[", RowBox[{"[", RowBox[{"1", ",", "2"}], "]"}], "]"}]}], ")"}], "-", " ", RowBox[{"(", RowBox[{"x2", " ", "/.", " ", RowBox[{"points", "[", RowBox[{"[", RowBox[{"j", ",", "2"}], "]"}], "]"}]}], " ", ")"}]}], "]"}], ">", "delta"}]}], ")"}], ",", RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "0"}], "]"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"j", ",", "2", ",", RowBox[{ RowBox[{"Dimensions", "[", "points", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], ",", "0"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"roots", "=", RowBox[{"FixedPointList", "[", RowBox[{"reduce", ",", "roots"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"roots", "=", RowBox[{"DeleteCases", "[", RowBox[{"roots", ",", RowBox[{"{", "}"}]}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "*)"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ "Check", " ", "points", " ", "are", " ", "in", " ", "the", " ", "simplex"}], ",", " ", RowBox[{"eliminate", " ", "them", " ", "if", " ", "not"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"roots", " ", "=", " ", RowBox[{"DeleteCases", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Total", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"simplexQ", "[", RowBox[{ RowBox[{"roots", "[", RowBox[{"[", RowBox[{"j", ",", "p"}], "]"}], "]"}], ",", "accuracy"}], "]"}], ",", "1", ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], "]"}], "==", "pop"}], ",", RowBox[{"roots", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "\"\\""}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "n"}], "}"}]}], "]"}], ",", "\"\\""}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"n", "=", RowBox[{ RowBox[{"Dimensions", "[", "roots", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ "Check", " ", "points", " ", "to", " ", "have", " ", "\"\\""}], ",", " ", RowBox[{"eliminate", " ", "them", " ", "if", " ", RowBox[{"not", ".", " ", "This"}], " ", "makes", " ", "no", " ", "sense"}], ",", " ", RowBox[{ "since", " ", "the", " ", "points", " ", "are", " ", "roots", " ", "of", " ", "the", " ", "equation"}], ",", " ", RowBox[{ RowBox[{ "a", " ", "double", " ", "check", " ", "after", " ", "the", " ", "roundoff", " ", "I", " ", "guess"}], ";", " ", RowBox[{ "look", " ", "at", " ", "the", " ", "explanation", " ", "in", " ", "the", " ", "startingValues", " ", "definition", " ", RowBox[{"above", "."}]}]}]}], "*)"}], "\[IndentingNewLine]", RowBox[{"roots", "=", RowBox[{"DeleteCases", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Max", "[", RowBox[{"Abs", "[", RowBox[{"dyn", "[", RowBox[{ RowBox[{"roots", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "F"}], "]"}], "]"}], "]"}], " ", ">", " ", "tolLevel"}], ",", " ", "\"\\"", ",", RowBox[{"roots", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "n"}], "}"}]}], "]"}], ",", "\"\\""}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"n", ">", RowBox[{ RowBox[{"Dimensions", "[", "roots", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", RowBox[{"Message", "[", RowBox[{"restPointsContinuous", "::", "inconsistency"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", "roots"}]}], "\[IndentingNewLine]", "]"}]}], " ", ";"}]}], "Input", CellChangeTimes->{{3.474715065062935*^9, 3.4747150795036993`*^9}, 3.480859462164381*^9, {3.481418886127037*^9, 3.4814188861570797`*^9}, { 3.481735483384616*^9, 3.481735483434688*^9}, {3.492703877055523*^9, 3.492703941718504*^9}, {3.492703977249595*^9, 3.492703984780424*^9}, { 3.4927040568240175`*^9, 3.4927040577854*^9}, {3.492704115598768*^9, 3.4927041470788655`*^9}, {3.4927042624996033`*^9, 3.492704324727126*^9}, { 3.492704409358765*^9, 3.492704409979658*^9}, {3.492705753193187*^9, 3.4927057599929647`*^9}, {3.4927086390929427`*^9, 3.4927087171952486`*^9}, {3.4927087608680468`*^9, 3.4927087753288403`*^9}, {3.492708832240676*^9, 3.492708832701338*^9}, { 3.492708880369882*^9, 3.4927090735877156`*^9}, {3.4927095666967716`*^9, 3.4927095973909073`*^9}, {3.4927096505673714`*^9, 3.492709668933781*^9}, { 3.4927097180644274`*^9, 3.4927097338371077`*^9}, 3.492709847490533*^9, 3.4927248080778694`*^9, {3.492725616410194*^9, 3.492725625052621*^9}, 3.4927257902501636`*^9, {3.49272643323473*^9, 3.492726606203447*^9}, { 3.492726654022207*^9, 3.4927266859881716`*^9}, {3.4927267340873346`*^9, 3.4927267395551972`*^9}, {3.4927268632029943`*^9, 3.4927268641143045`*^9}, {3.492726938491253*^9, 3.4927270960778513`*^9}, { 3.492727126441512*^9, 3.4927271723775654`*^9}, {3.4927272819751587`*^9, 3.492727341580868*^9}, {3.492727401429018*^9, 3.4927274786920013`*^9}, { 3.49272754323481*^9, 3.492727693530925*^9}, {3.4927327629103346`*^9, 3.492732793324067*^9}, {3.4927329891857023`*^9, 3.492733040148984*^9}, { 3.4927331176003537`*^9, 3.492733146151408*^9}, {3.4927367570536304`*^9, 3.492736900549968*^9}, {3.492737054120792*^9, 3.492737064225322*^9}, { 3.492737096301445*^9, 3.492737096952381*^9}, {3.4927371377710752`*^9, 3.4927372018432064`*^9}, {3.4927372334586673`*^9, 3.492737269480464*^9}, { 3.4927373470119486`*^9, 3.492737423171461*^9}, {3.492737492150648*^9, 3.492737504017712*^9}, {3.492737548792094*^9, 3.492737560528971*^9}, { 3.4927375940071106`*^9, 3.492737672329733*^9}, {3.4927378284442143`*^9, 3.4927378421138706`*^9}, {3.4927378981244097`*^9, 3.4927379293192654`*^9}, {3.4927379691765776`*^9, 3.4927379946331825`*^9}, {3.49273805109437*^9, 3.4927381665503874`*^9}, 3.492738321473155*^9, 3.492738382931528*^9, 3.492738471589011*^9, { 3.4927394277189264`*^9, 3.4927394293512735`*^9}, {3.4927398402421055`*^9, 3.4927399018106365`*^9}, {3.49281195769996*^9, 3.492812029252848*^9}, { 3.492812119923226*^9, 3.492812131870405*^9}, {3.492812213037117*^9, 3.4928122315938005`*^9}, 3.492812353178631*^9, {3.4928258263071055`*^9, 3.49282582656748*^9}, {3.492829253595304*^9, 3.4928292603750525`*^9}, { 3.4931226514369*^9, 3.49312271552906*^9}, {3.493122785810119*^9, 3.493122929216327*^9}, {3.493122982993655*^9, 3.4931229841853685`*^9}, { 3.4931234732786503`*^9, 3.4931235176925144`*^9}, {3.4931236963794537`*^9, 3.4931237410436773`*^9}, {3.4931237935391626`*^9, 3.493123816632369*^9}, { 3.493125814435068*^9, 3.4931258539819336`*^9}, {3.493125952072982*^9, 3.493126043344223*^9}, {3.4931275723027573`*^9, 3.4931276521475687`*^9}, { 3.493127702990678*^9, 3.4931277451513014`*^9}, {3.4931286125485573`*^9, 3.493128614651582*^9}, {3.4931504399819903`*^9, 3.4931504529506383`*^9}, { 3.49315057751976*^9, 3.493150587043454*^9}, {3.4931508569816065`*^9, 3.4931508606669054`*^9}, {3.4931508938345985`*^9, 3.493150898791726*^9}, { 3.4931510665729837`*^9, 3.493151074504389*^9}, {3.4931511205906577`*^9, 3.493151123004128*^9}, 3.4931523089995055`*^9, {3.4931526779300013`*^9, 3.4931526890159426`*^9}, {3.4931527273510656`*^9, 3.4931527524671807`*^9}, 3.4931706934012957`*^9, {3.4931710956897583`*^9, 3.493171100186224*^9}, 3.4931712110256033`*^9, {3.493171786473056*^9, 3.493171814533405*^9}, 3.493171857955843*^9, {3.493174312725629*^9, 3.493174313947386*^9}, { 3.493174389896595*^9, 3.4931744010225935`*^9}, 3.4931744826900253`*^9, { 3.4931754733745604`*^9, 3.4931754812258496`*^9}, 3.493175590072363*^9, { 3.493176231825158*^9, 3.493176394649288*^9}, {3.4931764698974895`*^9, 3.4931764781593695`*^9}, {3.493180792668397*^9, 3.4931807976455536`*^9}, { 3.493180892702238*^9, 3.493180930746944*^9}, {3.493180975981989*^9, 3.4931809764426513`*^9}, {3.493181849267712*^9, 3.493181861305021*^9}, { 3.4931818942523966`*^9, 3.493181930184064*^9}, 3.493182000535224*^9, { 3.4931820483940415`*^9, 3.4931820643670096`*^9}, {3.5079813135227723`*^9, 3.5079813209885073`*^9}, {3.507981430510993*^9, 3.5079814365046115`*^9}, { 3.5079830583717422`*^9, 3.5079830584919147`*^9}, {3.5079833727287655`*^9, 3.507983372848938*^9}, {3.5087643758842363`*^9, 3.50876437751058*^9}, { 3.508764435602042*^9, 3.508764438402277*^9}, {3.5106571201574283`*^9, 3.510657127811706*^9}, {3.5193812107786903`*^9, 3.519381215865981*^9}, 3.539693870369824*^9, 3.565001418986457*^9, {3.565002512812274*^9, 3.565002555432224*^9}, {3.568629383334811*^9, 3.568629387674571*^9}, { 3.568629440644919*^9, 3.568629506860064*^9}, 3.568629744126922*^9, 3.568630018329293*^9, {3.568630088595815*^9, 3.568630264924613*^9}, { 3.56863060037989*^9, 3.568630601280297*^9}, {3.568829608284315*^9, 3.568829646649284*^9}, {3.568829716681305*^9, 3.568829719819193*^9}, { 3.568829862981219*^9, 3.568829863792847*^9}, {3.568968905436822*^9, 3.568968910847051*^9}, {3.568975916529093*^9, 3.568975952717543*^9}, 3.568977559777479*^9, 3.568977613232619*^9, {3.568978054456633*^9, 3.568978071808256*^9}, {3.569760265272671*^9, 3.569760277633726*^9}, { 3.569774554641077*^9, 3.569774561616417*^9}, {3.569774596022683*^9, 3.569774623575369*^9}, {3.569777208935804*^9, 3.569777222303051*^9}, { 3.569777344703673*^9, 3.569777367550234*^9}, {3.569777645779557*^9, 3.569777653097888*^9}, {3.572039423403811*^9, 3.572039437289259*^9}, { 3.572039494395959*^9, 3.572039521669672*^9}, {3.572039637635646*^9, 3.572039639064786*^9}, {3.578923817892711*^9, 3.57892382007156*^9}, { 3.580486059157969*^9, 3.580486064806447*^9}}, CellTags->"initcell"] }, Closed]], Cell[CellGroupData[{ Cell["\<\ Calculation of restricted equilibria, Nash equilibria and Quasistrict \ equilibria\ \>", "Subsubsection", CellChangeTimes->{{3.493403088368146*^9, 3.4934030988231792`*^9}}, CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"restrictedEquilibria", "::", "usage"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"restrictedEquilibria", "::", "notes"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"restrictedEquilibria", "[", RowBox[{"F_", ",", RowBox[{"method_:", "\"\\""}], ",", RowBox[{"delta_:", ".01"}], ",", RowBox[{"accuracy_:", "8"}], ",", RowBox[{"gridsize_:", "10"}], " ", ",", RowBox[{"eps_:", ".01"}], ",", RowBox[{"dim_:", "dim"}]}], "]"}], ":=", RowBox[{"Module", "[", " ", RowBox[{ RowBox[{"{", RowBox[{ "j", ",", "p", ",", "pop", ",", "subdim", ",", "subdimlast", ",", "x", ",", "fx", ",", " ", "RNE", ",", "supports", ",", "restPoints", ",", "grid"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"dim", "=", RowBox[{ RowBox[{"Dimensions", "[", "F", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"pop", "=", RowBox[{ RowBox[{"Dimensions", "[", "dim", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"supports", "=", RowBox[{"Tuples", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"Drop", "[", RowBox[{ RowBox[{"Tuples", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}], ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}], ",", "1"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"RNE", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "<=", RowBox[{ RowBox[{"Dimensions", "[", "supports", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"subdim", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Total", "[", RowBox[{"supports", "[", RowBox[{"[", RowBox[{"j", ",", "p"}], "]"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"subdimlast", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Max", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"supports", "[", RowBox[{"[", RowBox[{"j", ",", "p", ",", "k"}], "]"}], "]"}], "==", "1"}], ",", "k", ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Total", "[", "subdim", "]"}], ">", "pop"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"method", "==", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"x", "=", RowBox[{"emptyVector", "[", RowBox[{"\"\\"", ",", RowBox[{"Total", "[", "subdim", "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"x", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"x", "[", RowBox[{"[", RowBox[{ RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{"subdim", "[", RowBox[{"[", "k", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"p", "-", "1"}]}], "}"}]}], "]"}], "+", "1"}], ";;", RowBox[{"Sum", "[", RowBox[{ RowBox[{"subdim", "[", RowBox[{"[", "k", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "p"}], "}"}]}], "]"}]}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"fx", "=", RowBox[{"F", "[", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"vectorReplace", "[", RowBox[{ RowBox[{"supports", "[", RowBox[{"[", RowBox[{"j", ",", "p"}], "]"}], "]"}], ",", RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}], ",", RowBox[{"supports", "[", RowBox[{"[", RowBox[{"j", ",", "p"}], "]"}], "]"}]}], "]"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"fx", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"DeleteCases", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"supports", "[", RowBox[{"[", RowBox[{"j", ",", "p", ",", "k"}], "]"}], "]"}], "==", "1"}], ",", RowBox[{"fx", "[", RowBox[{"[", RowBox[{"p", ",", "k"}], "]"}], "]"}], ",", "\"\\""}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ",", "\"\\""}], "]"}], " ", ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"restPoints", "=", "\[IndentingNewLine]", RowBox[{"Quiet", "[", RowBox[{"Solve", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Flatten", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"Thread", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Append", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Drop", "[", RowBox[{ RowBox[{"fx", "[", RowBox[{"[", "p", "]"}], "]"}], ",", RowBox[{"-", "1"}]}], "]"}], "-", RowBox[{"ConstantArray", "[", RowBox[{ RowBox[{"fx", "[", RowBox[{"[", RowBox[{"p", ",", RowBox[{"subdim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}], "]"}], ",", RowBox[{ RowBox[{"subdim", "[", RowBox[{"[", "p", "]"}], "]"}], "-", "1"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Total", "[", RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], "-", "1"}]}], "\[IndentingNewLine]", "]"}], "\[IndentingNewLine]", "==", "\[IndentingNewLine]", RowBox[{"ConstantArray", "[", RowBox[{"0", ",", RowBox[{"subdim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}]}], "\[IndentingNewLine]", "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], ",", "1"}], "]"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{"Flatten", "[", RowBox[{"x", ",", "1"}], "]"}]}], "\[IndentingNewLine]", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"restPoints", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"restPoints", "[", RowBox[{"[", "k", "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "<", RowBox[{"Total", "[", "subdim", "]"}]}], ",", RowBox[{"{", "}"}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"restPoints", "[", RowBox[{"[", RowBox[{"k", ",", "l", ",", "2"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"l", ",", RowBox[{"Total", "[", "subdim", "]"}]}], "}"}]}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{ RowBox[{"Dimensions", "[", "restPoints", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"restPoints", "==", RowBox[{"{", RowBox[{"{", "}"}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{ "NON", " ", "TRIVIAL", " ", "COMPONENT", " ", "DETECTED"}], ",", " ", RowBox[{"PRINT", " ", "WARNING", " ", "MESSAGE"}]}], "*)"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"restPoints", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"restPoints", "[", RowBox[{"[", "k", "]"}], "]"}], "[", RowBox[{"[", RowBox[{ RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{"subdim", "[", RowBox[{"[", "k", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"p", "-", "1"}]}], "}"}]}], "]"}], "+", "1"}], ";;", RowBox[{"Sum", "[", RowBox[{ RowBox[{"subdim", "[", RowBox[{"[", "k", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "p"}], "}"}]}], "]"}]}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{ RowBox[{"Dimensions", "[", "restPoints", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"restPoints", "=", RowBox[{"DeleteCases", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Total", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"simplexQ", "[", RowBox[{ RowBox[{"restPoints", "[", RowBox[{"[", RowBox[{"k", ",", "p"}], "]"}], "]"}], ",", "accuracy"}], "]"}], ",", "1", ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], "]"}], "==", "pop"}], ",", "\[IndentingNewLine]", RowBox[{"Table", "[", RowBox[{ RowBox[{"vectorReplace", "[", RowBox[{ RowBox[{"supports", "[", RowBox[{"[", RowBox[{"j", ",", "p"}], "]"}], "]"}], ",", RowBox[{"restPoints", "[", RowBox[{"[", RowBox[{"k", ",", "p"}], "]"}], "]"}], ",", RowBox[{"supports", "[", RowBox[{"[", RowBox[{"j", ",", "p"}], "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", "\"\\""}], "\[IndentingNewLine]", "]"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{ RowBox[{"Dimensions", "[", "restPoints", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], ",", "\"\\""}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"grid", "=", RowBox[{"Tuples", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"discSimplex", "[", RowBox[{"gridsize", ",", RowBox[{"subdim", "[", RowBox[{"[", "p", "]"}], "]"}], ",", "True", ",", "eps"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"grid", " ", "=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"vectorReplace", "[", RowBox[{ RowBox[{"ConstantArray", "[", RowBox[{"0", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}], ",", RowBox[{"grid", "[", RowBox[{"[", RowBox[{"k", ",", "p"}], "]"}], "]"}], ",", RowBox[{"supports", "[", RowBox[{"[", RowBox[{"j", ",", "p"}], "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{ RowBox[{"Dimensions", "[", "grid", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "Find", " ", "the", " ", "rest", " ", "points", " ", "for", " ", "the", " ", "Replicator", " ", "dynamic", " ", "without", " ", "tolerance", " ", "check", " ", "and", " ", "for", " ", "the", " ", "specific", " ", "subsimplex"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"restPoints", "=", RowBox[{"restPointsContinuous", "[", RowBox[{ "Replicator", ",", "F", ",", "grid", ",", "Infinity", ",", "delta", ",", "accuracy", ",", RowBox[{"supports", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"restPoints", "=", RowBox[{"DeleteCases", "[", RowBox[{ RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Total", "[", "dim", "]"}], "-", RowBox[{"Total", "[", "subdim", "]"}]}], "==", RowBox[{"Total", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"Total", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"restPoints", "[", RowBox[{"[", RowBox[{"k", ",", "p", ",", "l"}], "]"}], "]"}], "==", "0"}], ",", "1", ",", "0"}], "]"}], ",", RowBox[{"{", RowBox[{"l", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], "]"}]}], ",", RowBox[{"restPoints", "[", RowBox[{"[", "k", "]"}], "]"}], ",", "\"\\""}], "]"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{ RowBox[{"Dimensions", "[", "restPoints", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], ",", "\"\\""}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"restPoints", "=", RowBox[{"{", RowBox[{"supports", "[", RowBox[{"[", "j", "]"}], "]"}], "}"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"RNE", "=", RowBox[{"Append", "[", RowBox[{"RNE", ",", "restPoints"}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", "RNE"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.480859755914381*^9, 3.480859803086256*^9}, { 3.4927384949225636`*^9, 3.4927384965649247`*^9}, {3.492738611690467*^9, 3.492738618640461*^9}, {3.4927389969340396`*^9, 3.492739202284768*^9}, { 3.492739241991864*^9, 3.4927392776030703`*^9}, {3.4927393098294096`*^9, 3.492739365639661*^9}, {3.49273965990279*^9, 3.4927398218055954`*^9}, { 3.4927401200143986`*^9, 3.4927401332634497`*^9}, {3.4927402656037455`*^9, 3.4927402715623136`*^9}, {3.4927403242380576`*^9, 3.4927403915748835`*^9}, {3.492740424862749*^9, 3.4927404981681566`*^9}, { 3.4927410839003983`*^9, 3.4927411585076785`*^9}, {3.49274119194576*^9, 3.4927412457331023`*^9}, {3.4927414952418785`*^9, 3.49274154670588*^9}, { 3.4927415926018753`*^9, 3.492741811536688*^9}, {3.4927737123463345`*^9, 3.49277372551527*^9}, {3.492773790318453*^9, 3.4927739962445602`*^9}, { 3.492774040337963*^9, 3.492774047878806*^9}, {3.492774122205683*^9, 3.4927741233172817`*^9}, {3.4928030379840384`*^9, 3.492803080354965*^9}, { 3.4928031328905077`*^9, 3.4928031330707664`*^9}, {3.492803206506362*^9, 3.492803211894109*^9}, {3.492809882485949*^9, 3.4928099376552787`*^9}, { 3.492811854701856*^9, 3.4928118613414035`*^9}, {3.4928231607942867`*^9, 3.492823209934947*^9}, {3.4928254702951856`*^9, 3.492825474701522*^9}, { 3.4928255099121523`*^9, 3.492825554316002*^9}, 3.4928255864321823`*^9, { 3.493118619884822*^9, 3.4931187334845266`*^9}, 3.493118768437043*^9, { 3.493118806389835*^9, 3.4931188168979745`*^9}, {3.493118914786354*^9, 3.493118932785063*^9}, {3.493118963268123*^9, 3.4931190782962537`*^9}, { 3.493119135718641*^9, 3.493119230732557*^9}, {3.493119393705306*^9, 3.493119407476181*^9}, {3.493119458089608*^9, 3.4931194726242003`*^9}, { 3.4931195670718007`*^9, 3.4931195763050776`*^9}, {3.4931197496042695`*^9, 3.493119835107217*^9}, {3.4931198689659033`*^9, 3.493119924936385*^9}, { 3.493119980546348*^9, 3.4931200701351705`*^9}, {3.4931202061607656`*^9, 3.493120616881353*^9}, {3.493120701452961*^9, 3.4931207637124853`*^9}, { 3.4931282185219755`*^9, 3.493128397228943*^9}, {3.4931284369160104`*^9, 3.493128503772145*^9}, {3.49312859072718*^9, 3.493128596886036*^9}, { 3.4931290508788457`*^9, 3.4931290743125415`*^9}, 3.493129434640668*^9, { 3.493129477872833*^9, 3.493129498562583*^9}, {3.493129564747753*^9, 3.4931295767750473`*^9}, {3.493129828607164*^9, 3.4931300776552773`*^9}, { 3.4931301655416517`*^9, 3.493130375173087*^9}, {3.4931305681706038`*^9, 3.4931308477325945`*^9}, {3.493148731735653*^9, 3.493148732086157*^9}, { 3.4931488597597427`*^9, 3.4931488678513775`*^9}, {3.493149443539176*^9, 3.4931494727812243`*^9}, {3.493149512818795*^9, 3.493149540829072*^9}, { 3.4931496837746177`*^9, 3.493149709141093*^9}, {3.49314977386416*^9, 3.4931499187324705`*^9}, {3.4931499502477875`*^9, 3.4931499934198656`*^9}, {3.4931500737353535`*^9, 3.493150080635275*^9}, { 3.4931534301115856`*^9, 3.4931534434908237`*^9}, {3.4931757142108655`*^9, 3.4931757245757694`*^9}, {3.493177091831787*^9, 3.493177118460077*^9}, { 3.4931774631457105`*^9, 3.493177474371853*^9}, {3.4931784287642016`*^9, 3.4931785281521826`*^9}, {3.4931785963502464`*^9, 3.493178609358952*^9}, { 3.4931787224115133`*^9, 3.4931787226718884`*^9}, {3.493178759995557*^9, 3.493178835594262*^9}, {3.4931788852156143`*^9, 3.493178933475008*^9}, { 3.493178964860138*^9, 3.4931789666827583`*^9}, {3.4931790169049745`*^9, 3.493179023484435*^9}, {3.4931790644733744`*^9, 3.493179065785261*^9}, { 3.493179268286443*^9, 3.4931792911092606`*^9}, {3.493179333149712*^9, 3.493179343925206*^9}, {3.4931794598418865`*^9, 3.493179465570123*^9}, { 3.4931795568513794`*^9, 3.4931795835697985`*^9}, {3.493210770288602*^9, 3.4932107765826526`*^9}, {3.493210808037883*^9, 3.493210963932048*^9}, { 3.493210999187743*^9, 3.4932110399864087`*^9}, {3.4932116965955663`*^9, 3.4932117923132014`*^9}, {3.4932119627332535`*^9, 3.4932119926562805`*^9}, {3.4932122278644934`*^9, 3.4932122502616987`*^9}, {3.4932123411874437`*^9, 3.4932123940784974`*^9}, {3.4932124784247813`*^9, 3.4932125080173335`*^9}, {3.493212607445304*^9, 3.493212777399686*^9}, { 3.4932128346169605`*^9, 3.4932128771130667`*^9}, {3.4932129254225326`*^9, 3.4932129311307406`*^9}, {3.493212964959384*^9, 3.4932130115413656`*^9}, { 3.4932130509280005`*^9, 3.493213060451695*^9}, {3.493213093784625*^9, 3.493213141252881*^9}, {3.493230194664242*^9, 3.49323030911831*^9}, { 3.4932303440334597`*^9, 3.493230365833398*^9}, {3.4932303983651247`*^9, 3.493230413539231*^9}, {3.4932306882766237`*^9, 3.493230702704651*^9}, { 3.4932309812745066`*^9, 3.4932309816750827`*^9}, {3.493231182824321*^9, 3.493231183194854*^9}, {3.4932312258061256`*^9, 3.493230531689516*^9}, 3.493230848389909*^9, {3.4932309215901656`*^9, 3.4932309620433345`*^9}, { 3.4932313466714025`*^9, 3.4932313977748857`*^9}, {3.4932317884716797`*^9, 3.4932318082851706`*^9}, {3.4932321658292933`*^9, 3.493232177275753*^9}, { 3.507981441792215*^9, 3.5079814567236853`*^9}, {3.507985275660101*^9, 3.507985278243816*^9}, 3.5087644400814915`*^9, {3.540749650083197*^9, 3.540749681034644*^9}, {3.540749778164917*^9, 3.540749803513258*^9}, { 3.540749859932888*^9, 3.540749946692326*^9}, {3.540750497040759*^9, 3.540750548541351*^9}, {3.54075065638881*^9, 3.540750666080374*^9}, { 3.54075080400577*^9, 3.540750902474841*^9}, {3.540750962696495*^9, 3.540750975560083*^9}, {3.540751617266845*^9, 3.540751630296349*^9}, { 3.540751682178717*^9, 3.540751695843026*^9}, {3.540751740024022*^9, 3.540751794883692*^9}, {3.540751895543882*^9, 3.540751924814444*^9}, { 3.540751991398058*^9, 3.540752003228833*^9}, {3.540752335247642*^9, 3.540752424685683*^9}, {3.540752468380779*^9, 3.540752479669046*^9}, { 3.54075264349362*^9, 3.540752678520436*^9}, {3.540752711270308*^9, 3.540752731751557*^9}, {3.540752763721452*^9, 3.540752881527654*^9}, { 3.540752955709673*^9, 3.540752981913565*^9}, {3.540753728237459*^9, 3.540753764018167*^9}, {3.564997352743542*^9, 3.564997400399442*^9}, { 3.564997618247028*^9, 3.564997624921703*^9}, {3.564998155552283*^9, 3.564998228214541*^9}, 3.565001326848216*^9, {3.565001373733612*^9, 3.565001375139058*^9}, 3.565001518000355*^9, 3.565002035005992*^9, 3.565002516390648*^9, {3.565002563921222*^9, 3.56500257638392*^9}, { 3.567596710579924*^9, 3.567596759606003*^9}, {3.56759764835381*^9, 3.56759775870262*^9}, {3.567598027230908*^9, 3.567598041572603*^9}, { 3.5675981166399*^9, 3.5675981296506*^9}, {3.5675981726941*^9, 3.567598185445903*^9}, {3.56759826912878*^9, 3.567598327975194*^9}, { 3.567598409899761*^9, 3.567598482664264*^9}, {3.567598526574879*^9, 3.567598539318888*^9}, 3.567605563231222*^9, {3.568630430458819*^9, 3.568630478707133*^9}, {3.568668736669972*^9, 3.568668803388808*^9}, { 3.568668870806127*^9, 3.568668872395226*^9}, {3.568669158378595*^9, 3.568669168296597*^9}, {3.568678872442663*^9, 3.568678897862581*^9}, { 3.568678941351205*^9, 3.568679097418097*^9}, {3.568679155248096*^9, 3.568679248388562*^9}, {3.5686793126389*^9, 3.568679315924913*^9}, { 3.568679766339415*^9, 3.568679777827171*^9}, {3.568679818918575*^9, 3.56867981964306*^9}, {3.568679873094235*^9, 3.568679898653396*^9}, { 3.568679934553056*^9, 3.568679962490627*^9}, {3.568680177603318*^9, 3.568680251376718*^9}, {3.568680292933841*^9, 3.568680351841859*^9}, { 3.56868038220775*^9, 3.568680429143451*^9}, {3.568680562940537*^9, 3.568680596530618*^9}, 3.568680734642636*^9, {3.568680793473415*^9, 3.568680798157031*^9}, {3.568680911154834*^9, 3.568680935027659*^9}, { 3.56868103866392*^9, 3.568681078727099*^9}, {3.568681187492194*^9, 3.568681271551631*^9}, {3.568681372427408*^9, 3.56868137727625*^9}, { 3.568681444889926*^9, 3.568681505032749*^9}, {3.568681540030517*^9, 3.568681594100103*^9}, {3.568681640137972*^9, 3.568681664020197*^9}, { 3.56868171737624*^9, 3.56868172530616*^9}, {3.568681853181549*^9, 3.568681882612227*^9}, {3.568681916721196*^9, 3.56868195098064*^9}, { 3.568681981120283*^9, 3.568682007703193*^9}, {3.56868207387051*^9, 3.568682119226568*^9}, {3.568682227045907*^9, 3.568682258178793*^9}, { 3.568682355217946*^9, 3.568682372598966*^9}, {3.568682408320554*^9, 3.568682579439678*^9}, {3.568682610128814*^9, 3.568682612561135*^9}, { 3.568827271641484*^9, 3.568827273286065*^9}, {3.568829963841614*^9, 3.568829970894355*^9}, {3.568969186183407*^9, 3.568969208017507*^9}, { 3.568969425305834*^9, 3.568969486543167*^9}, {3.56896951895839*^9, 3.568969519404896*^9}, {3.568969579332451*^9, 3.568969619854559*^9}, { 3.568969744851381*^9, 3.568969861791901*^9}, {3.568970370704079*^9, 3.568970391889502*^9}, {3.568970432761732*^9, 3.568970447575567*^9}, { 3.568970547338049*^9, 3.568970552372111*^9}, 3.568975959292311*^9, { 3.569762975777167*^9, 3.569763026166416*^9}, 3.569763062653064*^9, { 3.569763111220853*^9, 3.569763140991094*^9}, {3.569763312110693*^9, 3.569763324766286*^9}, {3.569763383962049*^9, 3.569763421557141*^9}, { 3.569763703978559*^9, 3.569763796538508*^9}, {3.569763896525487*^9, 3.569763897055728*^9}, {3.569763929315848*^9, 3.569764020759103*^9}, { 3.569764216991411*^9, 3.569764261982836*^9}, {3.569764307311641*^9, 3.569764315581581*^9}, {3.569764498256791*^9, 3.569764519613752*^9}, { 3.569764555102242*^9, 3.569764573414726*^9}, {3.569764637486024*^9, 3.569764650595134*^9}, {3.569764691152133*^9, 3.569764711865937*^9}, { 3.569764756412744*^9, 3.56976475690664*^9}, {3.569764805606193*^9, 3.569764849732327*^9}, {3.569764941828499*^9, 3.569765027214347*^9}, 3.569765074878481*^9, {3.56976513223448*^9, 3.569765278019306*^9}, { 3.569765353389899*^9, 3.569765354655334*^9}, {3.569765439917038*^9, 3.569765545403736*^9}, {3.569765636821247*^9, 3.569765662855901*^9}, { 3.569765941131413*^9, 3.569766005785892*^9}, {3.56976607771329*^9, 3.569766127922046*^9}, {3.56976615799341*^9, 3.569766161533163*^9}, { 3.569766236317416*^9, 3.569766329697606*^9}, {3.569766360817548*^9, 3.569766370177092*^9}, 3.569766419804144*^9, {3.569766465275765*^9, 3.5697665623455*^9}, 3.569766609602087*^9, {3.56977401149254*^9, 3.569774018331704*^9}, {3.569774176127404*^9, 3.569774194150774*^9}, { 3.569774233772049*^9, 3.569774234027557*^9}, {3.56977432980819*^9, 3.569774397358568*^9}, {3.569774834719819*^9, 3.569774840024715*^9}, { 3.569774981422407*^9, 3.569775020088884*^9}, {3.569775474737197*^9, 3.569775475764336*^9}, {3.569775560946701*^9, 3.569775562067044*^9}, { 3.569776200270802*^9, 3.569776205661499*^9}, {3.569776345832273*^9, 3.569776352857099*^9}, {3.56977644192729*^9, 3.569776508039465*^9}, { 3.569776663345551*^9, 3.569776672744076*^9}, {3.569776991085755*^9, 3.569777001718372*^9}, {3.569777477765432*^9, 3.569777498570196*^9}, { 3.569777574499218*^9, 3.569777581649621*^9}, {3.569777688348941*^9, 3.569777707703509*^9}, {3.569777797535417*^9, 3.569777811955187*^9}, { 3.569777845335655*^9, 3.569777868169876*^9}, {3.572048818821806*^9, 3.572048875985749*^9}, {3.578923845228395*^9, 3.578923847029941*^9}, { 3.580502477480934*^9, 3.580502487535712*^9}, {3.580502638302386*^9, 3.580502669456097*^9}, {3.580502731503588*^9, 3.580502732947545*^9}, { 3.580502818222577*^9, 3.580502939138551*^9}, {3.580503017065427*^9, 3.580503067747659*^9}}, CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"nashEquilibria", "::", "usage"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"nashEquilibria", "::", "notes"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"nashEquilibria", "[", RowBox[{"F_", ",", RowBox[{"method_:", "\"\\""}], ",", RowBox[{"variant_:", "\"\\""}], ",", RowBox[{"delta_:", ".001"}], ",", RowBox[{"accuracy_:", "8"}], ",", RowBox[{"gridsize_:", "10"}], " ", ",", RowBox[{"n_:", "100"}], ",", RowBox[{"eps_:", ".01"}], ",", RowBox[{"dim_:", "dim"}]}], "]"}], ":=", RowBox[{"Module", "[", " ", RowBox[{ RowBox[{"{", RowBox[{ "j", ",", "k", ",", "l", ",", "pop", ",", " ", "NE", ",", "RNE", ",", "supports", ",", "sample", ",", "Fx", ",", "flag"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"pop", "=", RowBox[{ RowBox[{"Dimensions", "[", "dim", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"supports", "=", RowBox[{"Tuples", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"Drop", "[", RowBox[{ RowBox[{"Tuples", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "1"}], "}"}], ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}], ",", "1"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"NE", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"RNE", "=", RowBox[{"restrictedEquilibria", "[", RowBox[{ "F", ",", "method", ",", "delta", ",", "accuracy", ",", "gridsize"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "<=", RowBox[{ RowBox[{"Dimensions", "[", "supports", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "Following", " ", "lines", " ", "eliminate", " ", "the", " ", "rest", " ", "points", " ", "that", " ", "are", " ", "not", " ", RowBox[{"NE", "."}]}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"j", "<", RowBox[{ RowBox[{"Dimensions", "[", "supports", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"k", "=", "1"}], ",", RowBox[{"k", "<=", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"RNE", "[", RowBox[{"[", "j", "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", RowBox[{"k", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"RNE", "[", RowBox[{"[", RowBox[{"j", ",", "k"}], "]"}], "]"}], "!=", RowBox[{"{", "}"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Fx", "=", RowBox[{"F", "[", RowBox[{"RNE", "[", RowBox[{"[", RowBox[{"j", ",", "k"}], "]"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"flag", "=", "True"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"method", "==", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ "this", " ", "method", " ", "will", " ", "check", " ", "against", " ", "the", " ", "pure", " ", "strategies", " ", "that", " ", "are", " ", "left", " ", "out", " ", "of", " ", "the", " ", "support"}], ",", " ", RowBox[{ RowBox[{"it", "'"}], "s", " ", "more", " ", "efficient"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"flag", "=", RowBox[{"Apply", "[", RowBox[{"And", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"variationalIneqCheck", "[", RowBox[{ RowBox[{"RNE", "[", RowBox[{"[", RowBox[{"j", ",", "k", ",", "p"}], "]"}], "]"}], ",", RowBox[{"supports", "[", RowBox[{"[", RowBox[{"j", ",", "p"}], "]"}], "]"}], ",", RowBox[{"Fx", "[", RowBox[{"[", "p", "]"}], "]"}], ",", "variant"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ "this", " ", "method", " ", "will", " ", "check", " ", "against", " ", "a", " ", "sample", " ", "of", " ", "points", " ", "around", " ", "the", " ", "subsimplex", " ", "rest", " ", "point"}], ",", " ", RowBox[{ RowBox[{"it", "'"}], "s", " ", "less", " ", "efficient"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sample", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"sampleAround", "[", RowBox[{ RowBox[{"RNE", "[", RowBox[{"[", RowBox[{"j", ",", "k", ",", "p"}], "]"}], "]"}], ",", "eps", ",", "n"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"sample", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"sample", "[", RowBox[{"[", RowBox[{"p", ",", "l"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"l", ",", "n"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"l", "=", "1"}], ",", RowBox[{"l", "<=", " ", "n"}], ",", RowBox[{"l", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"variant", "==", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"flag", "=", RowBox[{"Apply", "[", RowBox[{"And", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"RNE", "[", RowBox[{"[", RowBox[{"j", ",", "k", ",", "p"}], "]"}], "]"}], "-", RowBox[{"sample", "[", RowBox[{"[", RowBox[{"l", ",", "p"}], "]"}], "]"}]}], ")"}], ".", RowBox[{"Fx", "[", RowBox[{"[", "p", "]"}], "]"}]}], ">", "0"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"flag", "=", RowBox[{"Apply", "[", RowBox[{"And", ",", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"RNE", "[", RowBox[{"[", RowBox[{"j", ",", "k", ",", "p"}], "]"}], "]"}], "-", RowBox[{"sample", "[", RowBox[{"[", RowBox[{"l", ",", "p"}], "]"}], "]"}]}], ")"}], ".", RowBox[{"Fx", "[", RowBox[{"[", "p", "]"}], "]"}]}], ">=", "0"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"Print", "[", RowBox[{"i", ",", RowBox[{"RNE", "[", RowBox[{"[", RowBox[{"j", ",", "k"}], "]"}], "]"}]}], "]"}], ";"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"Not", "[", "flag", "]"}], ",", RowBox[{"Break", "[", "]"}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{"flag", ",", RowBox[{"NE", "=", RowBox[{"Append", "[", RowBox[{"NE", ",", RowBox[{"RNE", "[", RowBox[{"[", RowBox[{"j", ",", "k"}], "]"}], "]"}]}], "]"}]}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"RNE", "[", RowBox[{"[", "j", "]"}], "]"}], "!=", RowBox[{"{", RowBox[{"{", "}"}], "}"}]}], ",", RowBox[{"NE", "=", RowBox[{"Join", "[", RowBox[{"NE", ",", RowBox[{"RNE", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}]}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"NE", "=", RowBox[{"eliminateDuplicates", "[", RowBox[{"delta", ",", "NE", ",", "stateNorm"}], "]"}]}], ";", "\[IndentingNewLine]", "NE"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.480859755914381*^9, 3.480859803086256*^9}, { 3.4927384949225636`*^9, 3.4927384965649247`*^9}, {3.492738611690467*^9, 3.492738618640461*^9}, {3.4927389969340396`*^9, 3.492739202284768*^9}, { 3.492739241991864*^9, 3.4927392776030703`*^9}, {3.4927393098294096`*^9, 3.492739365639661*^9}, {3.49273965990279*^9, 3.4927398218055954`*^9}, { 3.4927401200143986`*^9, 3.4927401332634497`*^9}, {3.4927402656037455`*^9, 3.4927402715623136`*^9}, {3.4927403242380576`*^9, 3.4927403915748835`*^9}, {3.492740424862749*^9, 3.4927404981681566`*^9}, { 3.4927410839003983`*^9, 3.4927411585076785`*^9}, {3.49274119194576*^9, 3.4927412457331023`*^9}, {3.4927414952418785`*^9, 3.49274154670588*^9}, { 3.4927415926018753`*^9, 3.492741811536688*^9}, {3.4927737123463345`*^9, 3.49277372551527*^9}, {3.492773790318453*^9, 3.4927739962445602`*^9}, { 3.492774040337963*^9, 3.492774047878806*^9}, {3.492774122205683*^9, 3.4927741233172817`*^9}, {3.4928030379840384`*^9, 3.492803080354965*^9}, { 3.4928031328905077`*^9, 3.4928031330707664`*^9}, {3.492803206506362*^9, 3.492803211894109*^9}, {3.492809882485949*^9, 3.4928099376552787`*^9}, { 3.492811854701856*^9, 3.4928118613414035`*^9}, {3.4928231607942867`*^9, 3.492823209934947*^9}, {3.4928254702951856`*^9, 3.492825474701522*^9}, { 3.4928255099121523`*^9, 3.492825554316002*^9}, 3.4928255864321823`*^9, { 3.493118619884822*^9, 3.4931187334845266`*^9}, 3.493118768437043*^9, { 3.493118806389835*^9, 3.4931188168979745`*^9}, {3.493118914786354*^9, 3.493118932785063*^9}, {3.493118963268123*^9, 3.4931190782962537`*^9}, { 3.493119135718641*^9, 3.493119230732557*^9}, {3.493119393705306*^9, 3.493119407476181*^9}, {3.493119458089608*^9, 3.4931194726242003`*^9}, { 3.4931195670718007`*^9, 3.4931195763050776`*^9}, {3.4931197496042695`*^9, 3.493119835107217*^9}, {3.4931198689659033`*^9, 3.493119924936385*^9}, { 3.493119980546348*^9, 3.4931200701351705`*^9}, {3.4931202061607656`*^9, 3.493120616881353*^9}, {3.493120701452961*^9, 3.4931207637124853`*^9}, { 3.4931282185219755`*^9, 3.493128397228943*^9}, {3.4931284369160104`*^9, 3.493128503772145*^9}, {3.49312859072718*^9, 3.493128596886036*^9}, { 3.4931290508788457`*^9, 3.4931290743125415`*^9}, 3.493129434640668*^9, { 3.493129477872833*^9, 3.493129498562583*^9}, {3.493129564747753*^9, 3.4931295767750473`*^9}, {3.493129828607164*^9, 3.4931300776552773`*^9}, { 3.4931301655416517`*^9, 3.493130375173087*^9}, {3.4931305681706038`*^9, 3.4931308477325945`*^9}, {3.493148731735653*^9, 3.493148732086157*^9}, { 3.4931488597597427`*^9, 3.4931488678513775`*^9}, {3.493149443539176*^9, 3.4931494727812243`*^9}, {3.493149512818795*^9, 3.493149540829072*^9}, { 3.4931496837746177`*^9, 3.493149709141093*^9}, {3.49314977386416*^9, 3.4931499187324705`*^9}, {3.4931499502477875`*^9, 3.4931499934198656`*^9}, {3.4931500737353535`*^9, 3.493150080635275*^9}, { 3.4931534301115856`*^9, 3.4931534434908237`*^9}, {3.4931757142108655`*^9, 3.4931757245757694`*^9}, {3.493177091831787*^9, 3.493177118460077*^9}, { 3.4931774631457105`*^9, 3.493177474371853*^9}, {3.4931784287642016`*^9, 3.4931785281521826`*^9}, {3.4931785963502464`*^9, 3.493178609358952*^9}, { 3.4931787224115133`*^9, 3.4931787226718884`*^9}, {3.493178759995557*^9, 3.493178835594262*^9}, {3.4931788852156143`*^9, 3.493178933475008*^9}, { 3.493178964860138*^9, 3.4931789666827583`*^9}, {3.4931790169049745`*^9, 3.493179023484435*^9}, {3.4931790644733744`*^9, 3.493179065785261*^9}, { 3.493179268286443*^9, 3.4931792911092606`*^9}, {3.493179333149712*^9, 3.493179343925206*^9}, {3.4931794598418865`*^9, 3.493179465570123*^9}, { 3.4931795568513794`*^9, 3.4931795835697985`*^9}, {3.493210770288602*^9, 3.4932107765826526`*^9}, {3.493210808037883*^9, 3.493210963932048*^9}, { 3.493210999187743*^9, 3.4932110399864087`*^9}, {3.4932116965955663`*^9, 3.4932117923132014`*^9}, {3.4932119627332535`*^9, 3.4932119926562805`*^9}, {3.4932122278644934`*^9, 3.4932122502616987`*^9}, {3.4932123411874437`*^9, 3.4932123940784974`*^9}, {3.4932124784247813`*^9, 3.4932125080173335`*^9}, {3.493212607445304*^9, 3.493212777399686*^9}, { 3.4932128346169605`*^9, 3.4932128771130667`*^9}, {3.4932129254225326`*^9, 3.4932129311307406`*^9}, {3.493212964959384*^9, 3.4932130115413656`*^9}, { 3.4932130509280005`*^9, 3.493213060451695*^9}, {3.493213093784625*^9, 3.493213141252881*^9}, {3.4932304372995567`*^9, 3.493230446362991*^9}, { 3.4932305116095705`*^9, 3.4932305121461644`*^9}, {3.4932305741978664`*^9, 3.4932306014590936`*^9}, {3.4932307456320677`*^9, 3.493230773878895*^9}, { 3.4932308296086855`*^9, 3.493230885292202*^9}, {3.4932309584957905`*^9, 3.4932311120825996`*^9}, {3.493231155655254*^9, 3.493231177366473*^9}, { 3.4932313170072665`*^9, 3.4932313337112856`*^9}, {3.4932313767131195`*^9, 3.4932304833349857`*^9}, {3.493231867004605*^9, 3.4932318932022753`*^9}, { 3.4932322080850544`*^9, 3.493232228183955*^9}, {3.493232260660654*^9, 3.4932322707852125`*^9}, {3.4932695180153246`*^9, 3.4932695197378016`*^9}, {3.4932696938081026`*^9, 3.4932697581105647`*^9}, {3.493269851174384*^9, 3.493269852356083*^9}, { 3.4932702736118193`*^9, 3.49327031849636*^9}, {3.4933779894139757`*^9, 3.4933779990177855`*^9}, {3.4933781126912403`*^9, 3.4933783242854977`*^9}, {3.4933784533210416`*^9, 3.49337856959824*^9}, { 3.4933786279120913`*^9, 3.493378646759192*^9}, {3.4933786965007167`*^9, 3.493378874456605*^9}, {3.4934031443286133`*^9, 3.493403186919856*^9}, { 3.493403217784237*^9, 3.4934032211691046`*^9}, {3.507402745162653*^9, 3.5074028861954484`*^9}, {3.507403078497032*^9, 3.5074030958019156`*^9}, { 3.5074034271130886`*^9, 3.5074034272933474`*^9}, {3.5074038088871202`*^9, 3.507403893628973*^9}, {3.507404918137347*^9, 3.507404945646904*^9}, { 3.5074052694725423`*^9, 3.507405271235077*^9}, {3.5074053554122186`*^9, 3.507405356356061*^9}, {3.5074054221171026`*^9, 3.5074055518536544`*^9}, { 3.5074056108384705`*^9, 3.5074056251089907`*^9}, {3.50740658809383*^9, 3.5074065896160192`*^9}, {3.5074067052923536`*^9, 3.507406741425291*^9}, { 3.5074067717898226`*^9, 3.507406772221687*^9}, {3.5074068130824156`*^9, 3.507406897814254*^9}, {3.507407086004859*^9, 3.507407086765953*^9}, { 3.507407124059579*^9, 3.5074071262427177`*^9}, {3.507407358852262*^9, 3.50740737056911*^9}, {3.507407409905673*^9, 3.5074074568631945`*^9}, { 3.507407571798464*^9, 3.5074076550381565`*^9}, {3.507407705864667*^9, 3.507407706034202*^9}, {3.5074077532844954`*^9, 3.507407761576419*^9}, { 3.5074080777750683`*^9, 3.507408202304132*^9}, {3.507408900382826*^9, 3.507408948301892*^9}, {3.507408989090543*^9, 3.507409019364074*^9}, { 3.507409077217263*^9, 3.5074090988383527`*^9}, {3.507409164592903*^9, 3.5074091925030355`*^9}, {3.5074092466772604`*^9, 3.507409294614933*^9}, 3.5074093327497683`*^9, {3.507409415789173*^9, 3.507409551824783*^9}, 3.5074095885676165`*^9, {3.5074096370373125`*^9, 3.5074096425252037`*^9}, { 3.507409699229843*^9, 3.50740970357926*^9}, {3.507409811182789*^9, 3.5074098754151506`*^9}, {3.5074099165442915`*^9, 3.5074099402183332`*^9}, {3.5074100172591124`*^9, 3.507410090181966*^9}, { 3.507410135379363*^9, 3.5074101366101756`*^9}, {3.507410199155735*^9, 3.5074102406153507`*^9}, {3.507410307341298*^9, 3.5074104113459167`*^9}, { 3.5074104942715235`*^9, 3.507410494735777*^9}, {3.507410673978632*^9, 3.5074107008072095`*^9}, {3.5074107351065297`*^9, 3.507410761704776*^9}, { 3.507410800760936*^9, 3.507410828600968*^9}, {3.5074108722537374`*^9, 3.5074109060923953`*^9}, {3.5074109378676157`*^9, 3.507410966274177*^9}, { 3.507411014473307*^9, 3.5074110213632145`*^9}, {3.5074111192840176`*^9, 3.5074111715291424`*^9}, 3.5074133137945113`*^9, {3.507429697020052*^9, 3.507429697580858*^9}, {3.5074297563653865`*^9, 3.507429758258108*^9}, { 3.5074297983457513`*^9, 3.5074298011798267`*^9}, {3.5074302419737926`*^9, 3.507430317051749*^9}, {3.5074304835912213`*^9, 3.5074305171795187`*^9}, { 3.5074305749225492`*^9, 3.507430616902914*^9}, {3.507430714152753*^9, 3.5074307330799685`*^9}, {3.5074308407848406`*^9, 3.507430845671868*^9}, { 3.5074309085622997`*^9, 3.5074309864469614`*^9}, {3.5074310257058115`*^9, 3.507431100753725*^9}, {3.5074312094629297`*^9, 3.5074312147805758`*^9}, { 3.507431267666622*^9, 3.507431283038726*^9}, {3.507431334582843*^9, 3.507431366969413*^9}, {3.50743145062971*^9, 3.507431453644045*^9}, { 3.507431526639006*^9, 3.507431533038208*^9}, 3.5074315770114384`*^9, { 3.5074317413877997`*^9, 3.507431752013078*^9}, {3.507431799901939*^9, 3.5074318517064304`*^9}, {3.507431885174555*^9, 3.507431888769725*^9}, { 3.507432021355441*^9, 3.5074320249906683`*^9}, {3.507432062104035*^9, 3.5074321689576826`*^9}, {3.5074322979832125`*^9, 3.5074323036713915`*^9}, {3.5074323375132103`*^9, 3.5074323409217577`*^9}, {3.5074324216360846`*^9, 3.507432436477425*^9}, { 3.507432483284731*^9, 3.507432485507928*^9}, {3.507432546425523*^9, 3.507432549029267*^9}, {3.507432612851038*^9, 3.507432634982862*^9}, { 3.5074326983539853`*^9, 3.507432707567233*^9}, {3.5074327552958636`*^9, 3.507432783596558*^9}, {3.507433759623076*^9, 3.5074338199197783`*^9}, { 3.507433862240633*^9, 3.507433883771593*^9}, {3.5074339344644856`*^9, 3.5074339465919237`*^9}, {3.5074339992276106`*^9, 3.507434036771596*^9}, { 3.507434072231654*^9, 3.5074340727125945`*^9}, {3.507434190978402*^9, 3.507434197718094*^9}, {3.507434253338071*^9, 3.50743425786458*^9}, { 3.507434534136908*^9, 3.507434645737382*^9}, {3.5074347427068167`*^9, 3.5074349673498373`*^9}, {3.5074350329141145`*^9, 3.5074351091437273`*^9}, {3.5074351391668987`*^9, 3.507435139927993*^9}, { 3.5074351839813385`*^9, 3.50743519147211*^9}, 3.5074352393008842`*^9, { 3.507435376419031*^9, 3.5074353767134867`*^9}, 3.507435505518754*^9, { 3.5074355408796005`*^9, 3.507435634384053*^9}, {3.50743570470517*^9, 3.5074357228612776`*^9}, {3.5074721547880163`*^9, 3.5074721555991826`*^9}, {3.5079092010115876`*^9, 3.5079092063492627`*^9}, {3.5079093533023605`*^9, 3.5079093535627356`*^9}, {3.507981461921159*^9, 3.5079814846939044`*^9}, { 3.5079853078814325`*^9, 3.5079853472680683`*^9}, {3.5130124616650877`*^9, 3.5130124664419565`*^9}, {3.5130129969447823`*^9, 3.513013032646118*^9}, { 3.513013247104494*^9, 3.513013249417821*^9}, {3.513013398752554*^9, 3.5130134215152845`*^9}, {3.513013484485832*^9, 3.5130134890523987`*^9}, { 3.5130184917959905`*^9, 3.5130184935785537`*^9}, 3.5130185260452385`*^9, { 3.519418828964142*^9, 3.519418856352708*^9}, {3.540749559460033*^9, 3.540749559658739*^9}, {3.540749844991627*^9, 3.540749845175496*^9}, { 3.540750079183285*^9, 3.540750079361253*^9}, {3.540750324208343*^9, 3.540750324465142*^9}, {3.540751018366722*^9, 3.540751025383477*^9}, { 3.540751143904863*^9, 3.54075114632085*^9}, {3.540751298504355*^9, 3.540751303423439*^9}, {3.564997845350355*^9, 3.564997852186038*^9}, 3.565001419706606*^9, 3.565001599299682*^9, 3.56500257745459*^9, { 3.565002671070177*^9, 3.56500268901273*^9}, 3.565002768615814*^9, 3.567605757532798*^9, 3.568746292491486*^9, {3.568746417041088*^9, 3.568746417295284*^9}, {3.568746528054455*^9, 3.568746532237424*^9}, { 3.56874667817539*^9, 3.568746681920626*^9}, {3.568746748562174*^9, 3.568746770917701*^9}, {3.56882721396443*^9, 3.568827308409979*^9}, { 3.56882749351184*^9, 3.568827506209362*^9}, {3.568827626293739*^9, 3.568827677716303*^9}, {3.568827765592244*^9, 3.568827777091091*^9}, { 3.568827808215494*^9, 3.568827909259466*^9}, {3.568828154248491*^9, 3.568828167803474*^9}, {3.568828299781924*^9, 3.568828302578163*^9}, { 3.568968385775743*^9, 3.56896839049107*^9}, {3.568969234584629*^9, 3.568969249956544*^9}, {3.568969302043362*^9, 3.568969377101499*^9}, 3.568975966109392*^9, 3.568978086625431*^9, 3.568978164994475*^9, { 3.569773425832835*^9, 3.569773427966245*^9}, {3.569773466271509*^9, 3.569773468117964*^9}, {3.569773525158583*^9, 3.569773532723978*^9}, { 3.569777953672414*^9, 3.569777955373759*^9}, {3.569778004817343*^9, 3.569778034813469*^9}, {3.569778066432153*^9, 3.569778079475755*^9}, { 3.572965939652278*^9, 3.572965943013631*^9}, {3.572965974101273*^9, 3.572965975232315*^9}, {3.580503403706551*^9, 3.580503413751301*^9}, { 3.580503540592406*^9, 3.580503545032809*^9}, {3.580503688267704*^9, 3.580503792499726*^9}, {3.580503828013455*^9, 3.580503830452748*^9}, 3.580515794053752*^9, {3.580515974790649*^9, 3.580516032927355*^9}, 3.580516128552071*^9, {3.58051615893886*^9, 3.580516188436799*^9}}, CellTags->"initcell"] }, Closed]], Cell[CellGroupData[{ Cell["Specification of rest points", "Subsubsection", CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"restPoints", "::", "usage"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"restPoints", "::", "notes"}], " ", "=", " ", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"restPoints", "[", RowBox[{ "dyn_", ",", "F_", ",", "startingValues_", ",", "tolLevel_", ",", RowBox[{"delta_:", ".001"}], ",", RowBox[{"accuracy_:", "8"}]}], "]"}], ":=", RowBox[{"Which", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"RPCharacterization", "[", "dyn", "]"}], "===", " ", "\"\\""}], ",", RowBox[{"restPointsContinuous", "[", RowBox[{ "dyn", ",", "F", ",", "startingValues", ",", "tolLevel", ",", "delta", ",", "accuracy"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"RPCharacterization", "[", "dyn", "]"}], "===", " ", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{"nashEquilibria", "[", RowBox[{ "F", ",", "\"\\"", ",", "\"\\"", ",", "delta", ",", "accuracy"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"RPCharacterization", "[", "dyn", "]"}], "===", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{"restPointsContinuous", "[", RowBox[{ "Replicator", ",", "F", ",", " ", "startingValues", ",", "tolLevel", ",", "delta", ",", "accuracy"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"RPCharacterization", "[", "dyn", "]"}], "===", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{"restrictedEquilibria", "[", "F", "]"}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.47471508216753*^9, 3.4747150946254435`*^9}, { 3.481418886167094*^9, 3.481418886177109*^9}, {3.4817354834747458`*^9, 3.4817354834847603`*^9}, 3.492809407533*^9, {3.49280945318865*^9, 3.4928094540999603`*^9}, {3.4928095514198995`*^9, 3.4928095898751955`*^9}, {3.4928096452848706`*^9, 3.492809851180935*^9}, { 3.4931484968378863`*^9, 3.4931484979594994`*^9}, {3.4931822307562656`*^9, 3.49318232499177*^9}, 3.493182375504403*^9, 3.507405221213149*^9, { 3.5079815138658514`*^9, 3.507981518777915*^9}, 3.5080247838620048`*^9, 3.5080249731141357`*^9, {3.5087644486154013`*^9, 3.5087644547633104`*^9}, { 3.510668458171026*^9, 3.5106684638992634`*^9}, {3.510668527390559*^9, 3.510668545536652*^9}, {3.519418459792026*^9, 3.5194185131320767`*^9}, { 3.519418640620369*^9, 3.519418652019021*^9}, {3.5194190106905355`*^9, 3.5194190138197145`*^9}, {3.56499781957186*^9, 3.564997820315573*^9}, { 3.564998487892445*^9, 3.564998547111822*^9}, {3.56499858720189*^9, 3.564998620775562*^9}, {3.564998671545752*^9, 3.564998671880927*^9}, { 3.565002517798076*^9, 3.565002518574487*^9}, {3.565002578680135*^9, 3.565002579573152*^9}, {3.565002615572716*^9, 3.565002645328796*^9}, 3.565002689936061*^9, {3.56500282498051*^9, 3.565002841100198*^9}, { 3.568829720820553*^9, 3.568829727060228*^9}, {3.568829864582356*^9, 3.568829866946799*^9}, {3.568830423784334*^9, 3.56883044508653*^9}, { 3.568968912241539*^9, 3.568968915226842*^9}, 3.568975972318984*^9, 3.578919628719791*^9}, CellTags->"initcell"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Stability", "Subsection", CellChangeTimes->{{3.492892437555563*^9, 3.49289243918791*^9}}, CellTags->"initcell"], Cell[CellGroupData[{ Cell["Stability Test Subroutine for Smooth Dynamics", "Subsubsection", CellChangeTimes->{{3.492884015927379*^9, 3.4928840408181705`*^9}, { 3.4928843532674503`*^9, 3.492884357158045*^9}}, CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"smoothStabilityTest", "::", "usage"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"smoothStabilityTest", "::", "notes"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Needs", "[", "\"\\"", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"smoothStabilityValues", "[", RowBox[{"x_", ",", "dyn_", ",", "F_", ",", RowBox[{"method_:", "\"\\""}], ",", RowBox[{"accuracy_:", "8"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "j", ",", "p", ",", "dim", ",", "pop", ",", "s", ",", "xv", ",", "xvp", ",", "DV", ",", "DVp", ",", "es", ",", "result"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"pop", "=", RowBox[{ RowBox[{"Dimensions", "[", "x", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"dim", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"method", "==", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"xv", "=", RowBox[{"emptyVector", "[", RowBox[{"\"\\"", ",", RowBox[{"Total", "[", "dim", "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"xvp", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"xv", "[", RowBox[{"[", RowBox[{ RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{"dim", "[", RowBox[{"[", "k", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"p", "-", "1"}]}], "}"}]}], "]"}], "+", "1"}], ";;", RowBox[{"Sum", "[", RowBox[{ RowBox[{"dim", "[", RowBox[{"[", "k", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "p"}], "}"}]}], "]"}]}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"DV", "=", RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{ RowBox[{"dyn", "[", RowBox[{"xvp", ",", "F"}], "]"}], ",", "1"}], "]"}], ",", RowBox[{"{", "xv", "}"}]}], "]"}], "/.", RowBox[{"Thread", "[", RowBox[{"xv", "->", RowBox[{"Flatten", "[", RowBox[{"x", ",", "1"}], "]"}]}], "]"}]}]}], ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"DV", "=", RowBox[{"Transpose", "[", RowBox[{"Flatten", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"ND", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{ RowBox[{"dyn", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"And", "[", RowBox[{ RowBox[{"pt", "==", "p"}], ",", RowBox[{"jt", "==", "j"}]}], "]"}], ",", "s", ",", RowBox[{"x", "[", RowBox[{"[", RowBox[{"pt", ",", "jt"}], "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"jt", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"pt", ",", "pop"}], "}"}]}], "]"}], ",", "F"}], "]"}], ",", "1"}], "]"}], ",", "s", ",", RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}]}], "]"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], ",", "1"}], "]"}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"es", "=", RowBox[{"Eigensystem", "[", RowBox[{"DV", ".", RowBox[{"projectionMatrix", "[", "dim", "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ "notice", " ", "the", " ", "eigenvalues", " ", "could", " ", "be", " ", "complex"}], ";", " ", RowBox[{ RowBox[{"Round", "[", "]"}], " ", "works", " ", RowBox[{"anyway", "."}]}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "not", " ", "checking", " ", "independence", " ", "of", " ", "the", " ", "eigenvectors", " ", "or", " ", "that", " ", "we", " ", "have", " ", "pop", " ", "of", " ", "them"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"DeleteCases", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Round", "[", RowBox[{ RowBox[{"es", "[", RowBox[{"[", RowBox[{"1", ",", "j"}], "]"}], "]"}], ",", RowBox[{"10", "^", RowBox[{"(", RowBox[{"-", "accuracy"}], ")"}]}]}], "]"}], "==", "0"}], " ", "&&", " ", RowBox[{ RowBox[{"Norm", "[", RowBox[{ RowBox[{"es", "[", RowBox[{"[", RowBox[{"2", ",", "j"}], "]"}], "]"}], "-", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"ConstantArray", "[", RowBox[{ RowBox[{"es", "[", RowBox[{"[", RowBox[{"2", ",", "j", ",", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"p", "==", "1"}], ",", "0", ",", RowBox[{"Product", "[", RowBox[{ RowBox[{"dim", "[", RowBox[{"[", "k", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"p", "-", "1"}]}], "}"}]}], "]"}]}], "]"}], "+", "1"}]}], "]"}], "]"}], ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], "]"}]}], "]"}], "<", RowBox[{"10", "^", RowBox[{"(", RowBox[{"-", "accuracy"}], ")"}]}]}]}], "\[IndentingNewLine]", ",", "\"\\"", ",", RowBox[{"{", RowBox[{ RowBox[{"es", "[", RowBox[{"[", RowBox[{"1", ",", "j"}], "]"}], "]"}], ",", RowBox[{"es", "[", RowBox[{"[", RowBox[{"2", ",", "j"}], "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"es", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], ",", "\"\\""}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"smoothStabilityTest", "[", RowBox[{"x_", ",", "dyn_", ",", "F_", ",", RowBox[{"method_:", "\"\\""}], ",", RowBox[{"accuracy_:", "8"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"values", ",", "es"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"values", "=", RowBox[{"Flatten", "[", RowBox[{ RowBox[{"smoothStabilityValues", "[", RowBox[{ "x", ",", "dyn", ",", "F", ",", "method", ",", "accuracy"}], "]"}], ",", "1"}], "]"}]}], ";"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"values", "=", RowBox[{"smoothStabilityValues", "[", RowBox[{"x", ",", "dyn", ",", "F", ",", "method", ",", "accuracy"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"es", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Re", "[", RowBox[{"values", "[", RowBox[{"[", RowBox[{"j", ",", "1"}], "]"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "values", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Which", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Round", "[", RowBox[{ RowBox[{"Max", "[", "es", "]"}], ",", RowBox[{"10", "^", RowBox[{"(", RowBox[{"-", "accuracy"}], ")"}]}]}], "]"}], "<=", "0"}], ",", "1", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Round", "[", RowBox[{ RowBox[{"Min", "[", "es", "]"}], ",", RowBox[{"10", "^", RowBox[{"(", RowBox[{"-", "accuracy"}], ")"}]}]}], "]"}], ">=", "0"}], ",", RowBox[{"-", "1"}], ",", "\[IndentingNewLine]", "True", ",", "0"}], "\[IndentingNewLine]", "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"(*", " ", RowBox[{"Replicator", ",", " ", RowBox[{"1", "-", "2", "-", RowBox[{"3", " ", "coord", "\[IndentingNewLine]", RowBox[{"smoothStabilityTest", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"1", "/", "3"}], ",", RowBox[{"1", "/", "3"}], ",", RowBox[{"1", "/", "3"}]}], "}"}], ",", "dyn", ",", "F", ",", "\"\\"", ",", "10"}], "]"}], "\[IndentingNewLine]", RowBox[{"smoothStabilityTest", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0.6", ",", "0.4"}], "}"}], ",", "dyn", ",", "F", ",", "\"\\""}], "]"}], "\[IndentingNewLine]", RowBox[{"smoothStabilityTest", "[", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "0", ",", "0"}], "}"}], ",", "dyn", ",", "F"}], "]"}]}]}]}], "\[IndentingNewLine]", "*)"}]}]}], "Input", CellChangeTimes->{{3.474715115255108*^9, 3.474715123096383*^9}, { 3.474750910023591*^9, 3.4747509146895523`*^9}, {3.481418886197138*^9, 3.481418886257224*^9}, {3.4817354835448465`*^9, 3.481735483624962*^9}, { 3.48181749117215*^9, 3.4818174942265425`*^9}, 3.4818175865292673`*^9, { 3.489675763578027*^9, 3.489675873818288*^9}, {3.489785598683547*^9, 3.4897856440587935`*^9}, {3.49237910090625*^9, 3.49237910209375*^9}, { 3.49237913315625*^9, 3.492379151359375*^9}, {3.492379210390625*^9, 3.49237924003125*^9}, {3.492379317296875*^9, 3.492379332*^9}, { 3.49237936209375*^9, 3.492379451953125*^9}, {3.492379517359375*^9, 3.492379531265625*^9}, {3.492379716265625*^9, 3.4923797461875*^9}, { 3.492379883828125*^9, 3.492379889296875*^9}, {3.492379930140625*^9, 3.492379994125*^9}, {3.49238009878125*^9, 3.492380113140625*^9}, 3.4923807724375*^9, {3.49238080425*^9, 3.49238084190625*^9}, { 3.4923808950625*^9, 3.492380897484375*^9}, {3.49238101340625*^9, 3.492381108796875*^9}, {3.49238114659375*^9, 3.4923811901875*^9}, { 3.4923812591875*^9, 3.492381376359375*^9}, {3.492381613921875*^9, 3.492381632640625*^9}, {3.492381709359375*^9, 3.49238176990625*^9}, { 3.4923818083125*^9, 3.492381849796875*^9}, {3.492381892984375*^9, 3.492381937421875*^9}, {3.492382001421875*^9, 3.492382151046875*^9}, { 3.49238220828125*^9, 3.49238230375*^9}, {3.4923833268125*^9, 3.492383401375*^9}, 3.492383436609375*^9, {3.4923890745813046`*^9, 3.4923890750031796`*^9}, {3.4923892254875546`*^9, 3.4923892461750546`*^9}, {3.4923893093938046`*^9, 3.4923893293156796`*^9}, 3.4923893621750546`*^9, {3.4923894555969296`*^9, 3.4923895083781796`*^9}, { 3.4923895475656796`*^9, 3.4923895500969296`*^9}, {3.4923895919875546`*^9, 3.4923895927688046`*^9}, {3.4923897556594296`*^9, 3.4923897763156796`*^9}, {3.4923898126281796`*^9, 3.4923901057375546`*^9}, {3.4923901490656796`*^9, 3.4923902065813046`*^9}, {3.4923902863625546`*^9, 3.4923902913156796`*^9}, {3.4923909770813046`*^9, 3.4923909873781796`*^9}, {3.4923911478469296`*^9, 3.4923911614719296`*^9}, {3.4923915060656796`*^9, 3.4923915147063046`*^9}, {3.4923915529563046`*^9, 3.4923915551594296`*^9}, {3.4924594902949204`*^9, 3.4924595552783623`*^9}, {3.4924596130013638`*^9, 3.492459616987095*^9}, { 3.492459657605501*^9, 3.492459666187842*^9}, {3.492460328189754*^9, 3.4924603454045076`*^9}, {3.492460806046879*^9, 3.492460934882135*^9}, { 3.49246098093836*^9, 3.4924609982132006`*^9}, {3.49246221805725*^9, 3.492462219939957*^9}, {3.4924622671478386`*^9, 3.4924622722451687`*^9}, { 3.492462407599799*^9, 3.4924624299719687`*^9}, {3.4924624797435365`*^9, 3.492462483238562*^9}, {3.4924627260076466`*^9, 3.4924628079755106`*^9}, { 3.49246293133289*^9, 3.492463027280856*^9}, {3.492463241408757*^9, 3.492463245434546*^9}, {3.492463530814903*^9, 3.4924635316861553`*^9}, { 3.492465940559946*^9, 3.492466030939906*^9}, {3.492473116338208*^9, 3.4924731246802034`*^9}, {3.4924732190659237`*^9, 3.4924732649719334`*^9}, {3.4924732968778114`*^9, 3.4924732992311954`*^9}, {3.49247481459525*^9, 3.492474816558072*^9}, { 3.492476066385236*^9, 3.4924760684882593`*^9}, {3.4924772069252515`*^9, 3.4924773442126613`*^9}, {3.492477471896261*^9, 3.492477475871978*^9}, { 3.4925115413541183`*^9, 3.4925115439178047`*^9}, {3.492511606317531*^9, 3.492511615230347*^9}, {3.4925117778241453`*^9, 3.4925118154582605`*^9}, { 3.492511893730811*^9, 3.492511925726819*^9}, {3.492512300605869*^9, 3.4925123092583103`*^9}, 3.492512382273301*^9, {3.4925125022658415`*^9, 3.4925125591476336`*^9}, {3.492512683987144*^9, 3.4925126958942657`*^9}, { 3.4925127501522846`*^9, 3.4925127597260513`*^9}, 3.492512801185667*^9, { 3.4925130030359135`*^9, 3.4925130040373535`*^9}, {3.4925139399331055`*^9, 3.492513955235109*^9}, {3.4925140254761105`*^9, 3.4925141280135517`*^9}, { 3.492516660975773*^9, 3.49251669181011*^9}, {3.492516748381456*^9, 3.4925168477843904`*^9}, {3.492516886199629*^9, 3.492516958463539*^9}, { 3.492516989067546*^9, 3.492517010207944*^9}, {3.4925171923097935`*^9, 3.492517198698981*^9}, {3.4925172600471954`*^9, 3.492517295167696*^9}, 3.492517388031227*^9, {3.492517423902808*^9, 3.492517460555512*^9}, { 3.4925175472201295`*^9, 3.492517597933051*^9}, {3.492518873687496*^9, 3.492518874889224*^9}, {3.4925189176106544`*^9, 3.4925189605223584`*^9}, { 3.4925194897633696`*^9, 3.49251956653376*^9}, {3.4925197590606003`*^9, 3.4925197837460957`*^9}, {3.4925204148635983`*^9, 3.492520419460208*^9}, { 3.4925205526717567`*^9, 3.492520561294155*^9}, {3.492522162391488*^9, 3.4925221679194365`*^9}, {3.492531167107565*^9, 3.4925311961092677`*^9}, { 3.49253211714365*^9, 3.492532152013791*^9}, {3.4925321821471205`*^9, 3.492532291634556*^9}, {3.492532325713559*^9, 3.4925323356378293`*^9}, { 3.4925323669027863`*^9, 3.4925324973403463`*^9}, {3.4925327186385574`*^9, 3.4925327346615973`*^9}, {3.4925327793057923`*^9, 3.492532782981077*^9}, { 3.492532852571143*^9, 3.4925328533622804`*^9}, {3.4925329144501204`*^9, 3.4925330995462756`*^9}, {3.492533139663962*^9, 3.492533142518066*^9}, { 3.4925332367335415`*^9, 3.4925332671973457`*^9}, {3.492533312041829*^9, 3.4925333187715063`*^9}, {3.4925333492252965`*^9, 3.4925334183246565`*^9}, {3.4925334999219875`*^9, 3.492533605884354*^9}, { 3.492541976871378*^9, 3.492541982529514*^9}, {3.4925420513985424`*^9, 3.4925421408271346`*^9}, {3.4925421824870386`*^9, 3.492542284944365*^9}, { 3.4925423477947397`*^9, 3.492542358069514*^9}, {3.492542391227192*^9, 3.4925423944418144`*^9}, {3.4925424623895187`*^9, 3.4925424757587423`*^9}, {3.492542514975133*^9, 3.4925425158163424`*^9}, { 3.492542564296053*^9, 3.4925425971733284`*^9}, {3.492698138447184*^9, 3.4926981626219454`*^9}, {3.4927018364584103`*^9, 3.492701844830448*^9}, 3.4927025707010098`*^9, {3.492702605981741*^9, 3.49270260659262*^9}, { 3.4927026692126627`*^9, 3.492702669553152*^9}, {3.492725726818954*^9, 3.492725728952021*^9}, 3.492725824960074*^9, {3.4927264126150804`*^9, 3.492726419565074*^9}, {3.4931286675676713`*^9, 3.49312866849901*^9}, { 3.4933901932623835`*^9, 3.493390193773118*^9}, {3.4959902691492662`*^9, 3.4959903171167774`*^9}, 3.5072556786456265`*^9, 3.507926987388692*^9, { 3.5079815231041355`*^9, 3.507981523434611*^9}, {3.5087902584538436`*^9, 3.508790288687317*^9}, {3.5087954977427745`*^9, 3.5087956931437473`*^9}, { 3.508795835949091*^9, 3.5087958433196898`*^9}, {3.5106594118271484`*^9, 3.510659493304307*^9}, {3.5106598151470942`*^9, 3.510659879349413*^9}, { 3.510659949400141*^9, 3.5106599515432224`*^9}, {3.510660294356163*^9, 3.5106603386298256`*^9}, {3.510660376654502*^9, 3.5106604786211233`*^9}, { 3.510668164238372*^9, 3.5106681981170874`*^9}, {3.511009771198851*^9, 3.5110098252465677`*^9}, 3.51100995689587*^9, {3.511009990263851*^9, 3.5110100009792595`*^9}, {3.5110103054421234`*^9, 3.5110103180202093`*^9}, {3.511010447266056*^9, 3.511010452353371*^9}, { 3.51101049593604*^9, 3.5110105067415776`*^9}, {3.5110105773931694`*^9, 3.5110105777436733`*^9}, {3.511010661694389*^9, 3.511010758513608*^9}, { 3.564854969030057*^9, 3.564854998402191*^9}, {3.564857158213597*^9, 3.56485715903618*^9}, {3.565001327586373*^9, 3.565001328354987*^9}, { 3.565002914236476*^9, 3.565002962298071*^9}, {3.568840793106556*^9, 3.568840798761034*^9}, {3.568840872670655*^9, 3.568840888981353*^9}, { 3.568841176475854*^9, 3.568841199226915*^9}, {3.568841233374522*^9, 3.56884126492218*^9}, {3.568841295873377*^9, 3.568841306733565*^9}, { 3.568841349931065*^9, 3.56884137780304*^9}, {3.568841425342505*^9, 3.568841467415417*^9}, {3.56889136959019*^9, 3.568891467235562*^9}, { 3.568891515817536*^9, 3.568891529192079*^9}, {3.568891561996615*^9, 3.568891655422415*^9}, {3.568891742326039*^9, 3.568891767105301*^9}, { 3.568891899428762*^9, 3.568892022431277*^9}, {3.568892062728783*^9, 3.568892174441185*^9}, {3.568892222744383*^9, 3.568892223139747*^9}, { 3.568892263138347*^9, 3.568892283619491*^9}, {3.568892321960244*^9, 3.568892478175765*^9}, {3.568892568600534*^9, 3.568892572107823*^9}, { 3.5688926059365*^9, 3.568892945951586*^9}, {3.568893842012566*^9, 3.568893891455276*^9}, {3.568894015354597*^9, 3.568894029306415*^9}, { 3.568894061115414*^9, 3.568894106677366*^9}, {3.568894136735361*^9, 3.568894139420607*^9}, {3.568971125401368*^9, 3.568971146322191*^9}, { 3.56897142374485*^9, 3.568971427592911*^9}, {3.568972041627209*^9, 3.568972158952264*^9}, {3.568972190923037*^9, 3.568972247062894*^9}, { 3.568972499545548*^9, 3.568972690603112*^9}, {3.568972764144384*^9, 3.56897276451207*^9}, {3.568972812892229*^9, 3.568972841091582*^9}, { 3.568972910569758*^9, 3.568972950666707*^9}, {3.568972992610442*^9, 3.56897311378804*^9}, {3.568973174761365*^9, 3.568973209801845*^9}, { 3.568973268420467*^9, 3.568973366908359*^9}, {3.568973419882353*^9, 3.568973425708107*^9}, {3.568973543626761*^9, 3.568973551775393*^9}, { 3.568973626157758*^9, 3.568973652542435*^9}, {3.568973819527675*^9, 3.568973888691252*^9}, {3.568973939230755*^9, 3.568974065490488*^9}, { 3.568974330436616*^9, 3.568974331309865*^9}, {3.568974392285582*^9, 3.568974396795987*^9}, {3.568974443428226*^9, 3.568974620580877*^9}, { 3.568980446720792*^9, 3.568980465567609*^9}, {3.5689807237937*^9, 3.568980876153406*^9}, {3.568981526067144*^9, 3.568981531716001*^9}, { 3.568990593520942*^9, 3.5689906153312*^9}, {3.568995295762247*^9, 3.568995316615371*^9}, {3.569101613401916*^9, 3.569101636537304*^9}, { 3.56966702401226*^9, 3.569667086440154*^9}, {3.569667289320993*^9, 3.569667339673549*^9}, {3.56966741493519*^9, 3.569667417197054*^9}, 3.569667457991879*^9, {3.569667495122*^9, 3.569667501677178*^9}, { 3.56966766912401*^9, 3.569667682780354*^9}, {3.56985414223947*^9, 3.569854257145877*^9}, {3.569854388056931*^9, 3.569854395608922*^9}, { 3.569854453949377*^9, 3.56985446476228*^9}, {3.569854507376142*^9, 3.569854532547893*^9}, {3.56985456812061*^9, 3.569854628912508*^9}, 3.56985467002942*^9, {3.569854803149801*^9, 3.569854807101056*^9}, 3.569854892731948*^9, {3.569854984323738*^9, 3.569854986185579*^9}, { 3.569855698662291*^9, 3.569855702685481*^9}, {3.569855876699386*^9, 3.569855899812032*^9}, {3.572048884482949*^9, 3.572048892315936*^9}, { 3.578662245694814*^9, 3.57866229403726*^9}}, CellTags->"initcell"] }, Closed]], Cell[CellGroupData[{ Cell["Numeric Stability Test Subroutine for non Smooth Dynamics", \ "Subsubsection", CellChangeTimes->{{3.492884015927379*^9, 3.4928840408181705`*^9}, { 3.4928840924023447`*^9, 3.492884104690014*^9}, {3.4928842615305395`*^9, 3.4928842813139863`*^9}, {3.492884326949607*^9, 3.492884339717967*^9}}, CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"numericStabilityTest", "::", "usage"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"numericStabilityTest", "::", "notes"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"numericStabilityTest", "[", RowBox[{"x_", ",", "dyn_", ",", "F_", ",", " ", RowBox[{"n_:", "10"}], ",", RowBox[{"T_:", "10"}], ",", " ", RowBox[{"delta_:", ".01"}], ",", " ", RowBox[{"eps_:", ".05"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "j", ",", "k", ",", "dim", ",", "pop", ",", "sample", ",", "ns", ",", "trajectories", ",", "classifiedTrajectories"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"pop", "=", RowBox[{ RowBox[{"Dimensions", "[", "x", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"dim", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"sample", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"sampleAround", "[", RowBox[{ RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}], ",", "eps", ",", "n"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"sample", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"sample", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "n"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "the", " ", "following", " ", "code", " ", "eliminated", " ", "too", " ", "many", " ", "initial", " ", "conditions", " ", "that", " ", "are", " ", "close", " ", "to", " ", "each", " ", "other"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"sample", "=", RowBox[{"DeleteCases", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"stateNorm", "[", RowBox[{"x", "-", RowBox[{"sample", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}], "<", RowBox[{"eps", "/", "3"}]}], ",", "\"\\"", ",", RowBox[{"sample", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "n"}], "}"}]}], "]"}], ",", "\"\\""}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"ns", "=", RowBox[{ RowBox[{"Dimensions", "[", "sample", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"trajectories", " ", "=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"difEqAdvance", "[", RowBox[{ RowBox[{"sample", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "dyn", ",", "F", ",", "T", ",", RowBox[{"AOCharacterization", "[", "dyn", "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", "ns"}], "}"}]}], "]"}]}], ";", RowBox[{"(*", RowBox[{ RowBox[{ RowBox[{"-", " ", "Checking"}], " ", "Stability", " ", "using", " ", "delta", " ", "neighborhood"}], " ", "-"}], "*)"}], "\[IndentingNewLine]", RowBox[{"classifiedTrajectories", " ", "=", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Which", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"stateNorm", "[", RowBox[{"x", "-", RowBox[{"trajectories", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}], "<", "delta"}], ",", "\[IndentingNewLine]", "1", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"stateNorm", "[", RowBox[{"x", "-", RowBox[{"trajectories", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}], ">", RowBox[{"eps", "+", "delta"}]}], ",", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{ RowBox[{"stateNorm", "[", RowBox[{"x", "-", RowBox[{"trajectories", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}], ">", RowBox[{ RowBox[{"stateNorm", "[", RowBox[{"x", "-", RowBox[{"sample", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}], "+", "delta"}]}], ","}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"-", "1"}], ",", "\[IndentingNewLine]", "True", ",", "\[IndentingNewLine]", "0"}], "\[IndentingNewLine]", RowBox[{"(*", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Abs", "[", RowBox[{ RowBox[{"stateNorm", "[", RowBox[{"x", "-", RowBox[{"sample", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}], "-", RowBox[{"stateNorm", "[", RowBox[{"x", "-", RowBox[{"trajectories", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}]}], "]"}], "<", "delta"}], ",", "\[IndentingNewLine]", "0", ",", "\[IndentingNewLine]", "True", ",", "\[IndentingNewLine]", RowBox[{"-", "1"}]}], "\[IndentingNewLine]", "*)"}], "\[IndentingNewLine]", RowBox[{"(*", "\[IndentingNewLine]", RowBox[{ RowBox[{ "notice", " ", "that", " ", "the", " ", "time", " ", "elapsed", " ", "has", " ", "to", " ", "be", " ", "large", " ", "if", " ", "we", " ", "want", " ", "to", " ", "capture", " ", "a", " ", "cycle", " ", "that", " ", "is", " ", "spiriling", " ", "outwards", " ", RowBox[{"(", RowBox[{"heteroclinic", " ", "cycle"}], ")"}]}], ",", " ", RowBox[{ "so", " ", "that", " ", "the", " ", "traj", " ", "is", " ", "suf", " ", "further", " ", "away", " ", "from", " ", "the", " ", "rest", " ", "point", " ", "than", " ", "the", " ", "initial", " ", RowBox[{"trajectory", ".", " ", "However"}]}], ",", " ", RowBox[{ RowBox[{ "the", " ", "values", " ", "returned", " ", "will", " ", "be", " ", "either", " ", "0", " ", "or"}], " ", "-", RowBox[{"1", " ", "but", " ", "the", " ", "point", " ", RowBox[{"won", "'"}], "t", " ", "be", " ", "confused", " ", "with", " ", "a", " ", "stable", " ", "rest", " ", RowBox[{"point", "."}]}]}]}], "\[IndentingNewLine]", "*)"}], "\[IndentingNewLine]", "]"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"j", ",", "ns"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Which", "[", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ RowBox[{"Min", "[", "classifiedTrajectories", "]"}], "==", "1"}], ","}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"And", "[", RowBox[{ RowBox[{ RowBox[{"Min", "[", "classifiedTrajectories", "]"}], ">=", "0"}], ",", RowBox[{ RowBox[{"Max", "[", "classifiedTrajectories", "]"}], "==", "1"}]}], "]"}], ",", "\[IndentingNewLine]", "1", ",", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ RowBox[{"Max", "[", "classifiedTrajectories", "]"}], "==", RowBox[{"-", "1"}]}], ","}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"And", "[", RowBox[{ RowBox[{ RowBox[{"Max", "[", "classifiedTrajectories", "]"}], "<=", "0"}], ",", RowBox[{ RowBox[{"Min", "[", "classifiedTrajectories", "]"}], "==", RowBox[{"-", "1"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"-", "1"}], ",", "\[IndentingNewLine]", RowBox[{"And", "[", RowBox[{ RowBox[{ RowBox[{"Min", "[", "classifiedTrajectories", "]"}], "==", "0"}], " ", ",", RowBox[{ RowBox[{"Max", "[", "classifiedTrajectories", "]"}], "==", "0"}]}], "]"}], ",", "\[IndentingNewLine]", "0", ",", "\[IndentingNewLine]", RowBox[{"And", "[", RowBox[{ RowBox[{ RowBox[{"Min", "[", "classifiedTrajectories", "]"}], "==", RowBox[{"-", "1"}]}], ",", RowBox[{ RowBox[{"Max", "[", "classifiedTrajectories", "]"}], "==", "1"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"-", "2"}], ",", "\[IndentingNewLine]", "True", ",", "\[IndentingNewLine]", RowBox[{"-", "3"}]}], "\[IndentingNewLine]", "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.474715115255108*^9, 3.474715123096383*^9}, { 3.474750910023591*^9, 3.4747509146895523`*^9}, {3.481418886197138*^9, 3.481418886257224*^9}, {3.4817354835448465`*^9, 3.481735483624962*^9}, { 3.48181749117215*^9, 3.4818174942265425`*^9}, 3.4818175865292673`*^9, 3.4887257424375*^9, {3.492477459528477*^9, 3.492477461831789*^9}, { 3.492682907761492*^9, 3.4926830408528676`*^9}, {3.4926830726185446`*^9, 3.4926831446220803`*^9}, {3.492683322097277*^9, 3.492683370476844*^9}, { 3.492683465323226*^9, 3.4926835676804085`*^9}, {3.492683604493343*^9, 3.49268362499282*^9}, {3.4926837660256147`*^9, 3.4926840173169537`*^9}, { 3.492684146923319*^9, 3.4926841868407173`*^9}, 3.492684396361994*^9, { 3.4926845611589603`*^9, 3.492684589299424*^9}, {3.4926964124312925`*^9, 3.4926964418059053`*^9}, {3.492696480813327*^9, 3.4926965404234333`*^9}, { 3.492696673725789*^9, 3.4926966905800242`*^9}, {3.492696734312909*^9, 3.492696762448355*^9}, {3.4926968924247365`*^9, 3.4926969666311903`*^9}, 3.492697064677194*^9, {3.4926973210858917`*^9, 3.492697331871401*^9}, { 3.4926973943011703`*^9, 3.492697432836581*^9}, {3.492697486283434*^9, 3.492697493213399*^9}, {3.492697609240237*^9, 3.4926978239390945`*^9}, { 3.492697877165631*^9, 3.492698118077894*^9}, {3.4926981528078337`*^9, 3.492698157504587*^9}, {3.492698244154251*^9, 3.492698244654971*^9}, { 3.4926984974184275`*^9, 3.49269850154436*^9}, {3.4926985324588127`*^9, 3.492698622918888*^9}, {3.4926986837763968`*^9, 3.492698712788499*^9}, { 3.4926989262100673`*^9, 3.4926990415759554`*^9}, {3.492699108912781*^9, 3.4926991187669506`*^9}, {3.492699192012272*^9, 3.49269920347876*^9}, { 3.492699283719208*^9, 3.4926992858823185`*^9}, {3.4926993165864687`*^9, 3.4926993225149937`*^9}, {3.492699613543472*^9, 3.4926999789713826`*^9}, { 3.4927025086017156`*^9, 3.492702509713314*^9}, {3.492702637587188*^9, 3.492702639980629*^9}, {3.4927026763028584`*^9, 3.492702676503146*^9}, { 3.4928175821325645`*^9, 3.492817583835013*^9}, {3.4928177008632913`*^9, 3.4928177068519025`*^9}, {3.492856947654248*^9, 3.4928569504783087`*^9}, { 3.4928571530896497`*^9, 3.4928571759725533`*^9}, {3.492857288564453*^9, 3.492857336273054*^9}, {3.4928576688012066`*^9, 3.4928576793263407`*^9}, { 3.4928636806948195`*^9, 3.4928636859724083`*^9}, {3.492863790312442*^9, 3.49286381536847*^9}, {3.492877865837265*^9, 3.492877938597926*^9}, { 3.4928779731364784`*^9, 3.4928779771074095`*^9}, {3.4928826507493496`*^9, 3.492882651545494*^9}, {3.492882710970944*^9, 3.492882816422576*^9}, { 3.4928830617703686`*^9, 3.4928831038608923`*^9}, {3.492883164848588*^9, 3.492883169790694*^9}, 3.4928833139980545`*^9, {3.492883567127036*^9, 3.4928835759447155`*^9}, {3.4928844189118423`*^9, 3.49288443071882*^9}, { 3.492884802278096*^9, 3.4928848092030535`*^9}, {3.492884892032156*^9, 3.492884903673896*^9}, {3.4928850421880693`*^9, 3.4928850603642054`*^9}, { 3.4928852178333693`*^9, 3.4928854336632395`*^9}, {3.4928860358603544`*^9, 3.492886040952677*^9}, {3.492886656913385*^9, 3.4928866858149433`*^9}, 3.492886723218727*^9, {3.492886789283724*^9, 3.4928868331017313`*^9}, { 3.4928931807842736`*^9, 3.492893188625549*^9}, {3.4931301016597943`*^9, 3.493130103222041*^9}, {3.4932899980091777`*^9, 3.493290016175299*^9}, { 3.4932900895908656`*^9, 3.4932901310304527`*^9}, {3.493290447655738*^9, 3.4932904678247395`*^9}, {3.4932905433934016`*^9, 3.4932905480100403`*^9}, {3.4932906470624704`*^9, 3.493290653021038*^9}, { 3.4932908192600784`*^9, 3.4932908248180704`*^9}, {3.493290865586693*^9, 3.4932908664879885`*^9}, {3.493291323555219*^9, 3.4932914046117725`*^9}, 3.493291439341712*^9, {3.4932916075636034`*^9, 3.4932916107982545`*^9}, { 3.5079265451628017`*^9, 3.5079265453530755`*^9}, {3.5079267040112147`*^9, 3.507926730599447*^9}, {3.5079275829610505`*^9, 3.507927743682156*^9}, { 3.5079278172579527`*^9, 3.5079278245083785`*^9}, 3.507927870083913*^9, { 3.5079279731320887`*^9, 3.5079279825556393`*^9}, {3.507928245884287*^9, 3.5079282563593493`*^9}, 3.5079283385875883`*^9, {3.50792866276373*^9, 3.5079286672702103`*^9}, {3.5079286996267366`*^9, 3.5079287095810504`*^9}, {3.507928799380175*^9, 3.507928835021425*^9}, { 3.507928878764324*^9, 3.507928901046364*^9}, {3.5079294464406023`*^9, 3.5079294499856997`*^9}, {3.5079296248471384`*^9, 3.507929629163345*^9}, { 3.5079298106142583`*^9, 3.5079298468263288`*^9}, {3.5079299137725925`*^9, 3.5079299232762585`*^9}, {3.50793017577934*^9, 3.5079301998539577`*^9}, { 3.5079303217392197`*^9, 3.507930326576175*^9}, {3.5079304222539034`*^9, 3.5079304252769513`*^9}, {3.5079304874125147`*^9, 3.5079305177561464`*^9}, {3.5079815280011773`*^9, 3.5079815518554783`*^9}, {3.508019874587063*^9, 3.508019879353917*^9}, { 3.508765099115571*^9, 3.508765122999915*^9}, {3.5211469204557405`*^9, 3.5211469403688793`*^9}, {3.521147176533387*^9, 3.521147186874979*^9}, 3.521147233427642*^9, {3.5211482924422135`*^9, 3.5211483020037603`*^9}, { 3.521148347172344*^9, 3.521148373636858*^9}, 3.5211484790418863`*^9, { 3.5211490263371897`*^9, 3.5211490301774096`*^9}, 3.5586450736904907`*^9, { 3.565001009045205*^9, 3.565001019249157*^9}, 3.565001420423271*^9, 3.565001599997953*^9, {3.565003009914687*^9, 3.565003035602486*^9}, { 3.568968296550251*^9, 3.568968298437301*^9}, {3.568968408258742*^9, 3.568968423323152*^9}, {3.568968455517205*^9, 3.568968485691472*^9}, { 3.568975425505143*^9, 3.568975439501072*^9}, {3.568975665768309*^9, 3.568975694977318*^9}, {3.568975981205662*^9, 3.568975988681881*^9}, { 3.568976620501979*^9, 3.568976621184922*^9}, {3.568976675371062*^9, 3.568976722862142*^9}, {3.568976820709857*^9, 3.56897688014082*^9}, { 3.568977566780299*^9, 3.568977574286841*^9}, {3.568977614620002*^9, 3.568977660062113*^9}, 3.568978095380722*^9, 3.568978171730311*^9, { 3.568979004569296*^9, 3.568979010545385*^9}, {3.568979078815326*^9, 3.568979089803125*^9}, {3.568979121638174*^9, 3.568979126116885*^9}, { 3.56897917576291*^9, 3.568979177730925*^9}, 3.568979233647085*^9, { 3.568979956024827*^9, 3.568979957973686*^9}, {3.568980010513315*^9, 3.568980020643322*^9}, {3.569856018300348*^9, 3.569856085941767*^9}, { 3.569856170363334*^9, 3.569856212978625*^9}, {3.569856459362577*^9, 3.569856587696193*^9}, {3.569856660810249*^9, 3.569856687474924*^9}, { 3.569856877953837*^9, 3.569856878365327*^9}, {3.569857217064699*^9, 3.569857217297716*^9}, {3.56985727309924*^9, 3.569857278241017*^9}, 3.569857356411856*^9, 3.580643669686709*^9, 3.580643703638554*^9}, CellTags->"initcell"] }, Closed]], Cell[CellGroupData[{ Cell["Regular ESS", "Subsubsection", CellChangeTimes->{{3.492884015927379*^9, 3.4928840408181705`*^9}, { 3.4928843532674503`*^9, 3.492884357158045*^9}, {3.4933791612990637`*^9, 3.493379172795595*^9}, {3.493414446350122*^9, 3.4934144598595476`*^9}, 3.5106571861789775`*^9}, CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"regularESSTest", "::", "usage"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"regularESSTest", "::", "notes"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Needs", "[", "\"\\"", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"regularESSTest", "[", RowBox[{"x_", ",", "F_", ",", RowBox[{"method_:", "\"\\""}], ",", RowBox[{"accuracy_:", "8"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "j", ",", "k", ",", "dim", ",", "pop", ",", "subdim", ",", "s", ",", "xv", ",", "xvp", ",", "DF", ",", "project", ",", "matrix", ",", "support", ",", "es"}], "}"}], ",", " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"pop", "=", RowBox[{ RowBox[{"Dimensions", "[", "x", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"dim", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"method", "==", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"xv", "=", RowBox[{"emptyVector", "[", RowBox[{"\"\\"", ",", RowBox[{"Total", "[", "dim", "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"xvp", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"xv", "[", RowBox[{"[", RowBox[{ RowBox[{ RowBox[{"Sum", "[", RowBox[{ RowBox[{"dim", "[", RowBox[{"[", "k", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"p", "-", "1"}]}], "}"}]}], "]"}], "+", "1"}], ";;", RowBox[{"Sum", "[", RowBox[{ RowBox[{"dim", "[", RowBox[{"[", "k", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", "p"}], "}"}]}], "]"}]}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"DF", "=", RowBox[{ RowBox[{"D", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{ RowBox[{"F", "[", "xvp", "]"}], ",", "1"}], "]"}], ",", RowBox[{"{", "xv", "}"}]}], "]"}], "/.", RowBox[{"Thread", "[", RowBox[{"xv", "->", RowBox[{"Flatten", "[", RowBox[{"x", ",", "1"}], "]"}]}], "]"}]}]}], ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"DF", "=", RowBox[{"Transpose", "[", RowBox[{"Flatten", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"ND", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{ RowBox[{"F", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"And", "[", RowBox[{ RowBox[{"pt", "==", "p"}], ",", RowBox[{"jt", "==", "j"}]}], "]"}], ",", "s", ",", RowBox[{"x", "[", RowBox[{"[", RowBox[{"pt", ",", "jt"}], "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"jt", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"pt", ",", "pop"}], "}"}]}], "]"}], "]"}], ",", "1"}], "]"}], ",", "s", ",", RowBox[{"x", "[", RowBox[{"[", RowBox[{"p", ",", "j"}], "]"}], "]"}]}], "]"}], "\[IndentingNewLine]", ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], ",", "1"}], "]"}], "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"matrix", "=", RowBox[{"DF", "+", RowBox[{"Transpose", "[", "DF", "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"support", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"ConstantArray", "[", RowBox[{"1", ",", RowBox[{"dim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}], "-", RowBox[{"checkBoundary", "[", RowBox[{ RowBox[{"x", "[", RowBox[{"[", "p", "]"}], "]"}], ",", RowBox[{"10", "^", RowBox[{"(", RowBox[{"-", "accuracy"}], ")"}]}]}], "]"}]}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"matrix", "=", RowBox[{"subMatrix", "[", RowBox[{"matrix", ",", RowBox[{"Flatten", "[", RowBox[{"support", ",", "1"}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"subdim", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Total", "[", RowBox[{"support", "[", RowBox[{"[", "p", "]"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"project", "=", RowBox[{"projectionMatrix", "[", "subdim", "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"es", "=", RowBox[{"Eigensystem", "[", RowBox[{"project", ".", "matrix", ".", "project"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"es", "=", RowBox[{"DeleteCases", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"Round", "[", RowBox[{ RowBox[{"es", "[", RowBox[{"[", RowBox[{"1", ",", "j"}], "]"}], "]"}], ",", RowBox[{"10", "^", RowBox[{"(", RowBox[{"-", "accuracy"}], ")"}]}]}], "]"}], "==", "0"}], " ", "&&", " ", RowBox[{ RowBox[{"es", "[", RowBox[{"[", RowBox[{"2", ",", "j"}], "]"}], "]"}], "==", RowBox[{"Flatten", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"ConstantArray", "[", RowBox[{ RowBox[{"es", "[", RowBox[{"[", RowBox[{"2", ",", "j", ",", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"p", "==", "1"}], ",", "0", ",", RowBox[{"Product", "[", RowBox[{ RowBox[{"subdim", "[", RowBox[{"[", "k", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"k", ",", RowBox[{"p", "-", "1"}]}], "}"}]}], "]"}]}], "]"}], "+", "1"}]}], "]"}], "]"}], ",", RowBox[{"subdim", "[", RowBox[{"[", "p", "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}], "]"}]}]}], ",", "\"\\"", ",", RowBox[{"{", RowBox[{ RowBox[{"es", "[", RowBox[{"[", RowBox[{"1", ",", "j"}], "]"}], "]"}], ",", RowBox[{"es", "[", RowBox[{"[", RowBox[{"2", ",", "j"}], "]"}], "]"}]}], "}"}]}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", RowBox[{"es", "[", RowBox[{"[", "1", "]"}], "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}], ",", "\"\\""}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"es", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"Re", "[", RowBox[{"es", "[", RowBox[{"[", RowBox[{"j", ",", "1"}], "]"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{ RowBox[{"Dimensions", "[", "es", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Round", "[", RowBox[{ RowBox[{"Max", "[", "es", "]"}], ",", RowBox[{"10", "^", RowBox[{"(", RowBox[{"-", "accuracy"}], ")"}]}]}], "]"}], "<", "0"}], ",", "1", ",", RowBox[{"If", "[", RowBox[{ RowBox[{"And", "[", RowBox[{ RowBox[{ RowBox[{"Max", "[", "es", "]"}], "==", "0"}], ",", RowBox[{ RowBox[{"Min", "[", "es", "]"}], "==", "0"}]}], "]"}], ",", RowBox[{"-", "1"}], ",", "0"}], "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"(*", " ", RowBox[{"Replicator", ",", " ", RowBox[{"1", "-", "2", "-", RowBox[{"3", " ", "coord", "\[IndentingNewLine]", RowBox[{"regularESSTest", "[", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{ RowBox[{"1", "/", "3"}], ",", RowBox[{"1", "/", "3"}], ",", RowBox[{"1", "/", "3"}]}], "}"}], "}"}], ",", "Replicator", ",", "Fmp", ",", "\"\\"", ",", "10"}], "]"}], "\[IndentingNewLine]", RowBox[{"regularESSTest", "[", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{"0", ",", "0.6", ",", "0.4"}], "}"}], "}"}], ",", "Replicator", ",", "Fmp", ",", "\"\\""}], "]"}], "\[IndentingNewLine]", RowBox[{"regularESSTest", "[", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{"1", ",", "0", ",", "0"}], "}"}], "}"}], ",", "Replicator", ",", "Fmp"}], "]"}]}]}]}], "\[IndentingNewLine]", "*)"}]}]}], "Input",\ CellChangeTimes->{{3.474715115255108*^9, 3.474715123096383*^9}, { 3.474750910023591*^9, 3.4747509146895523`*^9}, {3.481418886197138*^9, 3.481418886257224*^9}, {3.4817354835448465`*^9, 3.481735483624962*^9}, { 3.48181749117215*^9, 3.4818174942265425`*^9}, 3.4818175865292673`*^9, { 3.489675763578027*^9, 3.489675873818288*^9}, {3.489785598683547*^9, 3.4897856440587935`*^9}, {3.49237910090625*^9, 3.49237910209375*^9}, { 3.49237913315625*^9, 3.492379151359375*^9}, {3.492379210390625*^9, 3.49237924003125*^9}, {3.492379317296875*^9, 3.492379332*^9}, { 3.49237936209375*^9, 3.492379451953125*^9}, {3.492379517359375*^9, 3.492379531265625*^9}, {3.492379716265625*^9, 3.4923797461875*^9}, { 3.492379883828125*^9, 3.492379889296875*^9}, {3.492379930140625*^9, 3.492379994125*^9}, {3.49238009878125*^9, 3.492380113140625*^9}, 3.4923807724375*^9, {3.49238080425*^9, 3.49238084190625*^9}, { 3.4923808950625*^9, 3.492380897484375*^9}, {3.49238101340625*^9, 3.492381108796875*^9}, {3.49238114659375*^9, 3.4923811901875*^9}, { 3.4923812591875*^9, 3.492381376359375*^9}, {3.492381613921875*^9, 3.492381632640625*^9}, {3.492381709359375*^9, 3.49238176990625*^9}, { 3.4923818083125*^9, 3.492381849796875*^9}, {3.492381892984375*^9, 3.492381937421875*^9}, {3.492382001421875*^9, 3.492382151046875*^9}, { 3.49238220828125*^9, 3.49238230375*^9}, {3.4923833268125*^9, 3.492383401375*^9}, 3.492383436609375*^9, {3.4923890745813046`*^9, 3.4923890750031796`*^9}, {3.4923892254875546`*^9, 3.4923892461750546`*^9}, {3.4923893093938046`*^9, 3.4923893293156796`*^9}, 3.4923893621750546`*^9, {3.4923894555969296`*^9, 3.4923895083781796`*^9}, { 3.4923895475656796`*^9, 3.4923895500969296`*^9}, {3.4923895919875546`*^9, 3.4923895927688046`*^9}, {3.4923897556594296`*^9, 3.4923897763156796`*^9}, {3.4923898126281796`*^9, 3.4923901057375546`*^9}, {3.4923901490656796`*^9, 3.4923902065813046`*^9}, {3.4923902863625546`*^9, 3.4923902913156796`*^9}, {3.4923909770813046`*^9, 3.4923909873781796`*^9}, {3.4923911478469296`*^9, 3.4923911614719296`*^9}, {3.4923915060656796`*^9, 3.4923915147063046`*^9}, {3.4923915529563046`*^9, 3.4923915551594296`*^9}, {3.4924594902949204`*^9, 3.4924595552783623`*^9}, {3.4924596130013638`*^9, 3.492459616987095*^9}, { 3.492459657605501*^9, 3.492459666187842*^9}, {3.492460328189754*^9, 3.4924603454045076`*^9}, {3.492460806046879*^9, 3.492460934882135*^9}, { 3.49246098093836*^9, 3.4924609982132006`*^9}, {3.49246221805725*^9, 3.492462219939957*^9}, {3.4924622671478386`*^9, 3.4924622722451687`*^9}, { 3.492462407599799*^9, 3.4924624299719687`*^9}, {3.4924624797435365`*^9, 3.492462483238562*^9}, {3.4924627260076466`*^9, 3.4924628079755106`*^9}, { 3.49246293133289*^9, 3.492463027280856*^9}, {3.492463241408757*^9, 3.492463245434546*^9}, {3.492463530814903*^9, 3.4924635316861553`*^9}, { 3.492465940559946*^9, 3.492466030939906*^9}, {3.492473116338208*^9, 3.4924731246802034`*^9}, {3.4924732190659237`*^9, 3.4924732649719334`*^9}, {3.4924732968778114`*^9, 3.4924732992311954`*^9}, {3.49247481459525*^9, 3.492474816558072*^9}, { 3.492476066385236*^9, 3.4924760684882593`*^9}, {3.4924772069252515`*^9, 3.4924773442126613`*^9}, {3.492477471896261*^9, 3.492477475871978*^9}, { 3.4925115413541183`*^9, 3.4925115439178047`*^9}, {3.492511606317531*^9, 3.492511615230347*^9}, {3.4925117778241453`*^9, 3.4925118154582605`*^9}, { 3.492511893730811*^9, 3.492511925726819*^9}, {3.492512300605869*^9, 3.4925123092583103`*^9}, 3.492512382273301*^9, {3.4925125022658415`*^9, 3.4925125591476336`*^9}, {3.492512683987144*^9, 3.4925126958942657`*^9}, { 3.4925127501522846`*^9, 3.4925127597260513`*^9}, 3.492512801185667*^9, { 3.4925130030359135`*^9, 3.4925130040373535`*^9}, {3.4925139399331055`*^9, 3.492513955235109*^9}, {3.4925140254761105`*^9, 3.4925141280135517`*^9}, { 3.492516660975773*^9, 3.49251669181011*^9}, {3.492516748381456*^9, 3.4925168477843904`*^9}, {3.492516886199629*^9, 3.492516958463539*^9}, { 3.492516989067546*^9, 3.492517010207944*^9}, {3.4925171923097935`*^9, 3.492517198698981*^9}, {3.4925172600471954`*^9, 3.492517295167696*^9}, 3.492517388031227*^9, {3.492517423902808*^9, 3.492517460555512*^9}, { 3.4925175472201295`*^9, 3.492517597933051*^9}, {3.492518873687496*^9, 3.492518874889224*^9}, {3.4925189176106544`*^9, 3.4925189605223584`*^9}, { 3.4925194897633696`*^9, 3.49251956653376*^9}, {3.4925197590606003`*^9, 3.4925197837460957`*^9}, {3.4925204148635983`*^9, 3.492520419460208*^9}, { 3.4925205526717567`*^9, 3.492520561294155*^9}, {3.492522162391488*^9, 3.4925221679194365`*^9}, {3.492531167107565*^9, 3.4925311961092677`*^9}, { 3.49253211714365*^9, 3.492532152013791*^9}, {3.4925321821471205`*^9, 3.492532291634556*^9}, {3.492532325713559*^9, 3.4925323356378293`*^9}, { 3.4925323669027863`*^9, 3.4925324973403463`*^9}, {3.4925327186385574`*^9, 3.4925327346615973`*^9}, {3.4925327793057923`*^9, 3.492532782981077*^9}, { 3.492532852571143*^9, 3.4925328533622804`*^9}, {3.4925329144501204`*^9, 3.4925330995462756`*^9}, {3.492533139663962*^9, 3.492533142518066*^9}, { 3.4925332367335415`*^9, 3.4925332671973457`*^9}, {3.492533312041829*^9, 3.4925333187715063`*^9}, {3.4925333492252965`*^9, 3.4925334183246565`*^9}, {3.4925334999219875`*^9, 3.492533605884354*^9}, { 3.492541976871378*^9, 3.492541982529514*^9}, {3.4925420513985424`*^9, 3.4925421408271346`*^9}, {3.4925421824870386`*^9, 3.492542284944365*^9}, { 3.4925423477947397`*^9, 3.492542358069514*^9}, {3.492542391227192*^9, 3.4925423944418144`*^9}, {3.4925424623895187`*^9, 3.4925424757587423`*^9}, {3.492542514975133*^9, 3.4925425158163424`*^9}, { 3.492542564296053*^9, 3.4925425971733284`*^9}, {3.492698138447184*^9, 3.4926981626219454`*^9}, {3.4927018364584103`*^9, 3.492701844830448*^9}, 3.4927025707010098`*^9, {3.492702605981741*^9, 3.49270260659262*^9}, { 3.4927026692126627`*^9, 3.492702669553152*^9}, {3.492725726818954*^9, 3.492725728952021*^9}, 3.492725824960074*^9, {3.4927264126150804`*^9, 3.492726419565074*^9}, {3.4931286675676713`*^9, 3.49312866849901*^9}, { 3.493379202558392*^9, 3.4933793049456177`*^9}, {3.49337968228821*^9, 3.493379699693237*^9}, {3.4933808044918594`*^9, 3.4933808064747105`*^9}, { 3.4933808668114705`*^9, 3.493380886099205*^9}, 3.4933811162000737`*^9, { 3.493381158200467*^9, 3.4933812481898656`*^9}, {3.4933814214289713`*^9, 3.4933815599080944`*^9}, 3.4933888787371216`*^9, {3.493388928248315*^9, 3.493389010987288*^9}, 3.493389045216507*^9, {3.493389110600525*^9, 3.493389148114467*^9}, {3.4933892362712307`*^9, 3.4933893037082*^9}, { 3.493389357355341*^9, 3.4933893884400387`*^9}, 3.493389617339179*^9, { 3.4933897523833632`*^9, 3.4933897589928675`*^9}, 3.493389830796115*^9, { 3.49338989566638*^9, 3.4933899159443817`*^9}, {3.493389998081728*^9, 3.4933900800195484`*^9}, {3.493390224407168*^9, 3.4933902609096556`*^9}, { 3.4933903002462187`*^9, 3.493390501595745*^9}, {3.4933914914998307`*^9, 3.493391506142449*^9}, {3.4933915777941594`*^9, 3.493391593907329*^9}, { 3.4933916617258153`*^9, 3.4933916921478024`*^9}, {3.4933917408236523`*^9, 3.4933917770156937`*^9}, {3.4933918240833735`*^9, 3.49339189624714*^9}, { 3.4933920176316824`*^9, 3.493392075224497*^9}, {3.4934026889037447`*^9, 3.493402694171319*^9}, {3.4934043842415204`*^9, 3.4934044108597956`*^9}, { 3.4934044521691957`*^9, 3.493404519295719*^9}, {3.4934045944137335`*^9, 3.493404603596938*^9}, {3.4934157408265553`*^9, 3.4934158043679237`*^9}, { 3.493417776123168*^9, 3.4934178496589074`*^9}, {3.4934202118255363`*^9, 3.493420257060581*^9}, {3.4934203244975505`*^9, 3.493420332148552*^9}, { 3.493420394658437*^9, 3.493420395129114*^9}, {3.4934222485141506`*^9, 3.493422264447061*^9}, {3.4934223093215876`*^9, 3.4934223384634914`*^9}, { 3.493422399210842*^9, 3.4934225211762195`*^9}, {3.493422689187808*^9, 3.4934227712357874`*^9}, {3.493423147887386*^9, 3.4934232863765235`*^9}, { 3.4934243872394867`*^9, 3.493424398165197*^9}, {3.5079815580143337`*^9, 3.507981589785018*^9}, {3.508782334457738*^9, 3.5087823466252337`*^9}, { 3.508782700143568*^9, 3.5087827118203583`*^9}, {3.5087909837718678`*^9, 3.508791007325736*^9}, {3.508791067151762*^9, 3.5087910740016117`*^9}, { 3.508791235423725*^9, 3.508791263914693*^9}, {3.508792044286813*^9, 3.5087921068868275`*^9}, 3.508792174323797*^9, {3.5087951388467073`*^9, 3.5087951577338657`*^9}, {3.508795883507477*^9, 3.5087959260186048`*^9}, { 3.5091973653984823`*^9, 3.50919746633362*^9}, {3.5106571945382643`*^9, 3.5106572028650045`*^9}, {3.519419993921773*^9, 3.5194199943687987`*^9}, { 3.519671549984226*^9, 3.519671562278929*^9}, {3.565001329049471*^9, 3.565001329750212*^9}, 3.565001469167613*^9, 3.565001572035484*^9, { 3.565003082579922*^9, 3.565003105068803*^9}, {3.568979756054144*^9, 3.56897977835273*^9}, {3.56897982606404*^9, 3.568979848118304*^9}, 3.568979879022638*^9, {3.568979930131286*^9, 3.568979934555207*^9}, { 3.568980092914545*^9, 3.568980261011427*^9}, {3.568980292178348*^9, 3.568980388119768*^9}, {3.568980531418148*^9, 3.56898053204978*^9}, { 3.568980590229932*^9, 3.568980604478023*^9}, {3.568980636944539*^9, 3.568980702647631*^9}, {3.568981350722364*^9, 3.568981401087091*^9}, { 3.568981493630407*^9, 3.56898150848337*^9}, {3.568981570556911*^9, 3.568981600280914*^9}, 3.568981632318574*^9, 3.568981674193201*^9, { 3.568984087443889*^9, 3.568984110449109*^9}, {3.568984318202701*^9, 3.568984346684358*^9}, 3.568984419367345*^9, {3.568989826483344*^9, 3.568989835814862*^9}, {3.568989973602585*^9, 3.568989979364197*^9}, { 3.568990105148594*^9, 3.568990111734929*^9}, {3.568990166545008*^9, 3.568990296216722*^9}, {3.568990657594977*^9, 3.568990669316852*^9}, { 3.568995030676928*^9, 3.568995083681195*^9}, {3.568995130889144*^9, 3.568995182586356*^9}, {3.568995236164193*^9, 3.568995256799769*^9}, { 3.569667383679337*^9, 3.569667402209241*^9}, {3.569667528433186*^9, 3.569667657569015*^9}, {3.569671962930781*^9, 3.569671992065278*^9}, { 3.569672281423388*^9, 3.569672282728389*^9}, {3.569847788445811*^9, 3.569847863859531*^9}, {3.56984790457609*^9, 3.569847916444169*^9}, { 3.569847962415739*^9, 3.56984796984081*^9}, {3.569848018736408*^9, 3.569848059446916*^9}, {3.569848090727698*^9, 3.56984809717158*^9}, { 3.569848240582192*^9, 3.569848364336022*^9}, {3.569848427061889*^9, 3.569848495634021*^9}, {3.569848674418965*^9, 3.569848675326047*^9}, { 3.569848767770284*^9, 3.569848772305714*^9}, {3.569848817805023*^9, 3.569848830461098*^9}, {3.56984886507733*^9, 3.569848892058406*^9}, { 3.569848934971752*^9, 3.569848951815032*^9}, {3.569849262532854*^9, 3.569849286272214*^9}, {3.569853969631977*^9, 3.569854018286762*^9}, { 3.569854070261935*^9, 3.569854104931659*^9}, 3.569854832188426*^9, 3.569855620709685*^9, {3.569855797291881*^9, 3.569855817052497*^9}, { 3.572048900258453*^9, 3.572048907445751*^9}}, CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"regularESSs", "::", "usage"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"regularESSs", "::", "notes"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"regularESSs", "[", RowBox[{"points_", ",", "F_", ",", RowBox[{"method_:", "\"\\""}], ",", RowBox[{"accuracy_:", "8"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"j", ",", "stable", ",", "unstable"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"stable", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"unstable", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "<=", RowBox[{ RowBox[{"Dimensions", "[", "points", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"quasiStrictEqQ", "[", RowBox[{ RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "F"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"regularESSTest", "[", RowBox[{ RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "F", ",", "method", ",", "accuracy"}], "]"}], "==", "1"}], ",", "\[IndentingNewLine]", RowBox[{"stable", "=", RowBox[{"Append", "[", RowBox[{"stable", ",", RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"unstable", "=", RowBox[{"Append", "[", RowBox[{"unstable", ",", RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"stable", ",", "unstable"}], "}"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.4934023382595425`*^9, 3.4934023397216454`*^9}, { 3.4934027092429905`*^9, 3.4934028096673937`*^9}, {3.4934028463501415`*^9, 3.4934028999472103`*^9}, {3.4934030152329826`*^9, 3.493403043854138*^9}, { 3.4934035796445665`*^9, 3.4934035883370657`*^9}, {3.4934036631446342`*^9, 3.4934036819216337`*^9}, {3.4934037368706465`*^9, 3.493403856492655*^9}, { 3.493403919803692*^9, 3.4934040549380054`*^9}, {3.4934040986809044`*^9, 3.4934041010643315`*^9}, {3.4934043046370544`*^9, 3.4934043161736436`*^9}, {3.507981594561887*^9, 3.507981594847297*^9}, { 3.510657203633524*^9, 3.5106572061615486`*^9}, {3.510666318112857*^9, 3.510666319454787*^9}, 3.5106664544689274`*^9, {3.510666521715624*^9, 3.5106665420849133`*^9}, {3.5106665869093676`*^9, 3.5106666926313887`*^9}, {3.5106667884892254`*^9, 3.510666804452179*^9}, { 3.5106668412951565`*^9, 3.510666878548724*^9}, {3.5106669919117327`*^9, 3.510666995657118*^9}, {3.5106726073219995`*^9, 3.5106726216926637`*^9}, { 3.510672813788884*^9, 3.510672814700195*^9}, {3.5106738885644712`*^9, 3.5106738955745516`*^9}, {3.5106739339297037`*^9, 3.51067394684828*^9}, { 3.510674205960865*^9, 3.510674283001644*^9}, 3.565002412012507*^9, 3.565003101171706*^9, {3.565003143762287*^9, 3.565003145252596*^9}, 3.568975999995614*^9, {3.568983718127837*^9, 3.56898373574245*^9}, { 3.568995439794636*^9, 3.568995440482638*^9}}, CellTags->"initcell"] }, Closed]], Cell[CellGroupData[{ Cell["Stability Sets Routine", "Subsubsection", CellChangeTimes->{{3.492884015927379*^9, 3.4928840408181705`*^9}, { 3.4928841378877497`*^9, 3.4928841991608562`*^9}, {3.492884378623911*^9, 3.492884381042389*^9}, {3.4934025879886355`*^9, 3.493402592214712*^9}}, CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"stabilitySets", "::", "usage"}], "=", "\"\\""}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{ RowBox[{"stabilitySets", "::", "notes"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"stabilitySets", "[", RowBox[{"points_", ",", "dyn_", ",", "F_", ",", " ", RowBox[{"method_:", "\"\\""}], ",", " ", RowBox[{"n_:", "10"}], ",", RowBox[{"T_:", "10"}], ",", " ", RowBox[{"delta_:", ".01"}], ",", " ", RowBox[{"eps_:", ".05"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"j", ",", "stablepoints", ",", "unstablepoints", ",", "flag"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"stablepoints", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"unstablepoints", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"Which", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"method", "==", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "<=", RowBox[{ RowBox[{"Dimensions", "[", "points", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"smoothStabilityTest", "[", RowBox[{ RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "dyn", ",", "F"}], "]"}], "==", "1"}], ","}], " "}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"smoothStabilityTest", "[", RowBox[{ RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "Replicator", ",", "F"}], "]"}], "==", "1"}], ",", "\[IndentingNewLine]", RowBox[{"stablepoints", "=", RowBox[{"Append", "[", RowBox[{"stablepoints", ",", RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"unstablepoints", "=", RowBox[{"Append", "[", RowBox[{"unstablepoints", ",", RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", ",", RowBox[{"method", "==", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "<=", RowBox[{ RowBox[{"Dimensions", "[", "points", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"numericStabilityTest", "[", RowBox[{ RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "dyn", ",", "F", ",", "n", ",", "T", ",", "delta", ",", "eps"}], "]"}], "==", "1"}], ","}], " "}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"numericStabilityTest", "[", RowBox[{ RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "dyn", ",", "F", ",", "n", ",", "T", ",", "delta", ",", "eps"}], "]"}], "==", "1"}], ",", "\[IndentingNewLine]", RowBox[{"stablepoints", "=", RowBox[{"Append", "[", RowBox[{"stablepoints", ",", RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"unstablepoints", "=", RowBox[{"Append", "[", RowBox[{"unstablepoints", ",", RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", ",", RowBox[{"method", "==", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "<=", RowBox[{ RowBox[{"Dimensions", "[", "points", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"regularESSTest", "[", RowBox[{ RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "F"}], "]"}], "==", "1"}], ",", "\[IndentingNewLine]", RowBox[{"stablepoints", "=", RowBox[{"Append", "[", RowBox[{"stablepoints", ",", RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"unstablepoints", "=", RowBox[{"Append", "[", RowBox[{"unstablepoints", ",", RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", ",", RowBox[{"method", "==", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"For", "[", RowBox[{ RowBox[{"j", "=", "1"}], ",", RowBox[{"j", "<=", RowBox[{ RowBox[{"Dimensions", "[", "points", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ",", RowBox[{"j", "++"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"quasiStrictEqQ", "[", RowBox[{ RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "F"}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"flag", "=", RowBox[{"regularESSTest", "[", RowBox[{ RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "F"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Which", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"flag", "==", "1"}], ",", "\[IndentingNewLine]", RowBox[{"stablepoints", "=", RowBox[{"Append", "[", RowBox[{"stablepoints", ",", RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{ RowBox[{ "the", " ", "proofs", " ", "in", " ", "chapter", " ", "8", " ", "go", " ", "in", " ", "one", " ", "direction", " ", "only"}], ";", " ", RowBox[{ RowBox[{"if", " ", RowBox[{"it", "'"}], "s", " ", "not", " ", "an", " ", "ESS", " ", "we", " ", RowBox[{"don", "'"}], "t", " ", "know", " ", "if", " ", RowBox[{"it", "'"}], "s", " ", "unstable", "\[IndentingNewLine]", "flag"}], "==", "0"}]}], ",", "\[IndentingNewLine]", RowBox[{"unstablepoints", "=", RowBox[{"Join", "[", RowBox[{"unstablepoints", ",", RowBox[{"{", RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}], "}"}]}], "]"}]}], ","}], "\[IndentingNewLine]", "*)"}], "\[IndentingNewLine]", RowBox[{"Or", "[", RowBox[{ RowBox[{"flag", "==", "0"}], ",", RowBox[{"flag", "==", RowBox[{"-", "1"}]}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"numericStabilityTest", "[", RowBox[{ RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "dyn", ",", "F", ",", "n", ",", "T", ",", "delta", ",", "eps"}], "]"}], "==", "1"}], ",", "\[IndentingNewLine]", RowBox[{"stablepoints", "=", RowBox[{"Append", "[", RowBox[{"stablepoints", ",", RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"unstablepoints", "=", RowBox[{"Append", "[", RowBox[{"unstablepoints", ",", RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"numericStabilityTest", "[", RowBox[{ RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}], ",", "dyn", ",", "F", ",", "n", ",", "T", ",", "delta", ",", "eps"}], "]"}], "==", "1"}], ",", "\[IndentingNewLine]", RowBox[{"stablepoints", "=", RowBox[{"Append", "[", RowBox[{"stablepoints", ",", RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"unstablepoints", "=", RowBox[{"Append", "[", RowBox[{"unstablepoints", ",", RowBox[{"points", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"stablepoints", ",", "unstablepoints"}], "}"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.4927014886037645`*^9, 3.4927015660595956`*^9}, { 3.492701596373184*^9, 3.4927016910393076`*^9}, {3.4927017510255637`*^9, 3.492701802529623*^9}, {3.4927019066493397`*^9, 3.4927019097738323`*^9}, 3.492702004740388*^9, {3.492702051217218*^9, 3.492702155071621*^9}, { 3.4927021862464485`*^9, 3.4927024897446003`*^9}, {3.492702653990775*^9, 3.4927026814202166`*^9}, {3.4927027199055557`*^9, 3.4927028513145123`*^9}, {3.4927028962290964`*^9, 3.492702962334151*^9}, { 3.4928108178909955`*^9, 3.492810822707922*^9}, {3.492810907419731*^9, 3.492810912977723*^9}, {3.4928177103469276`*^9, 3.492817712129491*^9}, { 3.49283163300179*^9, 3.492831678537267*^9}, {3.4928569541535935`*^9, 3.492856956707266*^9}, {3.493401751716135*^9, 3.4934018535725975`*^9}, 3.4934022637824497`*^9, {3.4934022987026625`*^9, 3.4934023125926356`*^9}, { 3.4934024462348037`*^9, 3.4934024626984773`*^9}, {3.4934033676998053`*^9, 3.4934034307504673`*^9}, {3.493403485409063*^9, 3.4934035066496053`*^9}, { 3.4934036151456146`*^9, 3.4934036387295265`*^9}, {3.495989676751183*^9, 3.4959895112568703`*^9}, {3.4959903253786573`*^9, 3.495990428166459*^9}, { 3.495990619000865*^9, 3.4959906655678253`*^9}, {3.5079272779825125`*^9, 3.507927298151514*^9}, {3.5079815991885395`*^9, 3.507981615501997*^9}, { 3.508764909442835*^9, 3.5087649138792143`*^9}, 3.508765050425558*^9, { 3.5087652861445055`*^9, 3.5087652861945777`*^9}, {3.508767802342621*^9, 3.508767838154115*^9}, {3.5087710560812674`*^9, 3.508771062610656*^9}, { 3.508771135765848*^9, 3.508771146230896*^9}, {3.508771228018501*^9, 3.508771286182136*^9}, {3.5087713201710095`*^9, 3.5087713316575265`*^9}, { 3.508771570170491*^9, 3.508771580265006*^9}, {3.508779364537202*^9, 3.508779368593034*^9}, {3.5087794324949203`*^9, 3.5087794404363394`*^9}, { 3.508781684262803*^9, 3.508781692544712*^9}, {3.5087822409933424`*^9, 3.5087822416042213`*^9}, {3.508782271697493*^9, 3.5087822809407845`*^9}, { 3.508782768341632*^9, 3.508782768732194*^9}, 3.5087842802807617`*^9, { 3.5087903104686375`*^9, 3.5087903446978564`*^9}, {3.509197501934812*^9, 3.5091975396290135`*^9}, {3.509197572015583*^9, 3.509197692428729*^9}, { 3.509197742360527*^9, 3.5091978036786985`*^9}, {3.5106572191822433`*^9, 3.5106572444920964`*^9}, {3.510942415361717*^9, 3.5109424213302994`*^9}, { 3.5109427296736755`*^9, 3.51094273494125*^9}, {3.5196718445260725`*^9, 3.519671912969988*^9}, {3.521051877011013*^9, 3.521051911009958*^9}, { 3.521052016100969*^9, 3.521052031556853*^9}, {3.5210520798266134`*^9, 3.5210520801796336`*^9}, 3.56500241292894*^9, {3.565002931478158*^9, 3.565002932223514*^9}, {3.565003025915402*^9, 3.565003028570568*^9}, { 3.565003102011638*^9, 3.565003102646236*^9}, {3.565003185482682*^9, 3.56500319117692*^9}, {3.569857426142355*^9, 3.569857571570211*^9}, { 3.569857629795328*^9, 3.569857689601426*^9}}, CellTags->"initcell"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Lyapunov Exponents", "Subsection", CellChangeTimes->{{3.492892437555563*^9, 3.49289243918791*^9}, { 3.55768972455593*^9, 3.557689730858928*^9}}, CellTags->"initcell"], Cell[CellGroupData[{ Cell["MLE calculation", "Subsubsection", CellChangeTimes->{{3.492884015927379*^9, 3.4928840408181705`*^9}, { 3.4928843532674503`*^9, 3.492884357158045*^9}, {3.55768975126227*^9, 3.557689759666702*^9}}, CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"maximumLyapunovExponent", "::", "usage"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"maximumLyapunovExponent", "::", "notes"}], "=", "\"\\""}], " ", ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"maximumLyapunovExponent", "[", RowBox[{"x_", ",", "dyn_", ",", "F_", ",", "t0_", ",", RowBox[{"nsteps_:", "10000"}], ",", RowBox[{"nskip_:", "10000"}], ",", RowBox[{"step_:", ".01"}], ",", RowBox[{"separation_:", ".00000001"}], ",", RowBox[{"convergence_:", ".001"}], ",", RowBox[{"accuracy_:", "14"}], ",", RowBox[{"maxsteps_:", "100000"}]}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "pop", ",", "main", ",", "neighbor", ",", "d", ",", "mains", ",", "ds"}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"pop", "=", RowBox[{ RowBox[{"Dimensions", "[", "x", "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"main", "=", RowBox[{"difEqAdvance", "[", RowBox[{"x", ",", "dyn", ",", "F", ",", "t0", ",", RowBox[{"AOCharacterization", "[", "dyn", "]"}], ",", "accuracy", ",", "maxsteps", ",", "\"\\""}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"neighbor", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"sampleAround", "[", RowBox[{ RowBox[{"main", "[", RowBox[{"[", "p", "]"}], "]"}], ",", "separation", ",", "1", ",", "\"\\""}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"p", ",", "pop"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"mains", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"ds", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"main", "=", RowBox[{"difEqAdvance", "[", RowBox[{"main", ",", "dyn", ",", "F", ",", "step", ",", RowBox[{"AOCharacterization", "[", "dyn", "]"}], ",", "accuracy", ",", "maxsteps", ",", "\"\\""}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"neighbor", "=", RowBox[{"difEqAdvance", "[", RowBox[{"neighbor", ",", "dyn", ",", "F", ",", "step", ",", RowBox[{"AOCharacterization", "[", "dyn", "]"}], ",", "accuracy", ",", "maxsteps", ",", "\"\\""}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"d", "=", RowBox[{"stateNorm", "[", RowBox[{"main", "-", "neighbor"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"neighbor", "=", RowBox[{"main", "+", RowBox[{ RowBox[{"(", RowBox[{"neighbor", "-", "main"}], ")"}], "*", RowBox[{"(", RowBox[{"separation", "/", "d"}], ")"}]}]}]}], ";", "\[IndentingNewLine]", RowBox[{"mains", "=", RowBox[{"Append", "[", RowBox[{"mains", ",", "main"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"ds", "=", RowBox[{"Append", "[", RowBox[{"ds", ",", "d"}], "]"}]}], ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"nskip", "+", "nsteps"}], "}"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Max", "[", RowBox[{"Table", "[", RowBox[{ RowBox[{"stateNorm", "[", RowBox[{ RowBox[{"mains", "[", RowBox[{"[", "j", "]"}], "]"}], "-", RowBox[{"mains", "[", RowBox[{"[", RowBox[{"nskip", "+", "1"}], "]"}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"nskip", "+", "2"}], ",", RowBox[{"nskip", "+", "nsteps"}]}], "}"}]}], "]"}], "]"}], "<", "convergence"}], ",", "\"\\"", ",", "\"\\""}], "]"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Total", "[", RowBox[{"Log", "[", RowBox[{ RowBox[{"Drop", "[", RowBox[{"ds", ",", "nskip"}], "]"}], "/", "separation"}], "]"}], "]"}], "/", "nsteps"}], "/", "step"}]}], "\[IndentingNewLine]", "}"}]}]}], "\[IndentingNewLine]", "]"}]}], ";"}]}], "Input", CellChangeTimes->{{3.557689825087273*^9, 3.557689829737721*^9}, { 3.55768986090595*^9, 3.557689865115477*^9}, {3.557689933965158*^9, 3.557690051153547*^9}, {3.557690123479296*^9, 3.55769016110612*^9}, 3.557690233504489*^9, {3.557690641320119*^9, 3.557690683533776*^9}, { 3.557690796073244*^9, 3.557691079482815*^9}, {3.557691147449412*^9, 3.557691241809426*^9}, {3.557691280187725*^9, 3.55769134833166*^9}, { 3.557691401406796*^9, 3.557691545567169*^9}, {3.557691576478633*^9, 3.557691578986042*^9}, {3.557691634200618*^9, 3.557691642372945*^9}, { 3.557691679612523*^9, 3.557691695471587*^9}, {3.557691746954067*^9, 3.557692146608407*^9}, {3.557692204077006*^9, 3.557692214218333*^9}, { 3.557692420634619*^9, 3.557692421222586*^9}, {3.557692601129979*^9, 3.557692650976607*^9}, {3.557692693828507*^9, 3.557692819707601*^9}, { 3.557692849848672*^9, 3.557692902527301*^9}, {3.557692995506108*^9, 3.557693041473971*^9}, {3.557693125132984*^9, 3.557693227326541*^9}, { 3.55769326232499*^9, 3.557693268761132*^9}, {3.557693310039918*^9, 3.557693474844129*^9}, {3.55769351122605*^9, 3.55769366017373*^9}, { 3.557693732774461*^9, 3.557693739519095*^9}, 3.557749030400953*^9, { 3.5577500259738965`*^9, 3.557750026782943*^9}, {3.557750135533163*^9, 3.557750152668143*^9}, {3.557750283829645*^9, 3.557750289571973*^9}, 3.5577504282719064`*^9, {3.557826314812965*^9, 3.557826324675333*^9}, { 3.557826367928104*^9, 3.557826382165067*^9}, {3.557826435229482*^9, 3.557826524507753*^9}, {3.557826757968539*^9, 3.557826759417222*^9}, { 3.557826878378699*^9, 3.55782688012285*^9}, {3.557826960822969*^9, 3.557826983292569*^9}, {3.557827711407617*^9, 3.557827711741642*^9}, { 3.557827911421068*^9, 3.557827986219405*^9}, {3.557828021302705*^9, 3.557828029874697*^9}, {3.557828074215173*^9, 3.557828117553013*^9}, { 3.557828156793438*^9, 3.557828253685234*^9}, {3.557828299968526*^9, 3.557828442986501*^9}, {3.557828624124326*^9, 3.557828679567801*^9}, { 3.557828781757589*^9, 3.557828790165992*^9}, {3.557828860882966*^9, 3.557828935879261*^9}, {3.557828979971878*^9, 3.557829105699283*^9}, { 3.557829230752865*^9, 3.557829240065008*^9}, {3.557829334882939*^9, 3.557829339503142*^9}, {3.557834803211088*^9, 3.557834810435942*^9}, 3.557835434930441*^9, {3.557835469048785*^9, 3.557835483003693*^9}, { 3.557835528319031*^9, 3.557835531074498*^9}, {3.557835707314835*^9, 3.557835707633035*^9}, {3.557851202418621*^9, 3.557851214368802*^9}, { 3.557851333826873*^9, 3.557851334176337*^9}, {3.557851483753976*^9, 3.5578514894693*^9}, 3.557851661489865*^9, {3.55785173984843*^9, 3.557851752062998*^9}, {3.557852005536017*^9, 3.557852045706207*^9}, { 3.557853856147705*^9, 3.557853856515282*^9}, {3.557922628553327*^9, 3.557922639680231*^9}, {3.557924436221045*^9, 3.557924436962159*^9}, { 3.557924546876014*^9, 3.557924547195138*^9}, {3.557924594627941*^9, 3.557924624894421*^9}, 3.5587382845142097`*^9, 3.558785448567621*^9, { 3.558786397908826*^9, 3.558786421185177*^9}, {3.558878229787504*^9, 3.558878232879249*^9}, {3.558880205369234*^9, 3.558880255458344*^9}, { 3.558880608116797*^9, 3.558880637733404*^9}, {3.558880875949797*^9, 3.558880881991209*^9}, {3.558961228353917*^9, 3.558961229146731*^9}, { 3.558961272775803*^9, 3.558961273071408*^9}, {3.559160891638111*^9, 3.559160929992508*^9}, {3.565001220738434*^9, 3.565001221978873*^9}, 3.565001600735219*^9, {3.565003250202582*^9, 3.565003262506163*^9}, 3.568977682751205*^9, 3.568977722183548*^9, {3.569866962101462*^9, 3.569867020461799*^9}, {3.569867157823272*^9, 3.569867191466507*^9}, { 3.569867256942808*^9, 3.569867257882563*^9}, {3.569867515313025*^9, 3.569867519776839*^9}, {3.569867554574451*^9, 3.569867588406015*^9}, 3.569867619381726*^9, {3.569867656808753*^9, 3.569867668857933*^9}, 3.569867774997511*^9, {3.58064376252586*^9, 3.58064378960286*^9}}, CellTags->"initcell"], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ RowBox[{"Replicator", " ", "9", " ", "9", " ", "9"}], ",", " ", RowBox[{"4", " ", "4", " ", "4"}], ",", " ", RowBox[{"1", " ", "1", " ", "1", "\[IndentingNewLine]", RowBox[{"maximumLyapunovExponent", "[", RowBox[{ RowBox[{"{", RowBox[{"{", RowBox[{".9", ",", ".05", ",", ".05"}], "}"}], "}"}], ",", "dyn", ",", "Fmp", ",", "20", ",", "1000", ",", "100", ",", ".01", ",", ".001"}], "]"}]}]}], "\[IndentingNewLine]", "*)"}]}]], "Input", CellChangeTimes->{{3.474715115255108*^9, 3.474715123096383*^9}, { 3.474750910023591*^9, 3.4747509146895523`*^9}, {3.481418886197138*^9, 3.481418886257224*^9}, {3.4817354835448465`*^9, 3.481735483624962*^9}, { 3.48181749117215*^9, 3.4818174942265425`*^9}, 3.4818175865292673`*^9, { 3.489675763578027*^9, 3.489675873818288*^9}, {3.489785598683547*^9, 3.4897856440587935`*^9}, {3.49237910090625*^9, 3.49237910209375*^9}, { 3.49237913315625*^9, 3.492379151359375*^9}, {3.492379210390625*^9, 3.49237924003125*^9}, {3.492379317296875*^9, 3.492379332*^9}, { 3.49237936209375*^9, 3.492379451953125*^9}, {3.492379517359375*^9, 3.492379531265625*^9}, {3.492379716265625*^9, 3.4923797461875*^9}, { 3.492379883828125*^9, 3.492379889296875*^9}, {3.492379930140625*^9, 3.492379994125*^9}, {3.49238009878125*^9, 3.492380113140625*^9}, 3.4923807724375*^9, {3.49238080425*^9, 3.49238084190625*^9}, { 3.4923808950625*^9, 3.492380897484375*^9}, {3.49238101340625*^9, 3.492381108796875*^9}, {3.49238114659375*^9, 3.4923811901875*^9}, { 3.4923812591875*^9, 3.492381376359375*^9}, {3.492381613921875*^9, 3.492381632640625*^9}, {3.492381709359375*^9, 3.49238176990625*^9}, { 3.4923818083125*^9, 3.492381849796875*^9}, {3.492381892984375*^9, 3.492381937421875*^9}, {3.492382001421875*^9, 3.492382151046875*^9}, { 3.49238220828125*^9, 3.49238230375*^9}, {3.4923833268125*^9, 3.492383401375*^9}, 3.492383436609375*^9, {3.4923890745813046`*^9, 3.4923890750031796`*^9}, {3.4923892254875546`*^9, 3.4923892461750546`*^9}, {3.4923893093938046`*^9, 3.4923893293156796`*^9}, 3.4923893621750546`*^9, {3.4923894555969296`*^9, 3.4923895083781796`*^9}, { 3.4923895475656796`*^9, 3.4923895500969296`*^9}, {3.4923895919875546`*^9, 3.4923895927688046`*^9}, {3.4923897556594296`*^9, 3.4923897763156796`*^9}, {3.4923898126281796`*^9, 3.4923901057375546`*^9}, {3.4923901490656796`*^9, 3.4923902065813046`*^9}, {3.4923902863625546`*^9, 3.4923902913156796`*^9}, {3.4923909770813046`*^9, 3.4923909873781796`*^9}, {3.4923911478469296`*^9, 3.4923911614719296`*^9}, {3.4923915060656796`*^9, 3.4923915147063046`*^9}, {3.4923915529563046`*^9, 3.4923915551594296`*^9}, {3.4924594902949204`*^9, 3.4924595552783623`*^9}, {3.4924596130013638`*^9, 3.492459616987095*^9}, { 3.492459657605501*^9, 3.492459666187842*^9}, {3.492460328189754*^9, 3.4924603454045076`*^9}, {3.492460806046879*^9, 3.492460934882135*^9}, { 3.49246098093836*^9, 3.4924609982132006`*^9}, {3.49246221805725*^9, 3.492462219939957*^9}, {3.4924622671478386`*^9, 3.4924622722451687`*^9}, { 3.492462407599799*^9, 3.4924624299719687`*^9}, {3.4924624797435365`*^9, 3.492462483238562*^9}, {3.4924627260076466`*^9, 3.4924628079755106`*^9}, { 3.49246293133289*^9, 3.492463027280856*^9}, {3.492463241408757*^9, 3.492463245434546*^9}, {3.492463530814903*^9, 3.4924635316861553`*^9}, { 3.492465940559946*^9, 3.492466030939906*^9}, {3.492473116338208*^9, 3.4924731246802034`*^9}, {3.4924732190659237`*^9, 3.4924732649719334`*^9}, {3.4924732968778114`*^9, 3.4924732992311954`*^9}, {3.49247481459525*^9, 3.492474816558072*^9}, { 3.492476066385236*^9, 3.4924760684882593`*^9}, {3.4924772069252515`*^9, 3.4924773442126613`*^9}, {3.492477471896261*^9, 3.492477475871978*^9}, { 3.4925115413541183`*^9, 3.4925115439178047`*^9}, {3.492511606317531*^9, 3.492511615230347*^9}, {3.4925117778241453`*^9, 3.4925118154582605`*^9}, { 3.492511893730811*^9, 3.492511925726819*^9}, {3.492512300605869*^9, 3.4925123092583103`*^9}, 3.492512382273301*^9, {3.4925125022658415`*^9, 3.4925125591476336`*^9}, {3.492512683987144*^9, 3.4925126958942657`*^9}, { 3.4925127501522846`*^9, 3.4925127597260513`*^9}, 3.492512801185667*^9, { 3.4925130030359135`*^9, 3.4925130040373535`*^9}, {3.4925139399331055`*^9, 3.492513955235109*^9}, {3.4925140254761105`*^9, 3.4925141280135517`*^9}, { 3.492516660975773*^9, 3.49251669181011*^9}, {3.492516748381456*^9, 3.4925168477843904`*^9}, {3.492516886199629*^9, 3.492516958463539*^9}, { 3.492516989067546*^9, 3.492517010207944*^9}, {3.4925171923097935`*^9, 3.492517198698981*^9}, {3.4925172600471954`*^9, 3.492517295167696*^9}, 3.492517388031227*^9, {3.492517423902808*^9, 3.492517460555512*^9}, { 3.4925175472201295`*^9, 3.492517597933051*^9}, {3.492518873687496*^9, 3.492518874889224*^9}, {3.4925189176106544`*^9, 3.4925189605223584`*^9}, { 3.4925194897633696`*^9, 3.49251956653376*^9}, {3.4925197590606003`*^9, 3.4925197837460957`*^9}, {3.4925204148635983`*^9, 3.492520419460208*^9}, { 3.4925205526717567`*^9, 3.492520561294155*^9}, {3.492522162391488*^9, 3.4925221679194365`*^9}, {3.492531167107565*^9, 3.4925311961092677`*^9}, { 3.49253211714365*^9, 3.492532152013791*^9}, {3.4925321821471205`*^9, 3.492532291634556*^9}, {3.492532325713559*^9, 3.4925323356378293`*^9}, { 3.4925323669027863`*^9, 3.4925324973403463`*^9}, {3.4925327186385574`*^9, 3.4925327346615973`*^9}, {3.4925327793057923`*^9, 3.492532782981077*^9}, { 3.492532852571143*^9, 3.4925328533622804`*^9}, {3.4925329144501204`*^9, 3.4925330995462756`*^9}, {3.492533139663962*^9, 3.492533142518066*^9}, { 3.4925332367335415`*^9, 3.4925332671973457`*^9}, {3.492533312041829*^9, 3.4925333187715063`*^9}, {3.4925333492252965`*^9, 3.4925334183246565`*^9}, {3.4925334999219875`*^9, 3.492533605884354*^9}, { 3.492541976871378*^9, 3.492541982529514*^9}, {3.4925420513985424`*^9, 3.4925421408271346`*^9}, {3.4925421824870386`*^9, 3.492542284944365*^9}, { 3.4925423477947397`*^9, 3.492542358069514*^9}, {3.492542391227192*^9, 3.4925423944418144`*^9}, {3.4925424623895187`*^9, 3.4925424757587423`*^9}, {3.492542514975133*^9, 3.4925425158163424`*^9}, { 3.492542564296053*^9, 3.4925425971733284`*^9}, {3.492698138447184*^9, 3.4926981626219454`*^9}, {3.4927018364584103`*^9, 3.492701844830448*^9}, 3.4927025707010098`*^9, {3.492702605981741*^9, 3.49270260659262*^9}, { 3.4927026692126627`*^9, 3.492702669553152*^9}, {3.492725726818954*^9, 3.492725728952021*^9}, 3.492725824960074*^9, {3.4927264126150804`*^9, 3.492726419565074*^9}, {3.4931286675676713`*^9, 3.49312866849901*^9}, { 3.4933901932623835`*^9, 3.493390193773118*^9}, {3.4959902691492662`*^9, 3.4959903171167774`*^9}, 3.5072556786456265`*^9, 3.507926987388692*^9, { 3.5079815231041355`*^9, 3.507981523434611*^9}, {3.5087902584538436`*^9, 3.508790288687317*^9}, {3.5087954977427745`*^9, 3.5087956931437473`*^9}, { 3.508795835949091*^9, 3.5087958433196898`*^9}, {3.5106594118271484`*^9, 3.510659493304307*^9}, {3.5106598151470942`*^9, 3.510659879349413*^9}, { 3.510659949400141*^9, 3.5106599515432224`*^9}, {3.510660294356163*^9, 3.5106603386298256`*^9}, {3.510660376654502*^9, 3.5106604786211233`*^9}, { 3.510668164238372*^9, 3.5106681981170874`*^9}, {3.511009771198851*^9, 3.5110098252465677`*^9}, 3.51100995689587*^9, {3.511009990263851*^9, 3.5110100009792595`*^9}, {3.5110103054421234`*^9, 3.5110103180202093`*^9}, {3.511010447266056*^9, 3.511010452353371*^9}, { 3.51101049593604*^9, 3.5110105067415776`*^9}, {3.5110105773931694`*^9, 3.5110105777436733`*^9}, {3.511010661694389*^9, 3.511010758513608*^9}, { 3.557693097119469*^9, 3.557693100127906*^9}, {3.5576938982311*^9, 3.557694227993213*^9}, {3.557694265911925*^9, 3.557694510089692*^9}, { 3.557749334656355*^9, 3.5577494150589542`*^9}, {3.5577496994032173`*^9, 3.557749699723236*^9}, {3.557826402379401*^9, 3.557826425253561*^9}, { 3.557828470603082*^9, 3.557828484709958*^9}, {3.565003244731052*^9, 3.565003257268888*^9}, {3.569672034675556*^9, 3.569672042263763*^9}, 3.569672221053808*^9}, CellTags->"initcell"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["FixPolygons", "Subsection", CellChangeTimes->{{3.4818469396171713`*^9, 3.481846942020627*^9}, { 3.491933553724511*^9, 3.4919335567498555`*^9}}, CellTags->"initcell"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"fixPolygons", "::", "usage"}], " ", "=", "\n", "\"\ , ]:\n Joins all contiguous \ polygons into a single shape. \n This can dramatically improve the image \ quality and \n decrease the file size of a ContourPlot or RegionPlot.\n\n\ Possible options (with defaults) are:\n earlyCleanupThreshold \[Rule] 1\n\ \>\""}], ";"}], "\n"}], "\n", RowBox[{ RowBox[{ RowBox[{"earlyCleanupThreshold", "::", "usage"}], " ", "=", " ", "\n", "\"\\""}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"Options", "[", "fixPolygons", "]"}], "=", RowBox[{"{", "\n", " ", RowBox[{"earlyCleanupThreshold", " ", "->", " ", "1"}], "\n", "}"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"Begin", "[", "\"\<`Private`\>\"", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{"(*", " ", "\[IndentingNewLine]", RowBox[{ "fixPolygons", " ", "function", "\n", "Delve", " ", "into", " ", "GraphicsComplex", " ", "and", " ", "grab", " ", "polygons", " ", "to", " ", RowBox[{"combine", ":"}]}], "\[IndentingNewLine]", "*)"}]}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"fixPolygons", "[", RowBox[{"graf_", ",", RowBox[{"OptionsPattern", "[", "fixPolygons", "]"}]}], "]"}], " ", ":=", " ", "\n", " ", RowBox[{ RowBox[{"graf", " ", "//.", " ", RowBox[{ RowBox[{"{", "\n", " ", RowBox[{ RowBox[{"Polygon", "[", RowBox[{ RowBox[{"{", "a__", "}"}], ",", "c___"}], "]"}], ",", "\n", " ", RowBox[{"Polygon", "[", RowBox[{ RowBox[{"{", "b__", "}"}], ",", "c___"}], "]"}], ",", "d___"}], "}"}], " ", "->", "\n", " ", RowBox[{"{", RowBox[{ RowBox[{"Polygon", "[", RowBox[{ RowBox[{"{", RowBox[{"a", ",", "b"}], "}"}], ",", "c"}], "]"}], ",", "d"}], "}"}]}]}], " ", "/.", " ", "\n", " ", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Polygon", "[", RowBox[{ RowBox[{"{", "ab__", "}"}], ",", "c___"}], "]"}], ",", "d___"}], "}"}], " ", ":>", "\n", " ", RowBox[{"{", RowBox[{ RowBox[{"Polygon", "[", RowBox[{ RowBox[{"cleanup", "[", RowBox[{ RowBox[{"{", "ab", "}"}], ",", "\n", " ", RowBox[{"OptionValue", "[", "earlyCleanupThreshold", "]"}]}], "]"}], ",", "c"}], "]"}], ",", "d"}], "}"}]}]}]}], ";"}], "\n", RowBox[{"(*", " ", RowBox[{"Cleanup", " ", "polygons"}], " ", "*)"}]}], "\n", RowBox[{ RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "vert", ",", "uvert", ",", "cvert", ",", "nvert", ",", "i", ",", "plist"}], "}"}], ",", "\n", RowBox[{ RowBox[{ RowBox[{"cleanup", "[", RowBox[{"polylist_", ",", "ect_"}], "]"}], ":=", RowBox[{"(", "\n", " ", RowBox[{ RowBox[{"plist", " ", "=", " ", "polylist"}], ";", "\n", "\n", RowBox[{"(*", " ", RowBox[{ "Makes", " ", "up", " ", "a", " ", "list", " ", "of", " ", "the", " ", "occurrences", " ", "of", " ", "vertices", " ", "in", " ", "polygon", " ", "list"}], " ", "*)"}], "\n", " ", RowBox[{"vert", " ", "=", " ", RowBox[{"Sort", "[", RowBox[{"Flatten", "[", "plist", "]"}], "]"}]}], ";", " ", "\n", " ", RowBox[{"uvert", " ", "=", " ", RowBox[{"Union", "[", "vert", "]"}]}], ";", " ", RowBox[{"nvert", "=", RowBox[{"Length", "@", "uvert"}]}], ";", "\n", RowBox[{"(*", " ", RowBox[{ "Counts", " ", "the", " ", "occurrences", " ", "of", " ", "vertices", " ", "in", " ", "polygon", " ", "list"}], " ", "*)"}], "\n", " ", RowBox[{"cvert", " ", "=", " ", RowBox[{"Length", " ", "/@", " ", RowBox[{"Split", "@", "vert"}]}]}], ";", "\n", RowBox[{"(*", " ", RowBox[{ "Preliminary", " ", "cleanup", " ", "based", " ", "on", " ", "earlyCleanupThreshold", " ", "option"}], " ", "*)"}], "\n", " ", RowBox[{"vert", " ", "=", " ", RowBox[{"DeleteCases", "[", "\n", " ", RowBox[{ RowBox[{"Transpose", "@", RowBox[{"{", RowBox[{"uvert", ",", "cvert"}], "}"}]}], ",", "\n", "\t", RowBox[{ RowBox[{"{", RowBox[{"_", ",", "a_"}], "}"}], "/;", RowBox[{"a", "<=", "ect"}]}]}], "]"}]}], ";", "\n", RowBox[{"(*", " ", RowBox[{ "Cleans", " ", "up", " ", "the", " ", "vertex", " ", "list"}], " ", "*)"}], "\n", " ", RowBox[{"Do", "[", "\n", " ", RowBox[{ RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Length", "@", "vert"}], "==", "0"}], ",", RowBox[{"Break", "[", "]"}]}], "]"}], ";", "\n", " ", RowBox[{ RowBox[{"{", RowBox[{"plist", ",", "vert"}], "}"}], " ", "=", " ", RowBox[{"refine", "[", RowBox[{ RowBox[{"{", RowBox[{"plist", ",", "vert"}], "}"}], ",", RowBox[{"vert", "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], ",", "ect"}], "]"}]}], ";"}], "\n", " ", ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "nvert"}], "}"}]}], "]"}], ";", "\n", RowBox[{"(*", " ", RowBox[{ RowBox[{"Output", " ", "and", " ", "finish", " ", "up"}], ",", " ", RowBox[{ "with", " ", "a", " ", "final", " ", "cleanup", " ", "from", " ", "residual", " ", "creaks"}]}], " ", "*)"}], "\n", " ", RowBox[{"plist", " ", "//.", " ", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"c_", ",", "a_", ",", "b___", ",", "a_"}], "}"}], " ", ":>", " ", RowBox[{"{", RowBox[{"a", ",", "b"}], "}"}]}], ",", "\n", "\t", RowBox[{ RowBox[{"{", RowBox[{"c___", ",", "a_", ",", "b_", ",", "a_", ",", "d___"}], "}"}], " ", ":>", " ", RowBox[{"{", RowBox[{"c", ",", "a", ",", "d"}], "}"}]}]}], "}"}]}]}], "\n", ")"}]}], ";"}]}], "\n", "]"}], ";"}], "\n", RowBox[{"(*", " ", RowBox[{"Clean", " ", "up", " ", "vertices", " ", "of", " ", "polygons"}], " ", "*)"}]}], "\n", RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ "ri", ",", "rj", ",", "lvp", ",", "nvl", ",", "ncl", ",", "ppoly", ",", "vpoly"}], "}"}], ",", "\n", RowBox[{ RowBox[{ RowBox[{"refine", "[", RowBox[{ RowBox[{"{", RowBox[{"cl_", ",", "vl_"}], "}"}], ",", "iv_", ",", "ect_"}], "]"}], ":=", RowBox[{"(", "\n", RowBox[{"(*", " ", RowBox[{ "Gets", " ", "the", " ", "polygons", " ", "having", " ", "the", " ", "shared", " ", "vertex"}], " ", "*)"}], "\n", " ", RowBox[{ RowBox[{"ppoly", " ", "=", " ", RowBox[{"Position", "[", RowBox[{"cl", ",", RowBox[{"{", RowBox[{"___", ",", "iv", ",", "___"}], "}"}]}], "]"}]}], ";", " ", "\n", " ", RowBox[{"nvl", " ", "=", " ", "vl"}], ";", "\n", " ", RowBox[{"vpoly", " ", "=", " ", RowBox[{"cl", "[", RowBox[{"[", RowBox[{"Flatten", "[", "ppoly", "]"}], "]"}], "]"}]}], ";", "\n", " ", RowBox[{"lvp", " ", "=", " ", RowBox[{"Length", "@", "vpoly"}]}], ";", "\n", RowBox[{"(*", " ", RowBox[{ "Puts", " ", "all", " ", "the", " ", "polygons", " ", "in", " ", "a", " ", "position", " ", "where", " ", "the", " ", "shared", " ", "vertex", " ", "is", " ", "at", " ", "position", " ", "1"}], " ", "*)"}], "\n", " ", RowBox[{"vpoly", " ", "=", " ", RowBox[{"Table", "[", "\n", " ", RowBox[{ RowBox[{"RotateLeft", "[", RowBox[{ RowBox[{"vpoly", "[", RowBox[{"[", "ri", "]"}], "]"}], ",", RowBox[{ RowBox[{ RowBox[{"Position", "[", RowBox[{ RowBox[{"vpoly", "[", RowBox[{"[", "ri", "]"}], "]"}], ",", "iv"}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], "-", "1"}]}], "]"}], "\n", " ", ",", RowBox[{"{", RowBox[{"ri", ",", "1", ",", "lvp"}], "}"}]}], "]"}]}], ";", "\n", RowBox[{"(*", " ", RowBox[{ "Finds", " ", "the", " ", "neighbours", " ", "of", " ", "the", " ", "polygon", " ", "to", " ", "be", " ", "deleted"}], " ", "*)"}], "\n", " ", RowBox[{"ri", " ", "=", " ", "1"}], ";", "\n", " ", RowBox[{"rj", " ", "=", " ", "2"}], ";", "\n", " ", RowBox[{"While", "[", RowBox[{ RowBox[{ RowBox[{"ri", " ", "<=", " ", "lvp"}], " ", "&&", " ", RowBox[{"rj", " ", "<=", " ", "lvp"}]}], " ", ",", "\n", " ", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"vpoly", "[", RowBox[{"[", RowBox[{"ri", ",", "2"}], "]"}], "]"}], " ", "==", " ", RowBox[{"vpoly", "[", RowBox[{"[", RowBox[{"rj", ",", RowBox[{"-", "1"}]}], "]"}], "]"}]}], ",", "\n", " ", RowBox[{ RowBox[{"nvl", " ", "=", " ", RowBox[{"nvl", " ", "/.", " ", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"vpoly", "[", RowBox[{"[", RowBox[{"ri", ",", "2"}], "]"}], "]"}], ",", "a_"}], "}"}], " ", ":>", " ", RowBox[{"{", RowBox[{ RowBox[{"vpoly", "[", RowBox[{"[", RowBox[{"ri", ",", "2"}], "]"}], "]"}], ",", RowBox[{"a", "-", "1"}]}], "}"}]}]}]}], ";", "\n", " ", RowBox[{"vpoly", " ", "=", " ", RowBox[{"Prepend", "[", "\n", " ", RowBox[{ RowBox[{"Delete", "[", RowBox[{"vpoly", ",", RowBox[{"{", RowBox[{ RowBox[{"{", "ri", "}"}], ",", RowBox[{"{", "rj", "}"}]}], "}"}]}], "]"}], ",", "\n", "\t\t", RowBox[{"Join", "[", RowBox[{ RowBox[{"vpoly", "[", RowBox[{"[", "rj", "]"}], "]"}], ",", RowBox[{"Drop", "[", RowBox[{ RowBox[{"vpoly", "[", RowBox[{"[", "ri", "]"}], "]"}], ",", "2"}], "]"}]}], "]"}]}], "]"}]}], ";", "\n", "\t ", RowBox[{"lvp", "--"}], ";", "\n", " ", RowBox[{"ri", " ", "=", " ", RowBox[{"rj", " ", "=", " ", "1"}]}]}]}], "\n", " ", "]"}], ";", "\n", " ", RowBox[{"rj", "++"}], ";", "\n", " ", RowBox[{"If", "[", RowBox[{ RowBox[{"rj", "==", "ri"}], ",", " ", RowBox[{"rj", "++"}]}], "]"}], ";", "\n", " ", RowBox[{"If", "[", RowBox[{ RowBox[{"rj", ">", "lvp"}], ",", " ", RowBox[{ RowBox[{"ri", "++"}], ";", " ", RowBox[{"rj", "=", "1"}]}]}], "]"}], ";"}]}], "\n", " ", "]"}], ";", "\n", RowBox[{"(*", " ", RowBox[{ "Cleans", " ", "up", " ", "polygons", " ", "with", " ", "\"\\""}], " ", "*)"}], "\n", " ", RowBox[{"vpoly", " ", "=", " ", RowBox[{"Table", "[", "\n", " ", RowBox[{ RowBox[{ RowBox[{"vpoly", "[", RowBox[{"[", "ri", "]"}], "]"}], " ", "//.", " ", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"c_", ",", "a_", ",", "b___", ",", "a_"}], "}"}], " ", ":>", " ", "\n", " ", RowBox[{"(", RowBox[{ RowBox[{"nvl", " ", "=", " ", RowBox[{"(", RowBox[{"nvl", " ", "/.", " ", RowBox[{ RowBox[{"{", RowBox[{"a", ",", "e_"}], "}"}], " ", ":>", " ", RowBox[{"{", RowBox[{"a", ",", RowBox[{"e", "-", "1"}]}], "}"}]}]}], ")"}]}], ";", "\n", " ", RowBox[{"{", RowBox[{"a", ",", "b"}], "}"}]}], ")"}]}], ",", "\n", "\t", RowBox[{ RowBox[{"{", RowBox[{ "c___", ",", "a_", ",", "b_", ",", "a_", ",", "d___"}], "}"}], " ", ":>", " ", "\n", " ", RowBox[{"(", RowBox[{ RowBox[{"nvl", " ", "=", " ", RowBox[{"(", RowBox[{"nvl", " ", "/.", " ", RowBox[{ RowBox[{"{", RowBox[{"a", ",", "e_"}], "}"}], " ", ":>", " ", RowBox[{"{", RowBox[{"a", ",", RowBox[{"e", "-", "1"}]}], "}"}]}]}], ")"}]}], ";", "\n", " ", RowBox[{"{", RowBox[{"c", ",", "a", ",", "d"}], "}"}]}], ")"}]}]}], "}"}]}], "\n", " ", ",", RowBox[{"{", RowBox[{"ri", ",", "1", ",", "lvp"}], "}"}]}], "]"}]}], ";", "\n", " ", RowBox[{"ncl", " ", "=", " ", RowBox[{"Join", "[", RowBox[{ RowBox[{"Delete", "[", RowBox[{"cl", ",", "ppoly"}], "]"}], ",", "vpoly"}], "]"}]}], ";", "\n", " ", RowBox[{"nvl", " ", "=", " ", RowBox[{"DeleteCases", "[", RowBox[{"nvl", ",", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"iv", ",", "_"}], "}"}], "|", RowBox[{"{", RowBox[{"_", ",", "a_"}], "}"}]}], "/;", RowBox[{"a", "<=", "ect"}]}]}], "]"}]}], ";", "\n", RowBox[{"(*", " ", RowBox[{"Output", " ", "and", " ", RowBox[{"finish", ":"}]}], " ", "*)"}], "\n", " ", RowBox[{"{", RowBox[{"ncl", ",", "nvl"}], "}"}]}], "\n", ")"}]}], ";"}]}], "\n", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"End", "[", "]"}], ";"}]}], "Input", CellChangeTimes->{{3.491932849441802*^9, 3.491932860627887*^9}, { 3.491932897791325*^9, 3.4919330176036067`*^9}, {3.491933118518716*^9, 3.4919331766523075`*^9}, {3.4919332576187315`*^9, 3.491933290696295*^9}, 3.491933545793106*^9, {3.4919337991713257`*^9, 3.491933801694955*^9}, { 3.491933839899891*^9, 3.491933865837187*^9}, {3.565003313615303*^9, 3.565003321743915*^9}, 3.565003355562578*^9, {3.565003452054142*^9, 3.565003462316552*^9}}, CellTags->"initcell"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Maintenance", "Section", CellOpen->True, CellChangeTimes->{{3.4818469396171713`*^9, 3.481846942020627*^9}, { 3.4932702180118704`*^9, 3.493270222878869*^9}, {3.493473759336*^9, 3.4934737604475985`*^9}}], Cell[CellGroupData[{ Cell["Reformat Open Group Cells", "Subsection", CellChangeTimes->{{3.513023706564459*^9, 3.5130237384302797`*^9}, { 3.5397230473806143`*^9, 3.5397230483717403`*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"FrontEndExecute", "[", RowBox[{"FrontEndToken", "[", "\"\\"", "]"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"FrontEndExecute", "[", RowBox[{"FrontEndToken", "[", "\"\\"", "]"}], "]"}], ";"}], "\n", RowBox[{ RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", "\"\\"", ",", " ", "Next", ",", " ", "CellTags", ",", " ", RowBox[{"AutoScroll", " ", "->", " ", "False"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"While", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Depth", "[", RowBox[{"Options", "[", RowBox[{ RowBox[{"NotebookSelection", "[", "]"}], ",", "CellTags"}], "]"}], "]"}], "==", "3"}], ",", "True", ",", RowBox[{"Not", "[", RowBox[{ RowBox[{"ToString", "[", RowBox[{ RowBox[{"Options", "[", RowBox[{ RowBox[{"NotebookSelection", "[", "]"}], ",", "CellTags"}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "2", ",", "1"}], "]"}], "]"}], "]"}], "==", "\"\\""}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"FrontEndExecute", "[", RowBox[{"FrontEndToken", "[", "\"\\"", "]"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", "\"\\"", ",", " ", "Next", ",", " ", "CellTags", ",", " ", RowBox[{"AutoScroll", " ", "->", " ", "False"}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", "\"\\"", ",", " ", "Next", ",", " ", "CellTags", ",", " ", RowBox[{"AutoScroll", " ", "->", " ", "True"}]}], "]"}], ";"}]}], "Input",\ CellChangeTimes->{{3.513023706564459*^9, 3.513023756886819*^9}, { 3.539716977726866*^9, 3.539716990717516*^9}, {3.5397171568946176`*^9, 3.539717170491344*^9}, 3.539717385038088*^9, {3.5397182910181327`*^9, 3.5397183022630606`*^9}, {3.539721373522561*^9, 3.5397213831852884`*^9}, { 3.5397218178584847`*^9, 3.539721823971261*^9}, {3.5397220287347627`*^9, 3.5397220334073563`*^9}, {3.53972222992181*^9, 3.539722235546524*^9}, { 3.5397222956181526`*^9, 3.5397223353141932`*^9}}] }, Closed]], Cell[CellGroupData[{ Cell["Hide Cells", "Subsection", CellChangeTimes->{{3.513023706564459*^9, 3.5130237384302797`*^9}, { 3.5130237929887314`*^9, 3.5130237939901714`*^9}, {3.5397230569803333`*^9, 3.539723065123867*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", "\"\\"", ",", " ", "All", ",", " ", "CellTags", ",", " ", RowBox[{"AutoScroll", " ", "->", " ", "False"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"SetOptions", "[", RowBox[{ RowBox[{"NotebookSelection", "[", RowBox[{"SelectedNotebook", "[", "]"}], "]"}], ",", RowBox[{"CellOpen", "\[Rule]", "False"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", "\"\\"", ",", " ", "Next", ",", " ", "CellTags", ",", " ", RowBox[{"AutoScroll", " ", "->", " ", "True"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"FrontEndExecute", "[", RowBox[{"FrontEndToken", "[", "\"\\"", "]"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", "\"\\"", ",", " ", "Next", ",", " ", "CellTags", ",", " ", RowBox[{"AutoScroll", " ", "->", " ", "True"}]}], "]"}], ";"}]}], "Input",\ CellChangeTimes->{{3.513023706564459*^9, 3.513023756886819*^9}, { 3.539716977726866*^9, 3.539716990717516*^9}, {3.5397171568946176`*^9, 3.539717170491344*^9}, 3.539717385038088*^9, {3.5397182910181327`*^9, 3.5397183022630606`*^9}, {3.539721373522561*^9, 3.5397213831852884`*^9}, { 3.5397218178584847`*^9, 3.539721823971261*^9}, {3.5397220287347627`*^9, 3.5397220334073563`*^9}, {3.53972222992181*^9, 3.539722235546524*^9}, { 3.5397222956181526`*^9, 3.5397223353141932`*^9}, {3.539723094393084*^9, 3.5397232087576065`*^9}, {3.539723289930414*^9, 3.539723303096586*^9}}] }, Closed]], Cell[CellGroupData[{ Cell["Buttons", "Subsection", CellChangeTimes->{{3.513023706564459*^9, 3.5130237384302797`*^9}, { 3.5130237929887314`*^9, 3.5130237939901714`*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"FrontEndExecute", "[", RowBox[{"FrontEndToken", "[", "\"\\"", "]"}], "]"}], ";", RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", "\"\\"", ",", " ", "Next", ",", " ", "CellTags", ",", " ", RowBox[{"AutoScroll", " ", "->", " ", "False"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"While", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"Depth", "[", RowBox[{"Options", "[", RowBox[{ RowBox[{"NotebookSelection", "[", "]"}], ",", "CellTags"}], "]"}], "]"}], "==", "3"}], ",", "True", ",", RowBox[{"Not", "[", RowBox[{ RowBox[{"ToString", "[", RowBox[{ RowBox[{"Options", "[", RowBox[{ RowBox[{"NotebookSelection", "[", "]"}], ",", "CellTags"}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "2", ",", "1"}], "]"}], "]"}], "]"}], "==", "\"\\""}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{ RowBox[{"ToString", "[", RowBox[{ RowBox[{"Options", "[", RowBox[{ RowBox[{"NotebookSelection", "[", "]"}], ",", "GeneratedCell"}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "2"}], "]"}], "]"}], "]"}], "==", "\"\\""}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"SetOptions", "[", RowBox[{ RowBox[{"NotebookSelection", "[", RowBox[{"SelectedNotebook", "[", "]"}], "]"}], ",", RowBox[{"CellOpen", "\[Rule]", "False"}], ",", RowBox[{"Evaluatable", "->", "False"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"FrontEndExecute", "[", RowBox[{"FrontEndToken", "[", "\"\\"", "]"}], "]"}], ";"}], "\[IndentingNewLine]", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"SetOptions", "[", RowBox[{ RowBox[{"NotebookSelection", "[", RowBox[{"SelectedNotebook", "[", "]"}], "]"}], ",", RowBox[{"CellOpen", "\[Rule]", "True"}]}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"FrontEndExecute", "[", RowBox[{"FrontEndToken", "[", "\"\\"", "]"}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", "\"\\"", ",", " ", "Next", ",", " ", "CellTags", ",", " ", RowBox[{"AutoScroll", " ", "->", " ", "False"}]}], "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"NotebookFind", "[", RowBox[{ RowBox[{"SelectedNotebook", "[", "]"}], ",", "\"\\"", ",", " ", "Next", ",", " ", "CellTags", ",", " ", RowBox[{"AutoScroll", " ", "->", " ", "True"}]}], "]"}], ";"}]}], "Input",\ CellChangeTimes->{{3.513023706564459*^9, 3.513023756886819*^9}, { 3.539716977726866*^9, 3.539716990717516*^9}, {3.5397171568946176`*^9, 3.539717170491344*^9}, 3.539717385038088*^9, {3.5397182910181327`*^9, 3.5397183022630606`*^9}, {3.539720593161968*^9, 3.539720605342515*^9}, { 3.539721285438876*^9, 3.539721294079973*^9}, 3.5397213923364506`*^9, { 3.5397214252621317`*^9, 3.539721507299049*^9}, {3.539721596321353*^9, 3.539721601715538*^9}, {3.5397217929333196`*^9, 3.5397218085162983`*^9}, 3.539722014496955*^9, {3.5397224411261296`*^9, 3.5397224420842514`*^9}, { 3.539722497970848*^9, 3.5397224983088913`*^9}, {3.5397225610753613`*^9, 3.53972258933245*^9}, {3.5397226513003187`*^9, 3.539722654024164*^9}, { 3.539723234908927*^9, 3.5397232449742055`*^9}}] }, Closed]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Credits", "Subtitle", CellChangeTimes->{{3.539972381870288*^9, 3.539972382124303*^9}}, CellTags->"opengroup"], Cell[TextData[{ "Dynamo\nVersion 1.3 (8 July 2013)\nby William H. Sandholm, Emin Dokumaci \ and Francisco Franchetti\n\nmail:\t\t\tDepartment of Economics\n\t\t\t\ University of Wisconsin\n\t\t\t1180 Observatory Drive\n\t\t\tMadison WI 53706\ \n\ne-mail:\t\t\twhs@ssc.wisc.edu\n\t\t\tedokumaci@wisc.edu\n\t\t\t\ franchetti@wisc.edu\n\t\nwebsites:\t\t", ButtonBox["http://www.ssc.wisc.edu/~whs/", BaseStyle->"Hyperlink", ButtonData:>{ URL["http://www.ssc.wisc.edu/~whs/"], None}], "\n\t\t\t", ButtonBox["http://www.ssc.wisc.edu/~edokumac/\n\t\t\t", BaseStyle->"Hyperlink", ButtonData:>{ URL["http://www.ssc.wisc.edu/~edokumac/"], None}], ButtonBox["https://mywebspace.wisc.edu/franchetti/web/", BaseStyle->"Hyperlink", ButtonData->{ URL["https://mywebspace.wisc.edu/franchetti/web/"], None}, ButtonNote->"https://mywebspace.wisc.edu/franchetti/web/"], ButtonBox["\n\t\t\t", BaseStyle->"Hyperlink", ButtonData:>{ URL["http://www.ssc.wisc.edu/~edokumac/"], None}], "\nDynamo website:\t", ButtonBox["http://www.ssc.wisc.edu/~whs/dynamo", BaseStyle->"Hyperlink", ButtonData:>{ URL["http://www.ssc.wisc.edu/~whs/dynamo"], None}], "\n \nFinancial support from the National Science Foundation under Grants \ SES-0092145, SES-0617753, SES-0851580, and SES-1155135 is gratefully \ acknowledged." }], "Text", Evaluatable->False, CellChangeTimes->{{3.480864918617506*^9, 3.480864924476881*^9}, { 3.5061798563362703`*^9, 3.5061799631184635`*^9}, {3.5061801200899715`*^9, 3.5061801342102757`*^9}, {3.506180450374898*^9, 3.506180454801263*^9}, { 3.5061804883094454`*^9, 3.5061805177017093`*^9}, {3.511176805912285*^9, 3.511176828069092*^9}, 3.511176945637301*^9, {3.511176977750432*^9, 3.51117699896663*^9}, 3.51117703026584*^9, {3.5237327702053223`*^9, 3.523732775200923*^9}, {3.5397143039733424`*^9, 3.5397143094280353`*^9}, { 3.541076684033853*^9, 3.541076686413662*^9}, {3.557584736852723*^9, 3.557584741238151*^9}, {3.557584818528257*^9, 3.557584823038488*^9}, { 3.582291388239656*^9, 3.5822914003177967`*^9}}, FontFamily->"Palatino", CellTags->{"finalcell", "buttoncell", "opengroup"}] }, Open ]] }, AutoGeneratedPackage->Automatic, ScreenStyleEnvironment->"Working", WindowToolbars->{}, PrintAction->"PrintToNotebook", InitializationCellEvaluation->True, InitializationCellWarning->False, CellGrouping->Manual, WindowSize->{1015, 855}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, PrintingCopies->1, PrintingPageRange->{1, Automatic}, ShowSelection->True, ShowCellLabel->True, ShowCellTags->False, FrontEndVersion->"10.0 for Mac OS X x86 (32-bit, 64-bit Kernel) (June 27, \ 2014)", StyleDefinitions->Notebook[{ Cell[ CellGroupData[{ Cell["Style Definitions", "Title"], Cell[ "Modify the definitions below to change the default appearance of all \ cells in a given style. Make modifications to any definition using commands \ in the Format menu.", "Text"], Cell[ CellGroupData[{ Cell["Style Environment Names", "Section"], Cell[ StyleData[All, "Working"], PageWidth -> WindowWidth, CellBracketOptions -> { "Color" -> RGBColor[0.269993, 0.308507, 0.6]}, CellLabelMargins -> {{12, Inherited}, {Inherited, Inherited}}, ScriptMinSize -> 9], Cell[ StyleData[All, "Presentation"], PageWidth -> WindowWidth, CellLabelMargins -> {{24, Inherited}, {Inherited, Inherited}}, ScriptMinSize -> 12], Cell[ StyleData[All, "Condensed"], PageWidth -> WindowWidth, CellLabelMargins -> {{8, Inherited}, {Inherited, Inherited}}, ScriptMinSize -> 8], Cell[ StyleData[All, "SlideShow"], PageWidth -> WindowWidth, ScrollingOptions -> {"PagewiseDisplay" -> True}, ShowCellBracket -> False, ScriptMinSize -> 9], Cell[ StyleData[All, "Printout"], PageWidth -> PaperWidth, CellLabelMargins -> {{2, Inherited}, {Inherited, Inherited}}, ScriptMinSize -> 5, PrivateFontOptions -> {"FontType" -> "Outline"}]}, Closed]], Cell[ CellGroupData[{ Cell["Notebook Options", "Section"], Cell[ "The options defined for the style below will be used at the \ Notebook level.", "Text"], Cell[ StyleData["Notebook"], PageHeaders -> {{ Cell[ TextData[{ CounterBox["Page"]}], "PageNumber"], None, Cell[ TextData[{ ValueBox["FileName"]}], "Header"]}, { Cell[ TextData[{ ValueBox["FileName"]}], "Header"], None, Cell[ TextData[{ CounterBox["Page"]}], "PageNumber"]}}, CellFrameLabelMargins -> 6, StyleMenuListing -> None]}, Open]], Cell[ CellGroupData[{ Cell["Styles for Headings", "Section"], Cell[ CellGroupData[{ Cell[ StyleData["Title"], CellMargins -> {{27, Inherited}, {10, 30}}, CellGroupingRules -> {"TitleGrouping", 0}, PageBreakBelow -> False, DefaultNewInlineCellStyle -> "None", InputAutoReplacements -> {"TeX" -> StyleBox[ RowBox[{"T", AdjustmentBox[ "E", BoxMargins -> {{-0.075, -0.085}, {0, 0}}, BoxBaselineShift -> 0.5], "X"}]], "LaTeX" -> StyleBox[ RowBox[{"L", StyleBox[ AdjustmentBox[ "A", BoxMargins -> {{-0.36, -0.1}, {0, 0}}, BoxBaselineShift -> -0.2], FontSize -> Smaller], "T", AdjustmentBox[ "E", BoxMargins -> {{-0.075, -0.085}, {0, 0}}, BoxBaselineShift -> 0.5], "X"}]], "mma" -> "Mathematica", "Mma" -> "Mathematica", "MMA" -> "Mathematica", "gridMathematica" -> FormBox[ RowBox[{"grid", AdjustmentBox[ StyleBox["Mathematica", FontSlant -> "Italic"], BoxMargins -> {{-0.175, 0}, {0, 0}}]}], TextForm], "webMathematica" -> FormBox[ RowBox[{"web", AdjustmentBox[ StyleBox["Mathematica", FontSlant -> "Italic"], BoxMargins -> {{-0.175, 0}, {0, 0}}]}], TextForm], Inherited}, LineSpacing -> {1, 11}, LanguageCategory -> "NaturalLanguage", CounterIncrements -> "Title", CounterAssignments -> {{"Section", 0}, {"Equation", 0}, { "Figure", 0}, {"Subtitle", 0}, {"Subsubtitle", 0}}, FontFamily -> "Helvetica", FontSize -> 36, FontWeight -> "Bold"], Cell[ StyleData["Title", "Presentation"], CellMargins -> {{27, 10}, {10, 30}}, LineSpacing -> {1, 0}, FontSize -> 44], Cell[ StyleData["Title", "Condensed"], CellMargins -> {{8, 10}, {4, 8}}, FontSize -> 20], Cell[ StyleData["Title", "SlideShow"]], Cell[ StyleData["Title", "Printout"], CellMargins -> {{2, 10}, {12, 30}}, FontSize -> 24]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Subtitle"], CellMargins -> {{27, Inherited}, {20, 2}}, CellGroupingRules -> {"TitleGrouping", 10}, PageBreakBelow -> False, DefaultNewInlineCellStyle -> "None", InputAutoReplacements -> {"TeX" -> StyleBox[ RowBox[{"T", AdjustmentBox[ "E", BoxMargins -> {{-0.075, -0.085}, {0, 0}}, BoxBaselineShift -> 0.5], "X"}]], "LaTeX" -> StyleBox[ RowBox[{"L", StyleBox[ AdjustmentBox[ "A", BoxMargins -> {{-0.36, -0.1}, {0, 0}}, BoxBaselineShift -> -0.2], FontSize -> Smaller], "T", AdjustmentBox[ "E", BoxMargins -> {{-0.075, -0.085}, {0, 0}}, BoxBaselineShift -> 0.5], "X"}]], "mma" -> "Mathematica", "Mma" -> "Mathematica", "MMA" -> "Mathematica", "gridMathematica" -> FormBox[ RowBox[{"grid", AdjustmentBox[ StyleBox["Mathematica", FontSlant -> "Italic"], BoxMargins -> {{-0.175, 0}, {0, 0}}]}], TextForm], "webMathematica" -> FormBox[ RowBox[{"web", AdjustmentBox[ StyleBox["Mathematica", FontSlant -> "Italic"], BoxMargins -> {{-0.175, 0}, {0, 0}}]}], TextForm], Inherited}, LanguageCategory -> "NaturalLanguage", CounterIncrements -> "Subtitle", CounterAssignments -> {{"Section", 0}, {"Equation", 0}, { "Figure", 0}, {"Subsubtitle", 0}}, FontFamily -> "Helvetica", FontSize -> 24], Cell[ StyleData["Subtitle", "Presentation"], CellMargins -> {{27, 10}, {20, 2}}, LineSpacing -> {1, 0}, FontSize -> 36], Cell[ StyleData["Subtitle", "Condensed"], CellMargins -> {{8, 10}, {4, 4}}, FontSize -> 14], Cell[ StyleData["Subtitle", "SlideShow"]], Cell[ StyleData["Subtitle", "Printout"], CellMargins -> {{2, 10}, {12, 8}}, FontSize -> 18]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Subsubtitle"], CellMargins -> {{27, Inherited}, {8, 2}}, CellGroupingRules -> {"TitleGrouping", 20}, PageBreakBelow -> False, DefaultNewInlineCellStyle -> "None", InputAutoReplacements -> {"TeX" -> StyleBox[ RowBox[{"T", AdjustmentBox[ "E", BoxMargins -> {{-0.075, -0.085}, {0, 0}}, BoxBaselineShift -> 0.5], "X"}]], "LaTeX" -> StyleBox[ RowBox[{"L", StyleBox[ AdjustmentBox[ "A", BoxMargins -> {{-0.36, -0.1}, {0, 0}}, BoxBaselineShift -> -0.2], FontSize -> Smaller], "T", AdjustmentBox[ "E", BoxMargins -> {{-0.075, -0.085}, {0, 0}}, BoxBaselineShift -> 0.5], "X"}]], "mma" -> "Mathematica", "Mma" -> "Mathematica", "MMA" -> "Mathematica", "gridMathematica" -> FormBox[ RowBox[{"grid", AdjustmentBox[ StyleBox["Mathematica", FontSlant -> "Italic"], BoxMargins -> {{-0.175, 0}, {0, 0}}]}], TextForm], "webMathematica" -> FormBox[ RowBox[{"web", AdjustmentBox[ StyleBox["Mathematica", FontSlant -> "Italic"], BoxMargins -> {{-0.175, 0}, {0, 0}}]}], TextForm], Inherited}, LanguageCategory -> "NaturalLanguage", CounterIncrements -> "Subsubtitle", CounterAssignments -> {{"Section", 0}, {"Equation", 0}, { "Figure", 0}}, FontFamily -> "Helvetica", FontSize -> 16], Cell[ StyleData["Subsubtitle", "Presentation"], CellMargins -> {{24, 10}, {20, 20}}, LineSpacing -> {1, 0}, FontSize -> 24], Cell[ StyleData["Subsubtitle", "Condensed"], CellMargins -> {{8, 10}, {8, 8}}, FontSize -> 12], Cell[ StyleData["Subsubtitle", "SlideShow"]], Cell[ StyleData["Subsubtitle", "Printout"], CellMargins -> {{2, 10}, {12, 8}}, FontSize -> 14]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Section"], CellFrame -> {{0, 0}, {0, 1}}, CellMargins -> {{27, Inherited}, {8, 34}}, CellGroupingRules -> {"SectionGrouping", 30}, PageBreakBelow -> False, CellFrameMargins -> 4, DefaultNewInlineCellStyle -> "None", InputAutoReplacements -> {"TeX" -> StyleBox[ RowBox[{"T", AdjustmentBox[ "E", BoxMargins -> {{-0.075, -0.085}, {0, 0}}, BoxBaselineShift -> 0.5], "X"}]], "LaTeX" -> StyleBox[ RowBox[{"L", StyleBox[ AdjustmentBox[ "A", BoxMargins -> {{-0.36, -0.1}, {0, 0}}, BoxBaselineShift -> -0.2], FontSize -> Smaller], "T", AdjustmentBox[ "E", BoxMargins -> {{-0.075, -0.085}, {0, 0}}, BoxBaselineShift -> 0.5], "X"}]], "mma" -> "Mathematica", "Mma" -> "Mathematica", "MMA" -> "Mathematica", "gridMathematica" -> FormBox[ RowBox[{"grid", AdjustmentBox[ StyleBox["Mathematica", FontSlant -> "Italic"], BoxMargins -> {{-0.175, 0}, {0, 0}}]}], TextForm], "webMathematica" -> FormBox[ RowBox[{"web", AdjustmentBox[ StyleBox["Mathematica", FontSlant -> "Italic"], BoxMargins -> {{-0.175, 0}, {0, 0}}]}], TextForm], Inherited}, LineSpacing -> {1, 2}, LanguageCategory -> "NaturalLanguage", CounterIncrements -> "Section", CounterAssignments -> {{"Subsection", 0}, {"Subsubsection", 0}}, FontFamily -> "Helvetica", FontSize -> 20, FontWeight -> "Bold"], Cell[ StyleData["Section", "Presentation"], CellMargins -> {{40, 10}, {11, 32}}, LineSpacing -> {1, 0}, FontSize -> 24], Cell[ StyleData["Section", "Condensed"], CellMargins -> {{18, Inherited}, {6, 12}}, FontSize -> 12], Cell[ StyleData["Section", "SlideShow"]], Cell[ StyleData["Section", "Printout"], CellMargins -> {{2, 0}, {7, 22}}, FontSize -> 14]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Subsection"], CellDingbat -> "\[FilledSmallSquare]", CellMargins -> {{60, Inherited}, {8, 12}}, CellGroupingRules -> {"SectionGrouping", 40}, PageBreakBelow -> False, DefaultNewInlineCellStyle -> "None", InputAutoReplacements -> {"TeX" -> StyleBox[ RowBox[{"T", AdjustmentBox[ "E", BoxMargins -> {{-0.075, -0.085}, {0, 0}}, BoxBaselineShift -> 0.5], "X"}]], "LaTeX" -> StyleBox[ RowBox[{"L", StyleBox[ AdjustmentBox[ "A", BoxMargins -> {{-0.36, -0.1}, {0, 0}}, BoxBaselineShift -> -0.2], FontSize -> Smaller], "T", AdjustmentBox[ "E", BoxMargins -> {{-0.075, -0.085}, {0, 0}}, BoxBaselineShift -> 0.5], "X"}]], "mma" -> "Mathematica", "Mma" -> "Mathematica", "MMA" -> "Mathematica", "gridMathematica" -> FormBox[ RowBox[{"grid", AdjustmentBox[ StyleBox["Mathematica", FontSlant -> "Italic"], BoxMargins -> {{-0.175, 0}, {0, 0}}]}], TextForm], "webMathematica" -> FormBox[ RowBox[{"web", AdjustmentBox[ StyleBox["Mathematica", FontSlant -> "Italic"], BoxMargins -> {{-0.175, 0}, {0, 0}}]}], TextForm], Inherited}, LanguageCategory -> "NaturalLanguage", CounterIncrements -> "Subsection", CounterAssignments -> {{"Subsubsection", 0}}, FontFamily -> "Verdana", FontSize -> 14, FontWeight -> "Bold"], Cell[ StyleData["Subsection", "Presentation"], CellMargins -> {{36, 10}, {11, 32}}, LineSpacing -> {1, 0}, FontSize -> 22], Cell[ StyleData["Subsection", "Condensed"], CellMargins -> {{16, Inherited}, {6, 12}}, FontSize -> 12], Cell[ StyleData["Subsection", "SlideShow"]], Cell[ StyleData["Subsection", "Printout"], CellMargins -> {{9, 0}, {7, 22}}, FontSize -> 12]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Subsubsection"], CellDingbat -> "\[FilledSmallSquare]", CellMargins -> {{60, Inherited}, {10, 10}}, CellGroupingRules -> {"SectionGrouping", 50}, PageBreakBelow -> False, CellFrameMargins -> 20, InputAutoReplacements -> {"TeX" -> StyleBox[ RowBox[{"T", AdjustmentBox[ "E", BoxMargins -> {{-0.075, -0.085}, {0, 0}}, BoxBaselineShift -> 0.5], "X"}]], "LaTeX" -> StyleBox[ RowBox[{"L", StyleBox[ AdjustmentBox[ "A", BoxMargins -> {{-0.36, -0.1}, {0, 0}}, BoxBaselineShift -> -0.2], FontSize -> Smaller], "T", AdjustmentBox[ "E", BoxMargins -> {{-0.075, -0.085}, {0, 0}}, BoxBaselineShift -> 0.5], "X"}]], "mma" -> "Mathematica", "Mma" -> "Mathematica", "MMA" -> "Mathematica", "gridMathematica" -> FormBox[ RowBox[{"grid", AdjustmentBox[ StyleBox["Mathematica", FontSlant -> "Italic"], BoxMargins -> {{-0.175, 0}, {0, 0}}]}], TextForm], "webMathematica" -> FormBox[ RowBox[{"web", AdjustmentBox[ StyleBox["Mathematica", FontSlant -> "Italic"], BoxMargins -> {{-0.175, 0}, {0, 0}}]}], TextForm], Inherited}, LanguageCategory -> "NaturalLanguage", CounterIncrements -> "Subsubsection", FontFamily -> "Verdana", FontWeight -> "Plain", FontSlant -> "Plain", FontTracking -> "Plain", FontVariations -> { "CompatibilityType" -> 0, "Masked" -> False, "Outline" -> False, "RotationAngle" -> 0, "Shadow" -> False, "StrikeThrough" -> False, "Underline" -> False}], Cell[ StyleData["Subsubsection", "Presentation"], CellMargins -> {{34, 10}, {11, 26}}, LineSpacing -> {1, 0}, FontSize -> 18], Cell[ StyleData["Subsubsection", "Condensed"], CellMargins -> {{17, Inherited}, {6, 12}}, FontSize -> 10], Cell[ StyleData["Subsubsection", "SlideShow"]], Cell[ StyleData["Subsubsection", "Printout"], CellMargins -> {{9, 0}, {7, 14}}, FontSize -> 11]}, Open]]}, Open]], Cell[ CellGroupData[{ Cell["Styles for Body Text", "Section"], Cell[ CellGroupData[{ Cell[ StyleData["Text"], CellMargins -> {{60, 10}, {7, 7}}, InputAutoReplacements -> {"TeX" -> StyleBox[ RowBox[{"T", AdjustmentBox[ "E", BoxMargins -> {{-0.075, -0.085}, {0, 0}}, BoxBaselineShift -> 0.5], "X"}]], "LaTeX" -> StyleBox[ RowBox[{"L", StyleBox[ AdjustmentBox[ "A", BoxMargins -> {{-0.36, -0.1}, {0, 0}}, BoxBaselineShift -> -0.2], FontSize -> Smaller], "T", AdjustmentBox[ "E", BoxMargins -> {{-0.075, -0.085}, {0, 0}}, BoxBaselineShift -> 0.5], "X"}]], "mma" -> "Mathematica", "Mma" -> "Mathematica", "MMA" -> "Mathematica", "gridMathematica" -> FormBox[ RowBox[{"grid", AdjustmentBox[ StyleBox["Mathematica", FontSlant -> "Italic"], BoxMargins -> {{-0.175, 0}, {0, 0}}]}], TextForm], "webMathematica" -> FormBox[ RowBox[{"web", AdjustmentBox[ StyleBox["Mathematica", FontSlant -> "Italic"], BoxMargins -> {{-0.175, 0}, {0, 0}}]}], TextForm], Inherited}, LineSpacing -> {1, 3}, CounterIncrements -> "Text", FontFamily -> "Palatino"], Cell[ StyleData["Text", "Presentation"], CellMargins -> {{24, 10}, {10, 10}}, LineSpacing -> {1, 5}, FontSize -> 16], Cell[ StyleData["Text", "Condensed"], CellMargins -> {{8, 10}, {6, 6}}, LineSpacing -> {1, 1}, FontSize -> 11], Cell[ StyleData["Text", "SlideShow"]], Cell[ StyleData["Text", "Printout"], CellMargins -> {{2, 2}, {6, 6}}, TextJustification -> 0.5, Hyphenation -> True, FontSize -> 10]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["SmallText"], CellMargins -> {{60, 3}, {4, 4}}, DefaultNewInlineCellStyle -> "None", LineSpacing -> {1, 3}, LanguageCategory -> "NaturalLanguage", CounterIncrements -> "SmallText", FontFamily -> "Trebuchet MS", FontSize -> 12, FontSlant -> "Italic"], Cell[ StyleData["SmallText", "Presentation"], CellMargins -> {{24, 10}, {8, 8}}, LineSpacing -> {1, 5}, FontSize -> 12], Cell[ StyleData["SmallText", "Condensed"], CellMargins -> {{8, 10}, {5, 5}}, LineSpacing -> {1, 2}, FontSize -> 9], Cell[ StyleData["SmallText", "SlideShow"]], Cell[ StyleData["SmallText", "Printout"], CellMargins -> {{2, 2}, {5, 5}}, TextJustification -> 0.5, Hyphenation -> True, FontSize -> 7]}, Open]]}, Open]], Cell[ CellGroupData[{ Cell["Styles for Input/Output", "Section"], Cell[ "The cells in this section define styles used for input and output \ to the kernel. Be careful when modifying, renaming, or removing these \ styles, because the front end associates special meanings with these style \ names. Some attributes for these styles are actually set in FormatType Styles \ (in the last section of this stylesheet). ", "Text"], Cell[ CellGroupData[{ Cell[ StyleData["Input"], CellMargins -> {{66, 10}, {5, 7}}, Evaluatable -> True, CellGroupingRules -> "InputGrouping", CellHorizontalScrolling -> True, PageBreakWithin -> False, GroupPageBreakWithin -> False, DefaultFormatType -> DefaultInputFormatType, "TwoByteSyntaxCharacterAutoReplacement" -> True, HyphenationOptions -> { "HyphenationCharacter" -> "\[Continuation]"}, AutoItalicWords -> {}, LanguageCategory -> "Mathematica", FormatType -> InputForm, ShowStringCharacters -> True, NumberMarks -> True, LinebreakAdjustments -> {0.85, 2, 10, 0, 1}, CounterIncrements -> "Input", FontWeight -> "Bold"], Cell[ StyleData["Input", "Presentation"], CellMargins -> {{72, Inherited}, {8, 10}}, LineSpacing -> {1, 0}, FontSize -> 16], Cell[ StyleData["Input", "Condensed"], CellMargins -> {{40, 10}, {2, 3}}, FontSize -> 11], Cell[ StyleData["Input", "SlideShow"]], Cell[ StyleData["Input", "Printout"], CellMargins -> {{39, 0}, {4, 6}}, LinebreakAdjustments -> {0.85, 2, 10, 1, 1}, FontSize -> 9]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["InputOnly"], CellMargins -> {{66, 10}, {7, 7}}, Evaluatable -> True, CellGroupingRules -> "InputGrouping", CellHorizontalScrolling -> True, DefaultFormatType -> DefaultInputFormatType, "TwoByteSyntaxCharacterAutoReplacement" -> True, HyphenationOptions -> { "HyphenationCharacter" -> "\[Continuation]"}, AutoItalicWords -> {}, LanguageCategory -> "Mathematica", FormatType -> InputForm, ShowStringCharacters -> True, NumberMarks -> True, LinebreakAdjustments -> {0.85, 2, 10, 0, 1}, CounterIncrements -> "Input", StyleMenuListing -> None, FontWeight -> "Bold"], Cell[ StyleData["InputOnly", "Presentation"], CellMargins -> {{72, Inherited}, {8, 10}}, LineSpacing -> {1, 0}, FontSize -> 16], Cell[ StyleData["InputOnly", "Condensed"], CellMargins -> {{40, 10}, {2, 3}}, FontSize -> 11], Cell[ StyleData["InputOnly", "SlideShow"]], Cell[ StyleData["InputOnly", "Printout"], CellMargins -> {{39, 0}, {4, 6}}, LinebreakAdjustments -> {0.85, 2, 10, 1, 1}, FontSize -> 9]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Output"], CellMargins -> {{66, 10}, {7, 5}}, CellEditDuplicate -> True, CellGroupingRules -> "OutputGrouping", CellHorizontalScrolling -> True, PageBreakWithin -> False, GroupPageBreakWithin -> False, GeneratedCell -> True, CellAutoOverwrite -> True, DefaultFormatType -> DefaultOutputFormatType, "TwoByteSyntaxCharacterAutoReplacement" -> True, HyphenationOptions -> { "HyphenationCharacter" -> "\[Continuation]"}, AutoItalicWords -> {}, LanguageCategory -> None, FormatType -> InputForm, CounterIncrements -> "Output"], Cell[ StyleData["Output", "Presentation"], CellMargins -> {{72, Inherited}, {10, 8}}, LineSpacing -> {1, 0}, FontSize -> 16], Cell[ StyleData["Output", "Condensed"], CellMargins -> {{41, Inherited}, {3, 2}}, FontSize -> 11], Cell[ StyleData["Output", "SlideShow"]], Cell[ StyleData["Output", "Printout"], CellMargins -> {{39, 0}, {6, 4}}, FontSize -> 9]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Message"], CellMargins -> {{66, Inherited}, {Inherited, Inherited}}, CellGroupingRules -> "OutputGrouping", PageBreakWithin -> False, GroupPageBreakWithin -> False, GeneratedCell -> True, CellAutoOverwrite -> True, ShowCellLabel -> False, DefaultFormatType -> DefaultOutputFormatType, "TwoByteSyntaxCharacterAutoReplacement" -> True, HyphenationOptions -> { "HyphenationCharacter" -> "\[Continuation]"}, AutoItalicWords -> {}, LanguageCategory -> None, FormatType -> InputForm, CounterIncrements -> "Message", StyleMenuListing -> None, FontFamily -> "Helvetica", FontSize -> 10, FontColor -> RGBColor[0.6, 0.100008, 0.100008]], Cell[ StyleData["Message", "Presentation"], CellMargins -> {{72, Inherited}, {Inherited, Inherited}}, LineSpacing -> {1, 0}, FontSize -> 16], Cell[ StyleData["Message", "Condensed"], CellMargins -> {{41, Inherited}, {Inherited, Inherited}}, FontSize -> 11], Cell[ StyleData["Message", "SlideShow"]], Cell[ StyleData["Message", "Printout"], CellMargins -> {{39, Inherited}, {Inherited, Inherited}}, FontSize -> 7, FontColor -> GrayLevel[0]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Print"], CellMargins -> {{66, Inherited}, {Inherited, Inherited}}, CellGroupingRules -> "OutputGrouping", CellHorizontalScrolling -> True, PageBreakWithin -> False, GroupPageBreakWithin -> False, GeneratedCell -> True, CellAutoOverwrite -> True, ShowCellLabel -> False, DefaultFormatType -> DefaultOutputFormatType, "TwoByteSyntaxCharacterAutoReplacement" -> True, HyphenationOptions -> { "HyphenationCharacter" -> "\[Continuation]"}, AutoItalicWords -> {}, LanguageCategory -> None, FormatType -> InputForm, CounterIncrements -> "Print", StyleMenuListing -> None], Cell[ StyleData["Print", "Presentation"], CellMargins -> {{72, Inherited}, {Inherited, Inherited}}, LineSpacing -> {1, 0}, FontSize -> 16], Cell[ StyleData["Print", "Condensed"], CellMargins -> {{41, Inherited}, {Inherited, Inherited}}, FontSize -> 11], Cell[ StyleData["Print", "SlideShow"]], Cell[ StyleData["Print", "Printout"], CellMargins -> {{39, Inherited}, {Inherited, Inherited}}, FontSize -> 8]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Graphics"], CellMargins -> {{4, Inherited}, {Inherited, Inherited}}, CellGroupingRules -> "GraphicsGrouping", CellHorizontalScrolling -> True, PageBreakWithin -> False, GeneratedCell -> True, CellAutoOverwrite -> True, ShowCellLabel -> False, DefaultFormatType -> DefaultOutputFormatType, LanguageCategory -> None, FormatType -> InputForm, CounterIncrements -> "Graphics", ImageMargins -> {{43, Inherited}, {Inherited, 0}}, StyleMenuListing -> None, FontFamily -> "Courier", FontSize -> 10], Cell[ StyleData["Graphics", "Presentation"], ImageMargins -> {{62, Inherited}, {Inherited, 0}}], Cell[ StyleData["Graphics", "Condensed"], ImageMargins -> {{38, Inherited}, {Inherited, 0}}, Magnification -> 0.6], Cell[ StyleData["Graphics", "SlideShow"]], Cell[ StyleData["Graphics", "Printout"], ImageMargins -> {{30, Inherited}, {Inherited, 0}}, Magnification -> 0.8]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["CellLabel"], LanguageCategory -> None, StyleMenuListing -> None, FontFamily -> "Helvetica", FontSize -> 9, FontColor -> RGBColor[0.269993, 0.308507, 0.6]], Cell[ StyleData["CellLabel", "Presentation"], FontSize -> 12], Cell[ StyleData["CellLabel", "Condensed"], FontSize -> 9], Cell[ StyleData["CellLabel", "SlideShow"]], Cell[ StyleData["CellLabel", "Printout"], FontFamily -> "Courier", FontSize -> 8, FontSlant -> "Italic", FontColor -> GrayLevel[0]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["FrameLabel"], LanguageCategory -> None, StyleMenuListing -> None, FontFamily -> "Helvetica", FontSize -> 9], Cell[ StyleData["FrameLabel", "Presentation"], FontSize -> 12], Cell[ StyleData["FrameLabel", "Condensed"], FontSize -> 9], Cell[ StyleData["FrameLabel", "SlideShow"]], Cell[ StyleData["FrameLabel", "Printout"], FontFamily -> "Courier", FontSize -> 8, FontSlant -> "Italic", FontColor -> GrayLevel[0]]}, Closed]]}, Closed]], Cell[ CellGroupData[{ Cell["Inline Formatting", "Section"], Cell[ "These styles are for modifying individual words or letters in a \ cell exclusive of the cell tag.", "Text"], Cell[ StyleData["RM"], StyleMenuListing -> None, FontWeight -> "Plain", FontSlant -> "Plain"], Cell[ StyleData["BF"], StyleMenuListing -> None, FontWeight -> "Bold"], Cell[ StyleData["IT"], StyleMenuListing -> None, FontSlant -> "Italic"], Cell[ StyleData["TR"], StyleMenuListing -> None, FontFamily -> "Times", FontWeight -> "Plain", FontSlant -> "Plain"], Cell[ StyleData["TI"], StyleMenuListing -> None, FontFamily -> "Times", FontWeight -> "Plain", FontSlant -> "Italic"], Cell[ StyleData["TB"], StyleMenuListing -> None, FontFamily -> "Times", FontWeight -> "Bold", FontSlant -> "Plain"], Cell[ StyleData["TBI"], StyleMenuListing -> None, FontFamily -> "Times", FontWeight -> "Bold", FontSlant -> "Italic"], Cell[ StyleData["MR"], "TwoByteSyntaxCharacterAutoReplacement" -> True, HyphenationOptions -> {"HyphenationCharacter" -> "\[Continuation]"}, StyleMenuListing -> None, FontFamily -> "Courier", FontWeight -> "Plain", FontSlant -> "Plain"], Cell[ StyleData["MO"], "TwoByteSyntaxCharacterAutoReplacement" -> True, HyphenationOptions -> {"HyphenationCharacter" -> "\[Continuation]"}, StyleMenuListing -> None, FontFamily -> "Courier", FontWeight -> "Plain", FontSlant -> "Italic"], Cell[ StyleData["MB"], "TwoByteSyntaxCharacterAutoReplacement" -> True, HyphenationOptions -> {"HyphenationCharacter" -> "\[Continuation]"}, StyleMenuListing -> None, FontFamily -> "Courier", FontWeight -> "Bold", FontSlant -> "Plain"], Cell[ StyleData["MBO"], "TwoByteSyntaxCharacterAutoReplacement" -> True, HyphenationOptions -> {"HyphenationCharacter" -> "\[Continuation]"}, StyleMenuListing -> None, FontFamily -> "Courier", FontWeight -> "Bold", FontSlant -> "Italic"], Cell[ StyleData["SR"], StyleMenuListing -> None, FontFamily -> "Helvetica", FontWeight -> "Plain", FontSlant -> "Plain"], Cell[ StyleData["SO"], StyleMenuListing -> None, FontFamily -> "Helvetica", FontWeight -> "Plain", FontSlant -> "Italic"], Cell[ StyleData["SB"], StyleMenuListing -> None, FontFamily -> "Helvetica", FontWeight -> "Bold", FontSlant -> "Plain"], Cell[ StyleData["SBO"], StyleMenuListing -> None, FontFamily -> "Helvetica", FontWeight -> "Bold", FontSlant -> "Italic"], Cell[ CellGroupData[{ Cell[ StyleData["SO10"], StyleMenuListing -> None, FontFamily -> "Helvetica", FontSize -> 10, FontWeight -> "Plain", FontSlant -> "Italic"], Cell[ StyleData["SO10", "Printout"], StyleMenuListing -> None, FontFamily -> "Helvetica", FontSize -> 7, FontWeight -> "Plain", FontSlant -> "Italic"]}, Closed]]}, Closed]], Cell[ CellGroupData[{ Cell["Formulas and Programming", "Section"], Cell[ CellGroupData[{ Cell[ StyleData["InlineFormula"], CellMargins -> {{10, 4}, {0, 8}}, CellHorizontalScrolling -> True, HyphenationOptions -> { "HyphenationCharacter" -> "\[Continuation]"}, LanguageCategory -> "Formula", ScriptLevel -> 1, SingleLetterItalics -> True], Cell[ StyleData["InlineFormula", "Presentation"], CellMargins -> {{24, 10}, {10, 10}}, LineSpacing -> {1, 5}, FontSize -> 16], Cell[ StyleData["InlineFormula", "Condensed"], CellMargins -> {{8, 10}, {6, 6}}, LineSpacing -> {1, 1}, FontSize -> 11], Cell[ StyleData["InlineFormula", "SlideShow"]], Cell[ StyleData["InlineFormula", "Printout"], CellMargins -> {{2, 0}, {6, 6}}, FontSize -> 10]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["DisplayFormula"], CellMargins -> {{60, Inherited}, {Inherited, Inherited}}, CellHorizontalScrolling -> True, DefaultFormatType -> DefaultInputFormatType, HyphenationOptions -> { "HyphenationCharacter" -> "\[Continuation]"}, LanguageCategory -> "Formula", ScriptLevel -> 0, SingleLetterItalics -> True, UnderoverscriptBoxOptions -> {LimitsPositioning -> True}], Cell[ StyleData["DisplayFormula", "Presentation"], LineSpacing -> {1, 5}, FontSize -> 16], Cell[ StyleData["DisplayFormula", "Condensed"], LineSpacing -> {1, 1}, FontSize -> 11], Cell[ StyleData["DisplayFormula", "SlideShow"]], Cell[ StyleData["DisplayFormula", "Printout"], FontSize -> 10]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Program"], CellFrame -> {{0, 0}, {0.5, 0.5}}, CellMargins -> {{60, 4}, {0, 8}}, CellHorizontalScrolling -> True, Hyphenation -> False, LanguageCategory -> "Formula", ScriptLevel -> 1, FontFamily -> "Courier"], Cell[ StyleData["Program", "Presentation"], CellMargins -> {{24, 10}, {10, 10}}, LineSpacing -> {1, 5}, FontSize -> 16], Cell[ StyleData["Program", "Condensed"], CellMargins -> {{8, 10}, {6, 6}}, LineSpacing -> {1, 1}, FontSize -> 11], Cell[ StyleData["Program", "SlideShow"]], Cell[ StyleData["Program", "Printout"], CellMargins -> {{2, 0}, {6, 6}}, FontSize -> 9]}, Closed]]}, Closed]], Cell[ CellGroupData[{ Cell["Outline Styles", "Section"], Cell[ CellGroupData[{ Cell[ StyleData["Outline1"], CellMargins -> {{60, 10}, {7, 7}}, CellGroupingRules -> {"SectionGrouping", 50}, ParagraphIndent -> -38, CounterIncrements -> "Outline1", CounterAssignments -> {{"Outline2", 0}, {"Outline3", 0}, { "Outline4", 0}}, FontSize -> 18, FontWeight -> "Bold", CounterBoxOptions -> {CounterFunction :> CapitalRomanNumeral}], Cell[ StyleData["Outline1", "SlideShow"]], Cell[ StyleData["Outline1", "Printout"], CounterBoxOptions -> {CounterFunction :> CapitalRomanNumeral}]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Outline2"], CellMargins -> {{90, 10}, {7, 7}}, CellGroupingRules -> {"SectionGrouping", 60}, ParagraphIndent -> -27, CounterIncrements -> "Outline2", CounterAssignments -> {{"Outline3", 0}, {"Outline4", 0}}, FontSize -> 15, FontWeight -> "Bold", CounterBoxOptions -> {CounterFunction :> (Part[ CharacterRange["A", "Z"], #]& )}], Cell[ StyleData["Outline2", "SlideShow"]], Cell[ StyleData["Outline2", "Printout"], CounterBoxOptions -> {CounterFunction :> (Part[ CharacterRange["A", "Z"], #]& )}]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Outline3"], CellMargins -> {{120, 10}, {7, 7}}, CellGroupingRules -> {"SectionGrouping", 70}, ParagraphIndent -> -21, CounterIncrements -> "Outline3", CounterAssignments -> {{"Outline4", 0}}, FontSize -> 12, CounterBoxOptions -> {CounterFunction :> Identity}], Cell[ StyleData["Outline3", "SlideShow"]], Cell[ StyleData["Outline3", "Printout"], CounterBoxOptions -> {CounterFunction :> Identity}]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Outline4"], CellMargins -> {{150, 10}, {7, 7}}, CellGroupingRules -> {"SectionGrouping", 80}, ParagraphIndent -> -18, CounterIncrements -> "Outline4", FontSize -> 10, CounterBoxOptions -> {CounterFunction :> (Part[ CharacterRange["a", "z"], #]& )}], Cell[ StyleData["Outline4", "SlideShow"]], Cell[ StyleData["Outline4", "Printout"]]}, Closed]]}, Closed]], Cell[ CellGroupData[{ Cell["Hyperlink Styles", "Section"], Cell[ "The cells below define styles useful for making hypertext \ ButtonBoxes. The \"Hyperlink\" style is for links within the same Notebook, \ or between Notebooks.", "Text"], Cell[ CellGroupData[{ Cell[ StyleData["Hyperlink"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, FontVariations -> {"Underline" -> True}, FontColor -> RGBColor[0.269993, 0.308507, 0.6], ButtonBoxOptions -> { Active -> True, Appearance -> {Automatic, None}, ButtonFunction :> (FrontEndExecute[{ FrontEnd`NotebookLocate[#2]}]& ), ButtonNote -> ButtonData}], Cell[ StyleData["Hyperlink", "Presentation"], FontSize -> 16], Cell[ StyleData["Hyperlink", "Condensed"], FontSize -> 11], Cell[ StyleData["Hyperlink", "SlideShow"]], Cell[ StyleData["Hyperlink", "Printout"], FontSize -> 10, FontVariations -> {"Underline" -> False}, FontColor -> GrayLevel[0]]}, Closed]], Cell[ "The following styles are for linking automatically to the on-line \ help system.", "Text"], Cell[ CellGroupData[{ Cell[ StyleData["MainBookLink"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, FontVariations -> {"Underline" -> True}, FontColor -> RGBColor[0.269993, 0.308507, 0.6], ButtonBoxOptions -> { Active -> True, Appearance -> {Automatic, None}, ButtonFunction :> (FrontEndExecute[{ FrontEnd`HelpBrowserLookup["MainBook", #]}]& )}], Cell[ StyleData["MainBookLink", "Presentation"], FontSize -> 16], Cell[ StyleData["MainBookLink", "Condensed"], FontSize -> 11], Cell[ StyleData["MainBookLink", "SlideShow"]], Cell[ StyleData["MainBookLink", "Printout"], FontSize -> 10, FontVariations -> {"Underline" -> False}, FontColor -> GrayLevel[0]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["AddOnsLink"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, FontFamily -> "Courier", FontVariations -> {"Underline" -> True}, FontColor -> RGBColor[0.269993, 0.308507, 0.6], ButtonBoxOptions -> { Active -> True, Appearance -> {Automatic, None}, ButtonFunction :> (FrontEndExecute[{ FrontEnd`HelpBrowserLookup["AddOns", #]}]& )}], Cell[ StyleData["AddOnsLink", "Presentation"], FontSize -> 16], Cell[ StyleData["AddOnsLink", "Condensed"], FontSize -> 11], Cell[ StyleData["AddOnsLink", "SlideShow"]], Cell[ StyleData["AddOnsLink", "Printout"], FontSize -> 10, FontVariations -> {"Underline" -> False}, FontColor -> GrayLevel[0]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["RefGuideLink"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, FontFamily -> "Courier", FontVariations -> {"Underline" -> True}, FontColor -> RGBColor[0.269993, 0.308507, 0.6], ButtonBoxOptions -> { Active -> True, Appearance -> {Automatic, None}, ButtonFunction :> (\ FrontEndExecute[{ FrontEnd`HelpBrowserLookup["RefGuide", #]}]& )}], Cell[ StyleData["RefGuideLink", "Presentation"], FontSize -> 16], Cell[ StyleData["RefGuideLink", "Condensed"], FontSize -> 11], Cell[ StyleData["RefGuideLink", "SlideShow"]], Cell[ StyleData["RefGuideLink", "Printout"], FontSize -> 10, FontVariations -> {"Underline" -> False}, FontColor -> GrayLevel[0]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["RefGuideLinkText"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, FontVariations -> {"Underline" -> True}, FontColor -> RGBColor[0.269993, 0.308507, 0.6], ButtonBoxOptions -> { Active -> True, Appearance -> {Automatic, None}, ButtonFunction :> (FrontEndExecute[{ FrontEnd`HelpBrowserLookup["RefGuide", #]}]& )}], Cell[ StyleData["RefGuideLinkText", "Presentation"], FontSize -> 16], Cell[ StyleData["RefGuideLinkText", "Condensed"], FontSize -> 11], Cell[ StyleData["RefGuideLinkText", "SlideShow"]], Cell[ StyleData["RefGuideLinkText", "Printout"], FontSize -> 10, FontVariations -> {"Underline" -> False}, FontColor -> GrayLevel[0]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["GettingStartedLink"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, FontVariations -> {"Underline" -> True}, FontColor -> RGBColor[0.269993, 0.308507, 0.6], ButtonBoxOptions -> { Active -> True, Appearance -> {Automatic, None}, ButtonFunction :> (FrontEndExecute[{ FrontEnd`HelpBrowserLookup["GettingStarted", #]}]& )}], Cell[ StyleData["GettingStartedLink", "Presentation"], FontSize -> 16], Cell[ StyleData["GettingStartedLink", "Condensed"], FontSize -> 11], Cell[ StyleData["GettingStartedLink", "SlideShow"]], Cell[ StyleData["GettingStartedLink", "Printout"], FontSize -> 10, FontVariations -> {"Underline" -> False}, FontColor -> GrayLevel[0]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["DemosLink"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, FontVariations -> {"Underline" -> True}, FontColor -> RGBColor[0.269993, 0.308507, 0.6], ButtonBoxOptions -> { Active -> True, Appearance -> {Automatic, None}, ButtonFunction :> (FrontEndExecute[{ FrontEnd`HelpBrowserLookup["Demos", #]}]& )}], Cell[ StyleData["DemosLink", "SlideShow"]], Cell[ StyleData["DemosLink", "Printout"], FontVariations -> {"Underline" -> False}, FontColor -> GrayLevel[0]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["TourLink"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, FontVariations -> {"Underline" -> True}, FontColor -> RGBColor[0.269993, 0.308507, 0.6], ButtonBoxOptions -> { Active -> True, Appearance -> {Automatic, None}, ButtonFunction :> (FrontEndExecute[{ FrontEnd`HelpBrowserLookup["Tour", #]}]& )}], Cell[ StyleData["TourLink", "SlideShow"]], Cell[ StyleData["TourLink", "Printout"], FontVariations -> {"Underline" -> False}, FontColor -> GrayLevel[0]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["OtherInformationLink"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, FontVariations -> {"Underline" -> True}, FontColor -> RGBColor[0.269993, 0.308507, 0.6], ButtonBoxOptions -> { Active -> True, Appearance -> {Automatic, None}, ButtonFunction :> (FrontEndExecute[{ FrontEnd`HelpBrowserLookup["OtherInformation", #]}]& )}], Cell[ StyleData["OtherInformationLink", "Presentation"], FontSize -> 16], Cell[ StyleData["OtherInformationLink", "Condensed"], FontSize -> 11], Cell[ StyleData["OtherInformationLink", "SlideShow"]], Cell[ StyleData["OtherInformationLink", "Printout"], FontSize -> 10, FontVariations -> {"Underline" -> False}, FontColor -> GrayLevel[0]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["MasterIndexLink"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, FontVariations -> {"Underline" -> True}, FontColor -> RGBColor[0.269993, 0.308507, 0.6], ButtonBoxOptions -> { Active -> True, Appearance -> {Automatic, None}, ButtonFunction :> (FrontEndExecute[{ FrontEnd`HelpBrowserLookup["MasterIndex", #]}]& )}], Cell[ StyleData["MasterIndexLink", "SlideShow"]], Cell[ StyleData["MasterIndexLink", "Printout"], FontVariations -> {"Underline" -> False}, FontColor -> GrayLevel[0]]}, Closed]]}, Closed]], Cell[ CellGroupData[{ Cell["Styles for Headers and Footers", "Section"], Cell[ StyleData["Header"], CellMargins -> {{0, 0}, {4, 1}}, DefaultNewInlineCellStyle -> "None", LanguageCategory -> "NaturalLanguage", StyleMenuListing -> None, FontSize -> 10, FontSlant -> "Italic"], Cell[ StyleData["Footer"], CellMargins -> {{0, 0}, {0, 4}}, DefaultNewInlineCellStyle -> "None", LanguageCategory -> "NaturalLanguage", StyleMenuListing -> None, FontSize -> 9, FontSlant -> "Italic"], Cell[ StyleData["PageNumber"], CellMargins -> {{0, 0}, {4, 1}}, StyleMenuListing -> None, FontFamily -> "Times", FontSize -> 10]}, Closed]], Cell[ CellGroupData[{ Cell["Palette Styles", "Section"], Cell[ "The cells below define styles that define standard ButtonFunctions, \ for use in palette buttons.", "Text"], Cell[ StyleData["Paste"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, ButtonBoxOptions -> {ButtonFunction :> (FrontEndExecute[{ FrontEnd`NotebookApply[ FrontEnd`InputNotebook[], #, Placeholder]}]& )}], Cell[ StyleData["Evaluate"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, ButtonBoxOptions -> {ButtonFunction :> (FrontEndExecute[{ FrontEnd`NotebookApply[ FrontEnd`InputNotebook[], #, All], FrontEnd`SelectionEvaluate[ FrontEnd`InputNotebook[], All]}]& )}], Cell[ StyleData["EvaluateCell"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, ButtonBoxOptions -> {ButtonFunction :> (FrontEndExecute[{ FrontEnd`NotebookApply[ FrontEnd`InputNotebook[], #, All], FrontEnd`SelectionMove[ FrontEnd`InputNotebook[], All, Cell, 1], FrontEnd`SelectionEvaluateCreateCell[ FrontEnd`InputNotebook[], All]}]& )}], Cell[ StyleData["CopyEvaluate"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, ButtonBoxOptions -> {ButtonFunction :> (FrontEndExecute[{ FrontEnd`SelectionCreateCell[ FrontEnd`InputNotebook[], All], FrontEnd`NotebookApply[ FrontEnd`InputNotebook[], #, All], FrontEnd`SelectionEvaluate[ FrontEnd`InputNotebook[], All]}]& )}], Cell[ StyleData["CopyEvaluateCell"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, ButtonBoxOptions -> {ButtonFunction :> (FrontEndExecute[{ FrontEnd`SelectionCreateCell[ FrontEnd`InputNotebook[], All], FrontEnd`NotebookApply[ FrontEnd`InputNotebook[], #, All], FrontEnd`SelectionEvaluateCreateCell[ FrontEnd`InputNotebook[], All]}]& )}]}, Closed]], Cell[ CellGroupData[{ Cell["Placeholder Styles", "Section"], Cell[ "The cells below define styles useful for making placeholder objects \ in palette templates.", "Text"], Cell[ CellGroupData[{ Cell[ StyleData["Placeholder"], Placeholder -> True, StyleMenuListing -> None, FontSlant -> "Italic", FontColor -> RGBColor[0.890623, 0.864698, 0.384756], TagBoxOptions -> { Editable -> False, Selectable -> False, StripWrapperBoxes -> False}], Cell[ StyleData["Placeholder", "Presentation"]], Cell[ StyleData["Placeholder", "Condensed"]], Cell[ StyleData["Placeholder", "SlideShow"]], Cell[ StyleData["Placeholder", "Printout"]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["PrimaryPlaceholder"], StyleMenuListing -> None, DrawHighlighted -> True, FontSlant -> "Italic", Background -> RGBColor[0.912505, 0.891798, 0.507774], TagBoxOptions -> { Editable -> False, Selectable -> False, StripWrapperBoxes -> False}], Cell[ StyleData["PrimaryPlaceholder", "Presentation"]], Cell[ StyleData["PrimaryPlaceholder", "Condensed"]], Cell[ StyleData["PrimaryPlaceholder", "SlideShow"]], Cell[ StyleData["PrimaryPlaceholder", "Printout"]]}, Closed]]}, Closed]], Cell[ CellGroupData[{ Cell["FormatType Styles", "Section"], Cell[ "The cells below define styles that are mixed in with the styles of \ most cells. If a cell's FormatType matches the name of one of the styles \ defined below, then that style is applied between the cell's style and its \ own options. This is particularly true of Input and Output.", "Text"], Cell[ StyleData["CellExpression"], PageWidth -> Infinity, CellMargins -> {{6, Inherited}, {Inherited, Inherited}}, ShowCellLabel -> False, ShowSpecialCharacters -> False, AllowInlineCells -> False, Hyphenation -> False, AutoItalicWords -> {}, StyleMenuListing -> None, FontFamily -> "Courier", FontSize -> 12, Background -> GrayLevel[1]], Cell[ StyleData["InputForm"], InputAutoReplacements -> {}, AllowInlineCells -> False, Hyphenation -> False, StyleMenuListing -> None, FontFamily -> "Courier"], Cell[ StyleData["OutputForm"], PageWidth -> Infinity, TextAlignment -> Left, LineSpacing -> {0.6, 1}, StyleMenuListing -> None, FontFamily -> "Courier"], Cell[ StyleData["StandardForm"], InputAutoReplacements -> { "->" -> "\[Rule]", ":>" -> "\[RuleDelayed]", "<=" -> "\[LessEqual]", ">=" -> "\[GreaterEqual]", "!=" -> "\[NotEqual]", "==" -> "\[Equal]", Inherited}, "TwoByteSyntaxCharacterAutoReplacement" -> True, LineSpacing -> {1.25, 0}, StyleMenuListing -> None, FontFamily -> "Courier"], Cell[ StyleData["TraditionalForm"], InputAutoReplacements -> { "->" -> "\[Rule]", ":>" -> "\[RuleDelayed]", "<=" -> "\[LessEqual]", ">=" -> "\[GreaterEqual]", "!=" -> "\[NotEqual]", "==" -> "\[Equal]", Inherited}, "TwoByteSyntaxCharacterAutoReplacement" -> True, LineSpacing -> {1.25, 0}, SingleLetterItalics -> True, TraditionalFunctionNotation -> True, DelimiterMatching -> None, StyleMenuListing -> None], Cell[ "The style defined below is mixed in to any cell that is in an \ inline cell within another.", "Text"], Cell[ StyleData["InlineCell"], LanguageCategory -> "Formula", ScriptLevel -> 1, StyleMenuListing -> None], Cell[ StyleData["InlineCellEditing"], StyleMenuListing -> None, Background -> RGBColor[0.964706, 0.929412, 0.839216]]}, Closed]], Cell[ CellGroupData[{ Cell["Automatic Styles", "Section"], Cell[ "The cells below define styles that are used to affect the display \ of certain types of objects in typeset expressions. For example, \ \"UnmatchedBracket\" style defines how unmatched bracket, curly bracket, and \ parenthesis characters are displayed (typically by coloring them to make them \ stand out).", "Text"], Cell[ StyleData["UnmatchedBracket"], StyleMenuListing -> None, FontColor -> RGBColor[0.760006, 0.330007, 0.8]], Cell[ StyleData["Completions"], StyleMenuListing -> None, FontFamily -> "Courier"]}, Closed]], Cell[ CellGroupData[{ Cell["Styles from HelpBrowser", "Section"], Cell[ CellGroupData[{ Cell[ StyleData["MathCaption"], CellFrame -> {{0, 0}, {0, 0.5}}, CellMargins -> {{66, 12}, {2, 24}}, PageBreakBelow -> False, CellFrameMargins -> {{8, 8}, {8, 2}}, CellFrameColor -> GrayLevel[0.700008], CellFrameLabelMargins -> 4, LineSpacing -> {1, 1}, ParagraphSpacing -> {0, 8}, StyleMenuListing -> None, FontColor -> GrayLevel[0.2]], Cell[ StyleData["MathCaption", "Presentation"], FontSize -> 18], Cell[ StyleData["MathCaption", "SlideShow"]], Cell[ StyleData["MathCaption", "Printout"], CellMargins -> {{39, 0}, {0, 14}}, Hyphenation -> True, FontSize -> 9, FontColor -> GrayLevel[0]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["ObjectName"], ShowCellBracket -> True, CellMargins -> {{66, 4}, {8, 8}}, Evaluatable -> True, CellGroupingRules -> "InputGrouping", PageBreakWithin -> False, GroupPageBreakWithin -> False, CellLabelAutoDelete -> False, CellLabelMargins -> {{14, Inherited}, {Inherited, Inherited}}, DefaultFormatType -> DefaultInputFormatType, ShowSpecialCharacters -> Automatic, "TwoByteSyntaxCharacterAutoReplacement" -> True, HyphenationOptions -> { "HyphenationCharacter" -> "\[Continuation]"}, LanguageCategory -> "Mathematica", FormatType -> StandardForm, ShowStringCharacters -> True, NumberMarks -> True, StyleMenuListing -> None, FontWeight -> "Bold"], Cell[ StyleData["ObjectName", "Presentation"], FontSize -> 18], Cell[ StyleData["ObjectName", "SlideShow"]], Cell[ StyleData["ObjectName", "Printout"], ShowCellBracket -> False, CellMargins -> {{39, 0}, {6, 6}}, FontSize -> 9]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Usage"], ShowCellBracket -> True, CellMargins -> {{66, 4}, {8, 8}}, Evaluatable -> True, CellGroupingRules -> "InputGrouping", PageBreakWithin -> False, GroupPageBreakWithin -> False, CellLabelAutoDelete -> False, CellLabelMargins -> {{14, Inherited}, {Inherited, Inherited}}, DefaultFormatType -> DefaultInputFormatType, ShowSpecialCharacters -> Automatic, "TwoByteSyntaxCharacterAutoReplacement" -> True, HyphenationOptions -> { "HyphenationCharacter" -> "\[Continuation]"}, LanguageCategory -> "Mathematica", FormatType -> StandardForm, ShowStringCharacters -> True, NumberMarks -> True, StyleMenuListing -> None, FontWeight -> "Bold"], Cell[ StyleData["Usage", "Presentation"], FontSize -> 18], Cell[ StyleData["Usage", "SlideShow"]], Cell[ StyleData["Usage", "Printout"], ShowCellBracket -> False, CellMargins -> {{39, 0}, {6, 6}}, FontSize -> 9]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Notes"], ShowCellBracket -> True, CellMargins -> {{66, 4}, {8, 8}}, Evaluatable -> True, CellGroupingRules -> "InputGrouping", PageBreakWithin -> False, GroupPageBreakWithin -> False, CellLabelAutoDelete -> False, CellLabelMargins -> {{14, Inherited}, {Inherited, Inherited}}, DefaultFormatType -> DefaultInputFormatType, ShowSpecialCharacters -> Automatic, "TwoByteSyntaxCharacterAutoReplacement" -> True, HyphenationOptions -> { "HyphenationCharacter" -> "\[Continuation]"}, LanguageCategory -> "Mathematica", FormatType -> StandardForm, ShowStringCharacters -> True, NumberMarks -> True, StyleMenuListing -> None, FontWeight -> "Bold"], Cell[ StyleData["Notes", "Presentation"], FontSize -> 18], Cell[ StyleData["Notes", "SlideShow"]], Cell[ StyleData["Notes", "Printout"], ShowCellBracket -> False, CellMargins -> {{39, 0}, {6, 6}}, FontSize -> 9]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["InlineOutput"], ShowCellBracket -> True, CellMargins -> {{66, 4}, {8, 8}}, Evaluatable -> True, CellGroupingRules -> "InputGrouping", PageBreakWithin -> False, GroupPageBreakWithin -> False, CellLabelAutoDelete -> False, CellLabelMargins -> {{14, Inherited}, {Inherited, Inherited}}, DefaultFormatType -> DefaultInputFormatType, ShowSpecialCharacters -> Automatic, "TwoByteSyntaxCharacterAutoReplacement" -> True, HyphenationOptions -> { "HyphenationCharacter" -> "\[Continuation]"}, LanguageCategory -> "Mathematica", FormatType -> StandardForm, ShowStringCharacters -> True, NumberMarks -> True, StyleMenuListing -> None, FontWeight -> "Bold"], Cell[ StyleData["InlineOutput", "Presentation"], FontSize -> 18], Cell[ StyleData["InlineOutput", "SlideShow"]], Cell[ StyleData["InlineOutput", "Printout"], ShowCellBracket -> False, CellMargins -> {{39, 0}, {6, 6}}, FontSize -> 9]}, Closed]], Cell[ CellGroupData[{ Cell["Emphasis Boxes and Pictures", "Subsection"], Cell[ CellGroupData[{ Cell[ StyleData["Box"], CellFrame -> 0.5, CellMargins -> {{27, 12}, {0, 8}}, CellHorizontalScrolling -> True, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], StyleMenuListing -> None, Background -> RGBColor[0.964706, 0.929412, 0.839216], FrameBoxOptions -> { BoxFrame -> 0.5, FrameMargins -> {{True, True}, {True, True}}}, GridBoxOptions -> {GridBoxSpacings -> {"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}}], Cell[ StyleData["Box", "Presentation"], FontSize -> 18], Cell[ StyleData["Box", "SlideShow"]], Cell[ StyleData["Box", "Printout"], CellMargins -> {{2, 0}, {0, 8}}, FontSize -> 10, Background -> GrayLevel[0.900008]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["DoubleBox"], CellFrame -> 0.5, CellMargins -> {{27, 12}, {0, 8}}, CellHorizontalScrolling -> True, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], StyleMenuListing -> None, Background -> RGBColor[0.964706, 0.929412, 0.839216], FrameBoxOptions -> { BoxFrame -> 0.5, FrameMargins -> {{True, True}, {True, True}}}, GridBoxOptions -> { GridBoxAlignment -> { "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Top}}, "RowsIndexed" -> {}}, GridBoxSpacings -> {"Columns" -> { Offset[0.27999999999999997`], { Offset[1.4]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}}], Cell[ StyleData["DoubleBox", "Presentation"], FontSize -> 18], Cell[ StyleData["DoubleBox", "SlideShow"]], Cell[ StyleData["DoubleBox", "Printout"], CellMargins -> {{2, 0}, {0, 8}}, FontSize -> 10, Background -> GrayLevel[0.900008]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["1ColumnBox"], CellFrame -> 0.5, CellMargins -> {{27, 12}, {0, 8}}, CellHorizontalScrolling -> True, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], LineIndent -> 0, StyleMenuListing -> None, Background -> RGBColor[0.964706, 0.929412, 0.839216], FrameBoxOptions -> { BoxFrame -> 0.5, FrameMargins -> {{True, True}, {True, True}}}, GridBoxOptions -> {GridBoxSpacings -> {"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}}], Cell[ StyleData["1ColumnBox", "Presentation"], FontSize -> 18], Cell[ StyleData["1ColumnBox", "SlideShow"]], Cell[ StyleData["1ColumnBox", "Printout"], CellMargins -> {{2, 0}, {0, 8}}, FontSize -> 10, Background -> GrayLevel[0.900008]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["2ColumnBox"], CellFrame -> 0.5, CellMargins -> {{27, 12}, {0, 8}}, CellHorizontalScrolling -> True, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], SingleLetterItalics -> False, LineIndent -> 0, StyleMenuListing -> None, Background -> RGBColor[0.964706, 0.929412, 0.839216], FrameBoxOptions -> { BoxFrame -> 0.5, FrameMargins -> {{True, True}, {True, True}}}, GridBoxOptions -> {GridBoxItemSize -> {"Columns" -> { Scaled[0.31], { Scaled[0.67]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}}], Cell[ StyleData["2ColumnBox", "Presentation"], FontSize -> 18], Cell[ StyleData["2ColumnBox", "SlideShow"]], Cell[ StyleData["2ColumnBox", "Printout"], CellMargins -> {{2, 0}, {0, 8}}, FontSize -> 9, Background -> GrayLevel[0.900008]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["2ColumnEvenBox"], CellFrame -> 0.5, CellMargins -> {{27, 12}, {0, 8}}, CellHorizontalScrolling -> True, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], LineIndent -> 0, StyleMenuListing -> None, Background -> RGBColor[0.964706, 0.929412, 0.839216], FrameBoxOptions -> { BoxFrame -> 0.5, FrameMargins -> {{True, True}, {True, True}}}, GridBoxOptions -> {GridBoxItemSize -> {"Columns" -> {{ Scaled[0.46]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}}], Cell[ StyleData["2ColumnEvenBox", "Presentation"], FontSize -> 18], Cell[ StyleData["2ColumnEvenBox", "SlideShow"]], Cell[ StyleData["2ColumnEvenBox", "Printout"], CellMargins -> {{2, 0}, {0, 8}}, FontSize -> 10, Background -> GrayLevel[0.900008]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["2ColumnSmallBox"], CellFrame -> 0.5, CellMargins -> {{27, 12}, {0, 8}}, CellHorizontalScrolling -> True, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], LineIndent -> 0, StyleMenuListing -> None, Background -> RGBColor[0.964706, 0.929412, 0.839216], FrameBoxOptions -> { BoxFrame -> 0.5, FrameMargins -> {{True, True}, {True, True}}}, GridBoxOptions -> { GridBoxAlignment -> { "Columns" -> {Right, {Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize -> {"Columns" -> {{ Scaled[0.35]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings -> {"Columns" -> { Offset[0.27999999999999997`], { Offset[1.0499999999999998`]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}}], Cell[ StyleData["2ColumnSmallBox", "Presentation"], FontSize -> 18], Cell[ StyleData["2ColumnSmallBox", "SlideShow"]], Cell[ StyleData["2ColumnSmallBox", "Printout"], CellMargins -> {{2, 0}, {0, 8}}, FontSize -> 10, Background -> GrayLevel[0.900008]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["3ColumnBox"], CellFrame -> 0.5, CellMargins -> {{27, 12}, {0, 8}}, CellHorizontalScrolling -> True, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], LineIndent -> 0, StyleMenuListing -> None, Background -> RGBColor[0.964706, 0.929412, 0.839216], FrameBoxOptions -> { BoxFrame -> 0.5, FrameMargins -> {{True, True}, {True, True}}}, GridBoxOptions -> {GridBoxItemSize -> {"Columns" -> {{ Scaled[0.32]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}}], Cell[ StyleData["3ColumnBox", "Presentation"], FontSize -> 18], Cell[ StyleData["3ColumnBox", "SlideShow"]], Cell[ StyleData["3ColumnBox", "Printout"], CellMargins -> {{2, 0}, {0, 8}}, FontSize -> 10, Background -> GrayLevel[0.900008]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["3ColumnSmallBox"], CellFrame -> 0.5, CellMargins -> {{27, 12}, {0, 8}}, CellHorizontalScrolling -> True, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], LineIndent -> 0, StyleMenuListing -> None, Background -> RGBColor[0.964706, 0.929412, 0.839216], FrameBoxOptions -> { BoxFrame -> 0.5, FrameMargins -> {{True, True}, {True, True}}}, GridBoxOptions -> { GridBoxAlignment -> { "Columns" -> {Right, Center, {Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize -> {"Columns" -> {{ Scaled[0.24]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings -> {"Columns" -> { Offset[0.27999999999999997`], { Offset[1.0499999999999998`]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}}], Cell[ StyleData["3ColumnSmallBox", "Presentation"], FontSize -> 18], Cell[ StyleData["3ColumnSmallBox", "SlideShow"]], Cell[ StyleData["3ColumnSmallBox", "Printout"], CellMargins -> {{2, 0}, {0, 8}}, FontSize -> 10, Background -> GrayLevel[0.900008]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["4ColumnBox"], CellFrame -> 0.5, CellMargins -> {{27, 12}, {0, 8}}, CellHorizontalScrolling -> True, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], SingleLetterItalics -> False, LineIndent -> 0, StyleMenuListing -> None, Background -> RGBColor[0.964706, 0.929412, 0.839216], FrameBoxOptions -> { BoxFrame -> 0.5, FrameMargins -> {{True, True}, {True, True}}}, GridBoxOptions -> {GridBoxItemSize -> {"Columns" -> { Scaled[0.13], Scaled[0.35], Scaled[0.13], { Scaled[0.35]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}}], Cell[ StyleData["4ColumnBox", "Presentation"], FontSize -> 18], Cell[ StyleData["4ColumnBox", "SlideShow"]], Cell[ StyleData["4ColumnBox", "Printout"], CellMargins -> {{2, 0}, {0, 8}}, FontSize -> 10, Background -> GrayLevel[0.900008]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["5ColumnBox"], CellFrame -> 0.5, CellMargins -> {{27, 12}, {0, 8}}, CellHorizontalScrolling -> True, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], LineIndent -> 0, StyleMenuListing -> None, Background -> RGBColor[0.964706, 0.929412, 0.839216], FrameBoxOptions -> { BoxFrame -> 0.5, FrameMargins -> {{True, True}, {True, True}}}, GridBoxOptions -> {GridBoxItemSize -> {"Columns" -> {{ Scaled[0.202]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}}], Cell[ StyleData["5ColumnBox", "Presentation"], FontSize -> 18], Cell[ StyleData["5ColumnBox", "SlideShow"]], Cell[ StyleData["5ColumnBox", "Printout"], CellMargins -> {{2, 0}, {0, 8}}, FontSize -> 9, Background -> GrayLevel[0.900008]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["6ColumnBox"], CellFrame -> 0.5, CellMargins -> {{27, 12}, {0, 8}}, CellHorizontalScrolling -> True, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], LineIndent -> 0, StyleMenuListing -> None, Background -> RGBColor[0.964706, 0.929412, 0.839216], FrameBoxOptions -> { BoxFrame -> 0.5, FrameMargins -> {{True, True}, {True, True}}}, GridBoxOptions -> {GridBoxItemSize -> {"Columns" -> { Scaled[0.12], Scaled[0.22], Scaled[0.12], Scaled[0.12], Scaled[0.22], { Scaled[0.12]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}}], Cell[ StyleData["6ColumnBox", "Presentation"], FontSize -> 18], Cell[ StyleData["6ColumnBox", "SlideShow"]], Cell[ StyleData["6ColumnBox", "Printout"], CellMargins -> {{2, 0}, {0, 8}}, FontSize -> 10, Background -> GrayLevel[0.900008]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["FramedBox"], CellFrame -> 0.5, CellMargins -> {{27, 12}, {0, 8}}, CellHorizontalScrolling -> True, PageBreakWithin -> False, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], AutoIndent -> False, AutoSpacing -> False, LineIndent -> 0, StyleMenuListing -> None, FontWeight -> "Plain", Background -> RGBColor[0.964706, 0.929412, 0.839216], GridBoxOptions -> { GridBoxAlignment -> { "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxSpacings -> {"Columns" -> { Offset[0.27999999999999997`], { Offset[0.5599999999999999]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.6]}, Offset[0.2]}, "RowsIndexed" -> {}}}], Cell[ StyleData["FramedBox", "Presentation"], FontSize -> 18], Cell[ StyleData["FramedBox", "SlideShow"]], Cell[ StyleData["FramedBox", "Printout"], CellMargins -> {{2, 4}, {0, 8}}, FontSize -> 10, Background -> GrayLevel[1]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["DefinitionBox"], CellFrame -> 0.5, CellMargins -> {{27, 12}, {0, 8}}, CellHorizontalScrolling -> True, PageBreakWithin -> False, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], AutoIndent -> False, AutoSpacing -> False, LineIndent -> 0, StyleMenuListing -> None, FontWeight -> "Plain", Background -> RGBColor[0.964706, 0.929412, 0.839216], GridBoxOptions -> { GridBoxAlignment -> { "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize -> {"Columns" -> { Scaled[0.4], { Scaled[0.6]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings -> {"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.6]}, Offset[0.2]}, "RowsIndexed" -> {}}}], Cell[ StyleData["DefinitionBox", "Presentation"], FontSize -> 18], Cell[ StyleData["DefinitionBox", "SlideShow"]], Cell[ StyleData["DefinitionBox", "Printout"], CellMargins -> {{2, 4}, {0, 8}}, FontSize -> 10, Background -> GrayLevel[1]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["DefinitionBox3Col"], CellFrame -> 0.5, CellMargins -> {{27, 12}, {0, 8}}, CellHorizontalScrolling -> True, PageBreakWithin -> False, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], AutoIndent -> False, AutoSpacing -> False, LineIndent -> 0, StyleMenuListing -> None, FontWeight -> "Plain", Background -> RGBColor[0.964706, 0.929412, 0.839216], GridBoxOptions -> { GridBoxAlignment -> { "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize -> {"Columns" -> { Scaled[0.35], Scaled[0.2], { Scaled[0.45]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings -> {"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.6]}, Offset[0.2]}, "RowsIndexed" -> {}}}], Cell[ StyleData["DefinitionBox3Col", "Presentation"], FontSize -> 18], Cell[ StyleData["DefinitionBox3Col", "SlideShow"]], Cell[ StyleData["DefinitionBox3Col", "Printout"], CellMargins -> {{2, 4}, {0, 8}}, FontSize -> 10, Background -> GrayLevel[1]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["DefinitionBox4Col"], CellFrame -> 0.5, CellMargins -> {{27, 12}, {0, 8}}, CellHorizontalScrolling -> True, PageBreakWithin -> False, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], AutoIndent -> False, AutoSpacing -> False, LineIndent -> 0, StyleMenuListing -> None, FontWeight -> "Plain", Background -> RGBColor[0.964706, 0.929412, 0.839216], GridBoxOptions -> { GridBoxAlignment -> { "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize -> {"Columns" -> { Scaled[0.15], Scaled[0.35], Scaled[0.15], { Scaled[0.35]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings -> {"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.6]}, Offset[0.2]}, "RowsIndexed" -> {}}}], Cell[ StyleData["DefinitionBox4Col", "Presentation"], FontSize -> 18], Cell[ StyleData["DefinitionBox4Col", "SlideShow"]], Cell[ StyleData["DefinitionBox4Col", "Printout"], CellMargins -> {{2, 4}, {0, 8}}, FontSize -> 10, Background -> GrayLevel[1]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["DefinitionBox5Col"], CellFrame -> 0.5, CellMargins -> {{27, 12}, {0, 8}}, CellHorizontalScrolling -> True, PageBreakWithin -> False, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], AutoIndent -> False, AutoSpacing -> False, LineIndent -> 0, StyleMenuListing -> None, FontWeight -> "Plain", Background -> RGBColor[0.964706, 0.929412, 0.839216], GridBoxOptions -> { GridBoxAlignment -> { "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize -> {"Columns" -> {{ Scaled[0.2]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings -> {"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.6]}, Offset[0.2]}, "RowsIndexed" -> {}}}], Cell[ StyleData["DefinitionBox5Col", "Presentation"], FontSize -> 18], Cell[ StyleData["DefinitionBox5Col", "SlideShow"]], Cell[ StyleData["DefinitionBox5Col", "Printout"], CellMargins -> {{2, 4}, {0, 8}}, FontSize -> 10, Background -> GrayLevel[1]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["DefinitionBox6Col"], CellFrame -> 0.5, CellMargins -> {{27, 12}, {0, 8}}, CellHorizontalScrolling -> True, PageBreakWithin -> False, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], AutoIndent -> False, AutoSpacing -> False, LineIndent -> 0, StyleMenuListing -> None, FontWeight -> "Plain", Background -> RGBColor[0.964706, 0.929412, 0.839216], GridBoxOptions -> { GridBoxAlignment -> { "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize -> {"Columns" -> { Scaled[0.13], Scaled[0.24], Scaled[0.13], Scaled[0.13], Scaled[0.24], { Scaled[0.13]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings -> {"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.6]}, Offset[0.2]}, "RowsIndexed" -> {}}}], Cell[ StyleData["DefinitionBox6Col", "Presentation"], FontSize -> 18], Cell[ StyleData["DefinitionBox6Col", "SlideShow"]], Cell[ StyleData["DefinitionBox6Col", "Printout"], CellMargins -> {{2, 4}, {0, 8}}, FontSize -> 10, Background -> GrayLevel[1]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["TopBox"], CellFrame -> {{0.5, 0.5}, {0, 0.5}}, CellMargins -> {{27, 12}, {0, 8}}, CellHorizontalScrolling -> True, PageBreakBelow -> False, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], AutoIndent -> False, AutoSpacing -> False, LineIndent -> 0, StyleMenuListing -> None, FontWeight -> "Plain", Background -> RGBColor[0.964706, 0.929412, 0.839216], GridBoxOptions -> { GridBoxAlignment -> { "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize -> {"Columns" -> { Scaled[0.31], { Scaled[0.62]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings -> {"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.6]}, Offset[0.2]}, "RowsIndexed" -> {}}}], Cell[ StyleData["TopBox", "Presentation"], FontSize -> 18], Cell[ StyleData["TopBox", "SlideShow"]], Cell[ StyleData["TopBox", "Printout"], CellMargins -> {{2, 0}, {0, 8}}, Background -> GrayLevel[1]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["MiddleBox"], CellFrame -> {{0.5, 0.5}, {0, 0}}, CellMargins -> {{27, 12}, {0, -7}}, CellHorizontalScrolling -> True, PageBreakAbove -> False, PageBreakBelow -> False, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], AutoIndent -> False, AutoSpacing -> False, LineIndent -> 0, StyleMenuListing -> None, FontWeight -> "Plain", Background -> RGBColor[0.964706, 0.929412, 0.839216], GridBoxOptions -> { GridBoxAlignment -> { "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize -> {"Columns" -> { Scaled[0.31], { Scaled[0.62]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings -> {"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.6]}, Offset[0.2]}, "RowsIndexed" -> {}}}], Cell[ StyleData["MiddleBox", "Presentation"], FontSize -> 18], Cell[ StyleData["MiddleBox", "SlideShow"]], Cell[ StyleData["MiddleBox", "Printout"], CellMargins -> {{2, 0}, {0, 2}}, Background -> GrayLevel[1]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["BottomBox"], CellFrame -> {{0.5, 0.5}, {0.5, 0}}, CellMargins -> {{27, 12}, {0, -7}}, CellHorizontalScrolling -> True, PageBreakAbove -> False, PageBreakBelow -> False, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], AutoIndent -> False, AutoSpacing -> False, LineIndent -> 0, StyleMenuListing -> None, FontWeight -> "Plain", Background -> RGBColor[0.964706, 0.929412, 0.839216], GridBoxOptions -> { GridBoxAlignment -> { "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize -> {"Columns" -> { Scaled[0.31], { Scaled[0.62]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings -> {"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.6]}, Offset[0.2]}, "RowsIndexed" -> {}}}], Cell[ StyleData["BottomBox", "Presentation"], FontSize -> 18], Cell[ StyleData["BottomBox", "SlideShow"]], Cell[ StyleData["BottomBox", "Printout"], CellMargins -> {{2, 0}, {0, -5}}, FontSize -> 10, Background -> GrayLevel[1], GridBoxOptions -> { GridBoxItemSize -> { "Columns" -> {{All}}, "ColumnsIndexed" -> {}, "Rows" -> {{2.2}}, "RowsIndexed" -> {}}}]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["TopSpanBox"], CellFrame -> {{0.5, 0.5}, {0, 0.5}}, CellMargins -> {{27, 12}, {-2, 8}}, CellHorizontalScrolling -> True, PageBreakBelow -> False, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], AutoIndent -> False, AutoSpacing -> False, LineIndent -> 0, StyleMenuListing -> None, FontWeight -> "Plain", Background -> RGBColor[0.964706, 0.929412, 0.839216], GridBoxOptions -> { GridBoxAlignment -> { "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize -> {"Columns" -> { Scaled[0.9], { Scaled[0.03]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings -> {"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.6]}, Offset[0.2]}, "RowsIndexed" -> {}}}], Cell[ StyleData["TopSpanBox", "Presentation"], FontSize -> 18], Cell[ StyleData["TopSpanBox", "SlideShow"]], Cell[ StyleData["TopSpanBox", "Printout"], CellMargins -> {{2, 0}, {-2, 8}}, FontSize -> 10, Background -> GrayLevel[1]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["MiddleSpanBox"], CellFrame -> {{0.5, 0.5}, {0, 0}}, CellMargins -> {{27, 12}, {0, 0}}, CellHorizontalScrolling -> True, PageBreakAbove -> False, PageBreakBelow -> False, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], AutoIndent -> False, AutoSpacing -> False, LineIndent -> 0, StyleMenuListing -> None, FontWeight -> "Plain", Background -> RGBColor[0.964706, 0.929412, 0.839216], GridBoxOptions -> { GridBoxAlignment -> { "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize -> {"Columns" -> { Scaled[0.9], { Scaled[0.03]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings -> {"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.6]}, Offset[0.2]}, "RowsIndexed" -> {}}}], Cell[ StyleData["MiddleSpanBox", "Presentation"], FontSize -> 18], Cell[ StyleData["MiddleSpanBox", "SlideShow"]], Cell[ StyleData["MiddleSpanBox", "Printout"], CellMargins -> {{2, 0}, {-5, 0}}, FontSize -> 10, Background -> GrayLevel[1], GridBoxOptions -> { GridBoxItemSize -> { "Columns" -> {{All}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.8}}, "RowsIndexed" -> {}}}]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Picture"], CellMargins -> {{27, Inherited}, {4, 4}}, CellGroupingRules -> "GraphicsGrouping", CellHorizontalScrolling -> True, StyleMenuListing -> None], Cell[ StyleData["Picture", "Presentation"], FontSize -> 18], Cell[ StyleData["Picture", "SlideShow"]], Cell[ StyleData["Picture", "Printout"], CellMargins -> {{2, Inherited}, {4, 4}}, Magnification -> 0.65]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["OpenCloseItemizedPicture"], CellMargins -> {{88, 4}, {4, 4}}, CellGroupingRules -> "GraphicsGrouping", CellHorizontalScrolling -> True, StyleMenuListing -> None, PrivateCellOptions -> {"DefaultCellGroupOpen" -> False}], Cell[ StyleData["OpenCloseItemizedPicture", "Presentation"], FontSize -> 18], Cell[ StyleData["OpenCloseItemizedPicture", "SlideShow"]], Cell[ StyleData["OpenCloseItemizedPicture", "Printout"], CellMargins -> {{76, 2}, {0, 0}}, CellElementSpacings -> { "CellMinHeight" -> 1, "ClosedCellHeight" -> 0}, CellOpen -> False]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["ItemizedPicture"], CellMargins -> {{88, 4}, {4, 4}}, CellGroupingRules -> "GraphicsGrouping", CellHorizontalScrolling -> True, StyleMenuListing -> None], Cell[ StyleData["ItemizedPicture", "Presentation"], FontSize -> 18], Cell[ StyleData["ItemizedPicture", "SlideShow"]], Cell[ StyleData["ItemizedPicture", "Printout"], CellMargins -> {{77, 2}, {4, -4}}, Magnification -> 0.5]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["ListGraphic"], CellMargins -> {{88, 4}, {4, 4}}, CellGroupingRules -> "GraphicsGrouping", CellHorizontalScrolling -> True, StyleMenuListing -> None], Cell[ StyleData["ListGraphic", "Presentation"], FontSize -> 18], Cell[ StyleData["ListGraphic", "SlideShow"]], Cell[ StyleData["ListGraphic", "Printout"], CellMargins -> {{77, 2}, {4, -4}}, Magnification -> 0.5]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["ListNoteBox"], CellFrame -> 0.5, CellMargins -> {{88, 12}, {8, 8}}, CellHorizontalScrolling -> True, CellFrameColor -> RGBColor[0.74902, 0.694118, 0.552941], LineIndent -> 0, StyleMenuListing -> None, Background -> RGBColor[0.964706, 0.929412, 0.839216], FrameBoxOptions -> { FrameMargins -> {{15.600000000000001`, 15.600000000000001`}, {11.700000000000001`, 11.700000000000001`}}}, GridBoxOptions -> {GridBoxSpacings -> {"Columns" -> { Offset[0.27999999999999997`], { Offset[0.7]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}}], Cell[ StyleData["ListNoteBox", "Presentation"], FontSize -> 18], Cell[ StyleData["ListNoteBox", "SlideShow"]], Cell[ StyleData["ListNoteBox", "Printout"], CellMargins -> {{77, 4}, {6, 2}}, FontSize -> 10, Background -> GrayLevel[0.900008]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["PictureGroup"], CellMargins -> {{41, 4}, {0, 4}}, CellGroupingRules -> "GraphicsGrouping", CellHorizontalScrolling -> True, StyleMenuListing -> None], Cell[ StyleData["PictureGroup", "Presentation"], FontSize -> 18], Cell[ StyleData["PictureGroup", "SlideShow"]], Cell[ StyleData["PictureGroup", "Printout"], CellMargins -> {{76, 2}, {0, 0}}, CellElementSpacings -> { "CellMinHeight" -> 1, "ClosedCellHeight" -> 0}, CellOpen -> False]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["Sound"], ShowCellBracket -> True, CellMargins -> {{27, Inherited}, {0, 8}}, StyleMenuListing -> None], Cell[ StyleData["Sound", "Presentation"], FontSize -> 18], Cell[ StyleData["Sound", "SlideShow"]], Cell[ StyleData["Sound", "Printout"], CellMargins -> {{2, 0}, {0, 8}}, FontSize -> 10]}, Closed]]}, Closed]], Cell[ CellGroupData[{ Cell["Tables", "Subsection"], Cell[ CellGroupData[{ Cell[ StyleData["2ColumnTable"], CellMargins -> {{35, 4}, {0, 8}}, CellHorizontalScrolling -> True, LineIndent -> 0, StyleMenuListing -> None, GridBoxOptions -> { GridBoxAlignment -> { "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize -> {"Columns" -> { Scaled[0.34], { Scaled[0.64]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}}], Cell[ StyleData["2ColumnTable", "Presentation"], FontSize -> 18], Cell[ StyleData["2ColumnTable", "SlideShow"]], Cell[ StyleData["2ColumnTable", "Printout"], CellMargins -> {{2, 0}, {0, 8}}, FontSize -> 9]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["2ColumnEvenTable"], CellMargins -> {{35, 4}, {0, 8}}, CellHorizontalScrolling -> True, LineIndent -> 0, StyleMenuListing -> None, GridBoxOptions -> { GridBoxAlignment -> { "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize -> {"Columns" -> {{ Scaled[0.49]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}}], Cell[ StyleData["2ColumnEvenTable", "Presentation"], FontSize -> 18], Cell[ StyleData["2ColumnEvenTable", "SlideShow"]], Cell[ StyleData["2ColumnEvenTable", "Printout"], CellMargins -> {{2, 0}, {0, 8}}, FontSize -> 9]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["3ColumnTable"], CellMargins -> {{35, 4}, {0, 8}}, CellHorizontalScrolling -> True, LineIndent -> 0, StyleMenuListing -> None, GridBoxOptions -> { GridBoxAlignment -> { "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize -> {"Columns" -> { Scaled[0.28], Scaled[0.28], { Scaled[0.43]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}}], Cell[ StyleData["3ColumnTable", "Presentation"], FontSize -> 18], Cell[ StyleData["3ColumnTable", "SlideShow"]], Cell[ StyleData["3ColumnTable", "Printout"], CellMargins -> {{2, 0}, {0, 8}}, FontSize -> 9]}, Closed]]}, Closed]]}, Closed]], Cell[ CellGroupData[{ Cell["Slide Show Styles", "Section"], Cell[ CellGroupData[{ Cell[ StyleData["SlideShowNavigationBar"], Editable -> False, CellFrame -> True, CellMargins -> {{0, 0}, {3, 3}}, CellElementSpacings -> {"CellMinHeight" -> 0.8125}, CellGroupingRules -> {"SectionGrouping", 30}, CellFrameMargins -> False, CellFrameColor -> GrayLevel[1], CellFrameLabelMargins -> False, TextAlignment -> Center, CounterIncrements -> "SlideShowNavigationBar", StyleMenuListing -> None, FontSize -> 10, Magnification -> 1, Background -> GrayLevel[0.8], GridBoxOptions -> { BaselinePosition -> Center, GridBoxAlignment -> { "Columns" -> { Center, Center, Center, Center, Center, Center, Right, { Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize -> { "Columns" -> {3.5, 3.5, 3.5, 3.5, 13, 5, {4}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings -> {"Columns" -> { Offset[0.27999999999999997`], { Offset[0.]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.]}, Offset[0.2]}, "RowsIndexed" -> {}}}], Cell[ StyleData["SlideShowNavigationBar", "Presentation"]], Cell[ StyleData["SlideShowNavigationBar", "SlideShow"], Deletable -> False, ShowCellBracket -> False, CellMargins -> {{-1, -1}, {-1, -1}}, PageBreakAbove -> True, CellFrameMargins -> {{1, 1}, {0, 0}}], Cell[ StyleData["SlideShowNavigationBar", "Printout"], CellMargins -> {{18, 4}, {4, 4}}, LineSpacing -> {1, 3}, FontSize -> 10]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["SlideShowSection"], CellFrame -> {{0, 0}, {0, 0.5}}, CellMargins -> {{0, 0}, {10, 0}}, CellGroupingRules -> {"SectionGrouping", 40}, PageBreakBelow -> False, CellFrameMargins -> {{12, 4}, {6, 12}}, InputAutoReplacements -> {"TeX" -> StyleBox[ RowBox[{"T", AdjustmentBox[ "E", BoxMargins -> {{-0.075, -0.085}, {0, 0}}, BoxBaselineShift -> 0.5], "X"}]], "LaTeX" -> StyleBox[ RowBox[{"L", StyleBox[ AdjustmentBox[ "A", BoxMargins -> {{-0.36, -0.1}, {0, 0}}, BoxBaselineShift -> -0.2], FontSize -> Smaller], "T", AdjustmentBox[ "E", BoxMargins -> {{-0.075, -0.085}, {0, 0}}, BoxBaselineShift -> 0.5], "X"}]], "mma" -> "Mathematica", "Mma" -> "Mathematica", "MMA" -> "Mathematica", "gridMathematica" -> FormBox[ RowBox[{"grid", AdjustmentBox[ StyleBox["Mathematica", FontSlant -> "Italic"], BoxMargins -> {{-0.175, 0}, {0, 0}}]}], TextForm], "webMathematica" -> FormBox[ RowBox[{"web", AdjustmentBox[ StyleBox["Mathematica", FontSlant -> "Italic"], BoxMargins -> {{-0.175, 0}, {0, 0}}]}], TextForm], Inherited}, CounterIncrements -> "Section", CounterAssignments -> {{"Subsection", 0}, {"Subsubsection", 0}}, StyleMenuListing -> None, FontFamily -> "Helvetica", FontSize -> 18, FontWeight -> "Plain", FontColor -> GrayLevel[1], Background -> RGBColor[0.408011, 0.440726, 0.8]], Cell[ StyleData["SlideShowSection", "Presentation"], CellFrameMargins -> {{20, 10}, {10, 18}}, FontSize -> 27], Cell[ StyleData["SlideShowSection", "SlideShow"], ShowCellBracket -> False, PageBreakAbove -> True], Cell[ StyleData["SlideShowSection", "Printout"], CellMargins -> {{18, 30}, {0, 30}}, CellFrameMargins -> 5, FontSize -> 14]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["SlideHyperlink"], StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, FontSize -> 26, FontColor -> GrayLevel[0.400015], ButtonBoxOptions -> { Active -> True, ButtonFunction :> (FrontEndExecute[{ FrontEnd`NotebookLocate[#2]}]& ), ButtonMargins -> 0.5, ButtonMinHeight -> 0.85, ButtonNote -> None}], Cell[ StyleData["SlideHyperlink", "Presentation"], CellMargins -> {{14, 10}, {6, 12}}, FontSize -> 36], Cell[ StyleData["SlideHyperlink", "SlideShow"]], Cell[ StyleData["SlideHyperlink", "Printout"], FontSize -> 10, FontVariations -> {"Underline" -> False}, FontColor -> GrayLevel[0]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["SlideTOCLink"], CellMargins -> {{24, Inherited}, {Inherited, Inherited}}, StyleMenuListing -> None, ButtonStyleMenuListing -> Automatic, FontFamily -> "Helvetica", ButtonBoxOptions -> { Active -> True, ButtonFunction :> (FrontEndExecute[{ FrontEnd`NotebookLocate[#2]}]& ), ButtonMargins -> 1.5, ButtonNote -> ButtonData}], Cell[ StyleData["SlideTOCLink", "Presentation"], CellMargins -> {{35, 10}, {8, 8}}, FontSize -> 18], Cell[ StyleData["SlideTOCLink", "SlideShow"]], Cell[ StyleData["SlideTOCLink", "Printout"], FontVariations -> {"Underline" -> False}, FontColor -> GrayLevel[0]]}, Closed]], Cell[ CellGroupData[{ Cell[ StyleData["SlideTOC"], CellDingbat -> "\[Bullet]", CellMargins -> {{18, Inherited}, {Inherited, Inherited}}, StyleMenuListing -> None, FontFamily -> "Helvetica"], Cell[ StyleData["SlideTOC", "Presentation"], CellMargins -> {{25, 10}, {10, 5}}, FontSize -> 18], Cell[ StyleData["SlideTOC", "SlideShow"], FontSize -> 14], Cell[ StyleData["SlideTOC", "Printout"], FontSize -> 10, FontColor -> GrayLevel[0]]}, Closed]]}, Closed]]}, Open]]}, Visible -> False, FrontEndVersion -> "10.0 for Mac OS X x86 (32-bit, 64-bit Kernel) (June 27, 2014)", StyleDefinitions -> "Default.nb"], PrivateNotebookOptions -> {"ColorPalette" -> {RGBColor, -1}}, RenderingOptions -> {"ObjectDithering" -> True}, RenderingOptions -> {"RasterDithering" -> False} ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{ "buttoncell"->{ Cell[6033, 164, 18432, 337, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{ "buttoncell", "corecell", "notopen", "differentacrossnotebooks"}], Cell[24468, 503, 3314, 89, 41, "Output", CellOpen->True, CellTags->{ "buttoncell", "corecell", "notopen", "differentacrossnotebooks"}], Cell[36995, 846, 19720, 394, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{ "buttoncell", "corecell", "differentacrossnotebooks", "notopen"}], Cell[56718, 1242, 14419, 370, 129, "Print", Evaluatable->False, CellOpen->True, CellTags->{ "buttoncell", "corecell", "differentacrossnotebooks", "notopen"}], Cell[93857, 2169, 16144, 301, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{"buttoncell", "corecell", "notopen"}], Cell[110004, 2472, 6327, 175, 102, "Output", Evaluatable->False, CellOpen->True, CellTags->{"buttoncell", "corecell", "notopen"}], Cell[117347, 2676, 15146, 282, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{"buttoncell", "corecell", "notopen"}], Cell[132496, 2960, 4402, 119, 40, "Output", Evaluatable->False, CellOpen->True, CellTags->{"buttoncell", "corecell", "notopen"}], Cell[228024, 5269, 19951, 357, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{ "buttoncell", "corecell", "differentacrossnotebooks", "notopen"}], Cell[247978, 5628, 4886, 109, 41, "Output", CellOpen->True, CellTags->{ "buttoncell", "corecell", "differentacrossnotebooks", "notopen"}], Cell[805877, 17361, 2167, 45, 351, "Text", Evaluatable->False, CellTags->{"finalcell", "buttoncell", "opengroup"}]}, "corecell"->{ Cell[4109, 114, 169, 3, 47, "Subtitle", CellTags->{"corecell", "opengroup"}], Cell[4303, 121, 225, 4, 68, "Section", Evaluatable->False, CellTags->{"corecell", "opengroup"}], Cell[4553, 129, 180, 4, 38, "Subsection", CellTags->"corecell"], Cell[4736, 135, 1272, 25, 84, "Text", Evaluatable->False, CellTags->{"corecell", "differentacrossnotebooks"}], Cell[6033, 164, 18432, 337, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{ "buttoncell", "corecell", "notopen", "differentacrossnotebooks"}], Cell[24468, 503, 3314, 89, 41, "Output", CellOpen->True, CellTags->{ "buttoncell", "corecell", "notopen", "differentacrossnotebooks"}], Cell[27794, 595, 2112, 33, 47, "Input", CellTags->{"corecell", "unique_payofffunction"}], Cell[29931, 632, 112, 2, 25, "SmallText", CellTags->"corecell"], Cell[30068, 638, 171, 2, 36, "Subsubsection", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[30242, 642, 944, 25, 123, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[31223, 672, 79, 1, 36, "Subsubsection", CellTags->"corecell"], Cell[31305, 675, 1103, 29, 47, "Input", CellTags->"corecell"], Cell[32445, 709, 68, 1, 30, "Subsubsection", CellTags->"corecell"], Cell[32516, 712, 634, 19, 27, "Input", CellTags->"corecell"], Cell[33187, 736, 90, 1, 30, "Subsubsection", CellTags->"corecell"], Cell[33280, 739, 911, 25, 47, "Input", CellTags->"corecell"], Cell[34228, 769, 71, 1, 30, "Subsubsection", CellTags->"corecell"], Cell[34302, 772, 1003, 24, 27, "Input", CellTags->"corecell"], Cell[35366, 803, 395, 6, 30, "Subsection", CellTags->{"corecell", "opengroup"}], Cell[35786, 813, 347, 6, 36, "Subsubsection", CellTags->{"corecell", "opengroup"}], Cell[36136, 821, 612, 14, 45, "Text", Evaluatable->False, CellTags->{"corecell", "differentacrossnotebooks"}], Cell[36773, 839, 197, 3, 23, "SmallText", CellTags->{"corecell", "opengroup"}], Cell[36995, 846, 19720, 394, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{ "buttoncell", "corecell", "differentacrossnotebooks", "notopen"}], Cell[56718, 1242, 14419, 370, 129, "Print", Evaluatable->False, CellOpen->True, CellTags->{ "buttoncell", "corecell", "differentacrossnotebooks", "notopen"}], Cell[71161, 1616, 6031, 94, 74, "Input", CellTags->{"corecell", "unique_payoffmatrix"}], Cell[77195, 1712, 907, 23, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{"corecell", "notopen", "singlepopulation"}], Cell[78139, 1740, 351, 6, 36, "Subsubsection", CellTags->"corecell"], Cell[78515, 1750, 305, 5, 25, "SmallText", CellTags->{"corecell", "singlepopulation"}], Cell[78823, 1757, 3990, 104, 440, "Input", CellTags->{"corecell", "differentacrossnotebooks", "singlepopulation"}], Cell[82850, 1866, 233, 4, 25, "SmallText", CellTags->"corecell"], Cell[83086, 1872, 137, 4, 29, "Text", CellTags->"corecell"], Cell[83226, 1878, 1487, 49, 142, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[84716, 1929, 102, 2, 29, "Text", CellTags->"corecell"], Cell[84821, 1933, 3107, 87, 218, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[87989, 2027, 398, 6, 38, "Subsection", CellTags->{"corecell", "opengroup"}], Cell[88390, 2035, 217, 6, 28, "Text", CellTags->"corecell"], Cell[88610, 2043, 1072, 27, 90, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[89719, 2075, 395, 6, 38, "Subsection", CellTags->"corecell"], Cell[90117, 2083, 1405, 28, 193, "Text", CellTags->"corecell"], Cell[91525, 2113, 584, 12, 66, "Input", CellTags->"corecell"], Cell[92158, 2131, 193, 4, 68, "Section", Evaluatable->False, CellTags->{"corecell", "opengroup"}], Cell[92354, 2137, 1371, 23, 96, "Text", CellTags->"corecell"], Cell[93750, 2164, 82, 1, 38, "Subsection", CellTags->{"corecell", "opengroup"}], Cell[93857, 2169, 16144, 301, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{"buttoncell", "corecell", "notopen"}], Cell[110004, 2472, 6327, 175, 102, "Output", Evaluatable->False, CellOpen->True, CellTags->{"buttoncell", "corecell", "notopen"}], Cell[116377, 2653, 179, 3, 38, "Subsection", CellTags->"corecell"], Cell[116559, 2658, 763, 14, 47, "Text", CellTags->"corecell"], Cell[117347, 2676, 15146, 282, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{"buttoncell", "corecell", "notopen"}], Cell[132496, 2960, 4402, 119, 40, "Output", Evaluatable->False, CellOpen->True, CellTags->{"buttoncell", "corecell", "notopen"}], Cell[136922, 3083, 5290, 75, 22, "Input", CellTags->{"corecell", "unique_meandynamic"}], Cell[142237, 3162, 193, 3, 23, "SmallText", CellTags->"corecell"], Cell[142433, 3167, 391, 7, 27, "Input", CellTags->"corecell"], Cell[142861, 3179, 259, 4, 23, "SmallText", CellTags->"corecell"], Cell[143123, 3185, 444, 8, 27, "Input", CellTags->"corecell"], Cell[143604, 3198, 302, 4, 23, "SmallText", CellTags->"corecell"], Cell[143909, 3204, 562, 10, 27, "Input", CellTags->"corecell"], Cell[144508, 3219, 147, 3, 23, "SmallText", CellTags->"corecell"], Cell[144658, 3224, 632, 15, 84, "Text", CellTags->"corecell"], Cell[145293, 3241, 364, 11, 73, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[145672, 3255, 245, 6, 19, "Input", CellOpen->False, CellTags->{"corecell", "notopen"}], Cell[145920, 3263, 438, 11, 45, "Text", CellTags->"corecell"], Cell[146361, 3276, 402, 8, 26, "Input", CellTags->"corecell"], Cell[146788, 3288, 89, 1, 36, "Subsubsection", CellTags->"corecell"], Cell[146880, 3291, 1039, 17, 155, "Text", CellTags->"corecell"], Cell[147922, 3310, 1415, 43, 142, "Input", CellTags->"corecell"], Cell[149374, 3358, 71, 1, 30, "Subsubsection", CellTags->"corecell"], Cell[149470, 3363, 128, 2, 23, "SmallText", CellTags->"corecell"], Cell[149601, 3367, 1005, 28, 66, "Input", CellTags->"corecell"], Cell[150609, 3397, 868, 20, 66, "Input", CellTags->"corecell"], Cell[151514, 3422, 76, 1, 23, "SmallText", CellTags->"corecell"], Cell[151593, 3425, 840, 23, 79, "Input", CellTags->"corecell"], Cell[152436, 3450, 3533, 86, 313, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[155972, 3538, 865, 19, 66, "Input", CellTags->"corecell"], Cell[156874, 3562, 59, 1, 23, "SmallText", CellTags->"corecell"], Cell[156936, 3565, 1949, 53, 143, "Input", CellTags->"corecell"], Cell[158888, 3620, 834, 21, 85, "Input", CellTags->"corecell"], Cell[159759, 3646, 135, 2, 23, "SmallText", CellTags->"corecell"], Cell[159897, 3650, 604, 13, 27, "Input", CellTags->"corecell"], Cell[160504, 3665, 868, 20, 66, "Input", CellTags->"corecell"], Cell[161409, 3690, 381, 6, 23, "SmallText", CellTags->"corecell"], Cell[161793, 3698, 5891, 133, 256, "Input", CellTags->"corecell"], Cell[167687, 3833, 1202, 28, 66, "Input", CellTags->"corecell"], Cell[168926, 3866, 339, 5, 23, "SmallText", CellTags->"corecell"], Cell[169268, 3873, 323, 7, 47, "Text", CellTags->"corecell"], Cell[169594, 3882, 2484, 41, 27, "Input", CellTags->"corecell"], Cell[172081, 3925, 1096, 25, 66, "Input", CellTags->"corecell"], Cell[173214, 3955, 180, 3, 23, "SmallText", CellTags->"corecell"], Cell[173397, 3960, 229, 6, 47, "Text", CellTags->"corecell"], Cell[173629, 3968, 8285, 152, 237, "Input", CellTags->"corecell"], Cell[181917, 4122, 1286, 27, 66, "Input", CellTags->"corecell"], Cell[183240, 4154, 57, 1, 23, "SmallText", CellTags->"corecell"], Cell[183300, 4157, 1618, 43, 143, "Input", CellTags->"corecell"], Cell[184921, 4202, 779, 20, 66, "Input", CellTags->"corecell"], Cell[185737, 4227, 55, 1, 23, "SmallText", CellTags->"corecell"], Cell[185795, 4230, 1389, 39, 177, "Input", CellTags->"corecell"], Cell[187187, 4271, 697, 17, 66, "Input", CellTags->"corecell"], Cell[187921, 4293, 125, 2, 23, "SmallText", CellTags->"corecell"], Cell[188049, 4297, 1468, 41, 104, "Input", CellTags->"corecell"], Cell[189520, 4340, 1171, 34, 85, "Input", CellTags->"corecell"], Cell[190694, 4376, 706, 18, 66, "Input", CellTags->"corecell"], Cell[191437, 4399, 65, 1, 23, "SmallText", CellTags->"corecell"], Cell[191505, 4402, 647, 14, 119, "Text", CellTags->"corecell"], Cell[192155, 4418, 992, 28, 66, "Input", CellTags->"corecell"], Cell[193150, 4448, 1429, 40, 177, "Input", CellTags->"corecell"], Cell[194582, 4490, 728, 18, 66, "Input", CellTags->"corecell"], Cell[195347, 4513, 71, 1, 23, "SmallText", CellTags->"corecell"], Cell[195421, 4516, 490, 8, 101, "Text", CellTags->"corecell"], Cell[195914, 4526, 272, 8, 27, "Input", CellTags->"corecell"], Cell[196189, 4536, 1131, 33, 85, "Input", CellTags->"corecell"], Cell[197323, 4571, 774, 18, 66, "Input", CellTags->"corecell"], Cell[198134, 4594, 130, 2, 23, "SmallText", CellTags->"corecell"], Cell[198267, 4598, 13770, 275, 1016, "Input", CellTags->"corecell"], Cell[212040, 4875, 894, 20, 66, "Input", CellTags->"corecell"], Cell[212971, 4900, 62, 1, 23, "SmallText", CellTags->"corecell"], Cell[213036, 4903, 1199, 34, 66, "Input", CellTags->"corecell"], Cell[214238, 4939, 809, 20, 66, "Input", CellTags->"corecell"], Cell[215084, 4964, 49, 1, 23, "SmallText", CellTags->"corecell"], Cell[215136, 4967, 230, 5, 65, "Text", CellTags->"corecell"], Cell[215369, 4974, 957, 27, 66, "Input", CellTags->"corecell"], Cell[216329, 5003, 719, 17, 66, "Input", CellTags->"corecell"], Cell[217109, 5027, 128, 3, 68, "Section", Evaluatable->False, CellTags->"corecell"], Cell[217262, 5034, 211, 3, 39, "Subsection", CellTags->{"corecell", "opengroup"}], Cell[217476, 5039, 1658, 27, 67, "Text", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[219137, 5068, 1848, 28, 47, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[221010, 5100, 154, 2, 36, "Subsubsection", CellTags->{"corecell", "opengroup"}], Cell[221189, 5106, 121, 3, 25, "SmallText", CellTags->"corecell"], Cell[221313, 5111, 2543, 49, 360, "Text", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[223893, 5165, 118, 3, 25, "SmallText", CellTags->"corecell"], Cell[224014, 5170, 2659, 62, 443, "Text", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[226688, 5235, 1311, 30, 196, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[228024, 5269, 19951, 357, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{ "buttoncell", "corecell", "differentacrossnotebooks", "notopen"}], Cell[247978, 5628, 4886, 109, 41, "Output", CellOpen->True, CellTags->{ "buttoncell", "corecell", "differentacrossnotebooks", "notopen"}], Cell[252876, 5740, 2877, 67, 142, "Input", CellTags->{ "corecell", "differentacrossnotebooks", "unique_trajectoryspecs"}], Cell[255790, 5812, 72, 1, 36, "Subsubsection", CellTags->"corecell"], Cell[255865, 5815, 1006, 18, 157, "Text", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[256874, 5835, 2173, 43, 123, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[259050, 5880, 175, 4, 27, "Input", CellTags->"corecell"], Cell[259262, 5889, 70, 1, 30, "Subsubsection", CellTags->"corecell"], Cell[259335, 5892, 3142, 74, 455, "Text", CellTags->"corecell"], Cell[262480, 5968, 1030, 23, 85, "Input", CellTags->"corecell"], Cell[263547, 5996, 199, 3, 30, "Subsubsection", CellTags->"corecell"], Cell[263749, 6001, 2069, 32, 247, "Text", CellTags->"corecell"], Cell[265821, 6035, 333, 7, 47, "Input", CellTags->"corecell"], Cell[266191, 6047, 147, 2, 30, "Subsubsection", CellTags->"corecell"], Cell[266341, 6051, 2432, 49, 232, "Text", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[268776, 6102, 955, 20, 142, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[269768, 6127, 77, 1, 30, "Subsubsection", CellTags->"corecell"], Cell[269848, 6130, 4514, 75, 771, "Text", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[274365, 6207, 1243, 21, 173, "Text", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[275611, 6230, 2488, 42, 85, "Input", CellTags->"corecell"], Cell[278148, 6278, 208, 3, 36, "Subsubsection", CellTags->{"corecell", "3Dexclusive"}], Cell[278359, 6283, 2075, 39, 231, "Text", CellTags->{"corecell", "3Dexclusive", "differentacrossnotebooks"}], Cell[281908, 6361, 75, 2, 47, "Subtitle", CellTags->"corecell"], Cell[281986, 6365, 204, 5, 27, "Input", CellTags->"corecell"], Cell[282215, 6374, 235, 4, 74, "Section", CellTags->{"corecell", "singlepopulation"}], Cell[282453, 6380, 2140, 58, 104, "Input", CellTags->{"corecell", "singlepopulation"}], Cell[284618, 6442, 183, 3, 38, "Subsection", CellTags->{"corecell", "singlepopulation"}], Cell[284804, 6447, 3551, 51, 27, "Input", CellTags->{"corecell", "singlepopulation"}], Cell[288392, 6503, 214, 4, 38, "Subsection", CellTags->{"corecell", "singlepopulation"}], Cell[288609, 6509, 3736, 58, 66, "Input", CellTags->{"corecell", "singlepopulation"}], Cell[292394, 6573, 161, 3, 44, "Section", CellTags->"corecell"], Cell[292580, 6580, 119, 2, 38, "Subsection", CellTags->"corecell"], Cell[292702, 6584, 3709, 57, 47, "Input", CellTags->{"corecell", "3Dexclusive"}], Cell[296414, 6643, 4651, 84, 180, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[301068, 6729, 8253, 168, 503, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[309358, 6902, 186, 3, 38, "Subsection", CellTags->"corecell"], Cell[309547, 6907, 2234, 40, 104, "Input", CellTags->"corecell"], Cell[311818, 6952, 188, 3, 30, "Subsection", CellTags->"corecell"], Cell[312009, 6957, 2199, 41, 123, "Input", CellTags->"corecell"], Cell[314257, 7004, 149, 3, 44, "Section", CellTags->"corecell"], Cell[314431, 7011, 166, 3, 38, "Subsection", CellTags->"corecell"], Cell[314622, 7018, 464, 9, 47, "Text", CellTags->"corecell"], Cell[315089, 7029, 5139, 111, 351, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[320231, 7142, 2612, 43, 66, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[322880, 7190, 685, 13, 83, "Text", CellTags->"corecell"], Cell[323568, 7205, 5822, 128, 446, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[329427, 7338, 198, 3, 26, "Text", CellTags->"corecell"], Cell[329628, 7343, 8658, 209, 674, "Input", CellTags->{"differentacrossnotebooks", "corecell"}], Cell[338335, 7558, 172, 3, 38, "Subsection", CellTags->"corecell"], Cell[338510, 7563, 4514, 105, 389, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[343027, 7670, 4733, 104, 408, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[347797, 7779, 159, 3, 30, "Subsection", CellTags->"corecell"], Cell[347959, 7784, 8605, 182, 484, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[356567, 7968, 8331, 175, 446, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[364947, 8149, 72, 1, 44, "Section", CellTags->"corecell"], Cell[365140, 8157, 668, 12, 47, "Input", CellTags->"corecell"], Cell[365811, 8171, 14859, 257, 541, "Input", CellTags->"corecell"], Cell[380673, 8430, 19502, 391, 1016, "Input", CellTags->"corecell"], Cell[400178, 8823, 1713, 33, 66, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[401928, 8861, 61, 1, 29, "Text", CellTags->"corecell"], Cell[401992, 8864, 4245, 65, 47, "Input", CellTags->"corecell"], Cell[406240, 8931, 7112, 140, 446, "Input", CellTags->"corecell"], Cell[413355, 9073, 5938, 104, 218, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[419296, 9179, 8585, 166, 598, "Input", CellTags->"corecell"], Cell[427918, 9350, 64, 1, 26, "Text", CellTags->"corecell"], Cell[427985, 9353, 2555, 64, 218, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[430577, 9422, 77, 1, 26, "Text", CellTags->"corecell"], Cell[430657, 9425, 13075, 278, 1282, "Input", CellTags->"corecell"], Cell[443769, 9708, 79, 1, 26, "Text", CellTags->"corecell"], Cell[443851, 9711, 3668, 69, 256, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[447556, 9785, 154, 3, 26, "Text", CellTags->"corecell"], Cell[447713, 9790, 4602, 93, 294, "Input", CellTags->"corecell"], Cell[452507, 9892, 2511, 74, 294, "Input", CellTags->"corecell"]}, "differentacrossnotebooks"->{ Cell[4736, 135, 1272, 25, 84, "Text", Evaluatable->False, CellTags->{"corecell", "differentacrossnotebooks"}], Cell[6033, 164, 18432, 337, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{ "buttoncell", "corecell", "notopen", "differentacrossnotebooks"}], Cell[24468, 503, 3314, 89, 41, "Output", CellOpen->True, CellTags->{ "buttoncell", "corecell", "notopen", "differentacrossnotebooks"}], Cell[30068, 638, 171, 2, 36, "Subsubsection", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[30242, 642, 944, 25, 123, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[36136, 821, 612, 14, 45, "Text", Evaluatable->False, CellTags->{"corecell", "differentacrossnotebooks"}], Cell[36995, 846, 19720, 394, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{ "buttoncell", "corecell", "differentacrossnotebooks", "notopen"}], Cell[56718, 1242, 14419, 370, 129, "Print", Evaluatable->False, CellOpen->True, CellTags->{ "buttoncell", "corecell", "differentacrossnotebooks", "notopen"}], Cell[78823, 1757, 3990, 104, 440, "Input", CellTags->{"corecell", "differentacrossnotebooks", "singlepopulation"}], Cell[83226, 1878, 1487, 49, 142, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[84821, 1933, 3107, 87, 218, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[88610, 2043, 1072, 27, 90, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[145293, 3241, 364, 11, 73, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[152436, 3450, 3533, 86, 313, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[217476, 5039, 1658, 27, 67, "Text", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[219137, 5068, 1848, 28, 47, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[221313, 5111, 2543, 49, 360, "Text", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[224014, 5170, 2659, 62, 443, "Text", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[226688, 5235, 1311, 30, 196, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[228024, 5269, 19951, 357, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{ "buttoncell", "corecell", "differentacrossnotebooks", "notopen"}], Cell[247978, 5628, 4886, 109, 41, "Output", CellOpen->True, CellTags->{ "buttoncell", "corecell", "differentacrossnotebooks", "notopen"}], Cell[252876, 5740, 2877, 67, 142, "Input", CellTags->{ "corecell", "differentacrossnotebooks", "unique_trajectoryspecs"}], Cell[255865, 5815, 1006, 18, 157, "Text", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[256874, 5835, 2173, 43, 123, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[266341, 6051, 2432, 49, 232, "Text", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[268776, 6102, 955, 20, 142, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[269848, 6130, 4514, 75, 771, "Text", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[274365, 6207, 1243, 21, 173, "Text", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[278359, 6283, 2075, 39, 231, "Text", CellTags->{"corecell", "3Dexclusive", "differentacrossnotebooks"}], Cell[280437, 6324, 1410, 30, 85, "Input", CellTags->{"3Dexclusive", "differentacrossnotebooks"}], Cell[296414, 6643, 4651, 84, 180, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[301068, 6729, 8253, 168, 503, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[315089, 7029, 5139, 111, 351, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[320231, 7142, 2612, 43, 66, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[323568, 7205, 5822, 128, 446, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[329628, 7343, 8658, 209, 674, "Input", CellTags->{"differentacrossnotebooks", "corecell"}], Cell[338510, 7563, 4514, 105, 389, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[343027, 7670, 4733, 104, 408, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[347959, 7784, 8605, 182, 484, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[356567, 7968, 8331, 175, 446, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[400178, 8823, 1713, 33, 66, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[413355, 9073, 5938, 104, 218, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[427985, 9353, 2555, 64, 218, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[443851, 9711, 3668, 69, 256, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[455881, 9999, 2022, 33, 85, "Input", CellTags->{"initcell", "differentacrossnotebooks"}], Cell[549110, 12063, 332, 7, 47, "Text", CellTags->{"initcell", "differentacrossnotebooks"}], Cell[549445, 12072, 5262, 145, 569, "Input", CellTags->{"initcell", "differentacrossnotebooks"}], Cell[556708, 12267, 5051, 125, 465, "Input", CellTags->{"initcell", "differentacrossnotebooks"}]}, "finalcell"->{ Cell[805877, 17361, 2167, 45, 351, "Text", Evaluatable->False, CellTags->{"finalcell", "buttoncell", "opengroup"}]}, "initcell"->{ Cell[455253, 9980, 167, 3, 74, "Section", CellTags->"initcell"], Cell[455445, 9987, 85, 1, 38, "Subsection", CellTags->"initcell"], Cell[455555, 9992, 323, 5, 36, "Subsubsection", CellTags->"initcell"], Cell[455881, 9999, 2022, 33, 85, "Input", CellTags->{"initcell", "differentacrossnotebooks"}], Cell[457906, 10034, 3170, 75, 142, "Input", CellTags->"initcell"], Cell[461113, 10114, 193, 3, 36, "Subsubsection", CellTags->"initcell"], Cell[461309, 10119, 2455, 63, 218, "Input", CellTags->"initcell"], Cell[463767, 10184, 2570, 66, 275, "Input", CellTags->"initcell"], Cell[466340, 10252, 5355, 117, 484, "Input", CellTags->"initcell"], Cell[471698, 10371, 3016, 78, 294, "Input", CellTags->"initcell"], Cell[474717, 10451, 962, 26, 66, "Input", CellTags->"initcell"], Cell[475682, 10479, 1802, 44, 199, "Input", CellTags->"initcell"], Cell[477487, 10525, 3302, 75, 389, "Input", CellTags->"initcell"], Cell[480792, 10602, 1914, 46, 180, "Input", CellTags->"initcell"], Cell[482709, 10650, 3327, 84, 370, "Input", CellTags->"initcell"], Cell[486039, 10736, 1112, 31, 85, "Input", CellTags->"initcell"], Cell[487154, 10769, 1154, 31, 85, "Input", CellTags->"initcell"], Cell[488311, 10802, 7480, 162, 788, "Input", CellTags->"initcell"], Cell[495794, 10966, 3377, 80, 180, "Input", CellTags->"initcell"], Cell[499208, 11051, 246, 4, 30, "Subsubsection", CellTags->"initcell"], Cell[499457, 11057, 2456, 64, 237, "Input", CellTags->"initcell"], Cell[501916, 11123, 2836, 65, 123, "Input", CellTags->"initcell"], Cell[504755, 11190, 2855, 58, 104, "Input", CellTags->"initcell"], Cell[507613, 11250, 4221, 88, 237, "Input", CellTags->"initcell"], Cell[511837, 11340, 13402, 211, 313, "Input", CellTags->"initcell"], Cell[525276, 11556, 253, 4, 30, "Subsubsection", CellTags->"initcell"], Cell[525532, 11562, 2484, 56, 104, "Input", CellTags->"initcell"], Cell[528019, 11620, 11218, 224, 788, "Input", CellTags->"initcell"], Cell[539240, 11846, 9634, 205, 693, "Input", CellTags->"initcell"], Cell[548911, 12056, 174, 3, 30, "Subsubsection", CellTags->"initcell"], Cell[549110, 12063, 332, 7, 47, "Text", CellTags->{"initcell", "differentacrossnotebooks"}], Cell[549445, 12072, 5262, 145, 569, "Input", CellTags->{"initcell", "differentacrossnotebooks"}], Cell[554710, 12219, 1995, 46, 85, "Input", CellTags->"initcell"], Cell[556708, 12267, 5051, 125, 465, "Input", CellTags->{"initcell", "differentacrossnotebooks"}], Cell[561808, 12398, 343, 5, 30, "Subsubsection", CellTags->"initcell"], Cell[562154, 12405, 6833, 144, 579, "Input", CellTags->{"initcell", "3Dexclusive"}], Cell[568990, 12551, 6345, 134, 522, "Input", CellTags->{"initcell", "3Dexclusive"}], Cell[575384, 12691, 139, 2, 30, "Subsection", CellTags->"initcell"], Cell[575548, 12697, 164, 2, 36, "Subsubsection", CellTags->"initcell"], Cell[575715, 12701, 19160, 385, 1016, "Input", CellTags->"initcell"], Cell[594878, 13088, 18188, 374, 1491, "Input", CellTags->"initcell"], Cell[613103, 13467, 206, 5, 30, "Subsubsection", CellTags->"initcell"], Cell[613312, 13474, 32172, 623, 2156, "Input", CellTags->"initcell"], Cell[645487, 14099, 25787, 462, 1567, "Input", CellTags->"initcell"], Cell[671311, 14566, 76, 1, 30, "Subsubsection", CellTags->"initcell"], Cell[671390, 14569, 3819, 72, 465, "Input", CellTags->"initcell"], Cell[675258, 14647, 119, 2, 38, "Subsection", CellTags->"initcell"], Cell[675402, 14653, 212, 3, 36, "Subsubsection", CellTags->"initcell"], Cell[675617, 14658, 23030, 460, 1073, "Input", CellTags->"initcell"], Cell[698684, 15123, 325, 5, 30, "Subsubsection", CellTags->"initcell"], Cell[699012, 15130, 17675, 343, 1757, "Input", CellTags->"initcell"], Cell[716724, 15478, 307, 5, 30, "Subsubsection", CellTags->"initcell"], Cell[717034, 15485, 23316, 465, 1016, "Input", CellTags->"initcell"], Cell[740353, 15952, 4521, 95, 465, "Input", CellTags->"initcell"], Cell[744911, 16052, 288, 4, 30, "Subsubsection", CellTags->"initcell"], Cell[745202, 16058, 15914, 320, 1738, "Input", CellTags->"initcell"], Cell[761165, 16384, 176, 3, 30, "Subsection", CellTags->"initcell"], Cell[761366, 16391, 230, 4, 36, "Subsubsection", CellTags->"initcell"], Cell[761599, 16397, 10022, 191, 1130, "Input", CellTags->"initcell"], Cell[771624, 16590, 8368, 123, 104, "Input", CellTags->"initcell"], Cell[780041, 16719, 175, 3, 30, "Subsection", CellTags->"initcell"], Cell[780219, 16724, 16310, 399, 2061, "Input", CellTags->"initcell"]}, "notopen"->{ Cell[1363, 45, 1675, 39, 19, "Input", CellOpen->False, CellTags->"notopen"], Cell[3041, 86, 1031, 23, 19, "Input", CellOpen->False, CellTags->"notopen"], Cell[6033, 164, 18432, 337, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{ "buttoncell", "corecell", "notopen", "differentacrossnotebooks"}], Cell[24468, 503, 3314, 89, 41, "Output", CellOpen->True, CellTags->{ "buttoncell", "corecell", "notopen", "differentacrossnotebooks"}], Cell[36995, 846, 19720, 394, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{ "buttoncell", "corecell", "differentacrossnotebooks", "notopen"}], Cell[56718, 1242, 14419, 370, 129, "Print", Evaluatable->False, CellOpen->True, CellTags->{ "buttoncell", "corecell", "differentacrossnotebooks", "notopen"}], Cell[77195, 1712, 907, 23, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{"corecell", "notopen", "singlepopulation"}], Cell[93857, 2169, 16144, 301, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{"buttoncell", "corecell", "notopen"}], Cell[110004, 2472, 6327, 175, 102, "Output", Evaluatable->False, CellOpen->True, CellTags->{"buttoncell", "corecell", "notopen"}], Cell[117347, 2676, 15146, 282, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{"buttoncell", "corecell", "notopen"}], Cell[132496, 2960, 4402, 119, 40, "Output", Evaluatable->False, CellOpen->True, CellTags->{"buttoncell", "corecell", "notopen"}], Cell[145672, 3255, 245, 6, 19, "Input", CellOpen->False, CellTags->{"corecell", "notopen"}], Cell[228024, 5269, 19951, 357, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{ "buttoncell", "corecell", "differentacrossnotebooks", "notopen"}], Cell[247978, 5628, 4886, 109, 41, "Output", CellOpen->True, CellTags->{ "buttoncell", "corecell", "differentacrossnotebooks", "notopen"}]}, "opengroup"->{ Cell[579, 22, 535, 11, 139, "Title", CellTags->"opengroup"], Cell[4109, 114, 169, 3, 47, "Subtitle", CellTags->{"corecell", "opengroup"}], Cell[4303, 121, 225, 4, 68, "Section", Evaluatable->False, CellTags->{"corecell", "opengroup"}], Cell[35366, 803, 395, 6, 30, "Subsection", CellTags->{"corecell", "opengroup"}], Cell[35786, 813, 347, 6, 36, "Subsubsection", CellTags->{"corecell", "opengroup"}], Cell[36773, 839, 197, 3, 23, "SmallText", CellTags->{"corecell", "opengroup"}], Cell[87989, 2027, 398, 6, 38, "Subsection", CellTags->{"corecell", "opengroup"}], Cell[92158, 2131, 193, 4, 68, "Section", Evaluatable->False, CellTags->{"corecell", "opengroup"}], Cell[93750, 2164, 82, 1, 38, "Subsection", CellTags->{"corecell", "opengroup"}], Cell[217262, 5034, 211, 3, 39, "Subsection", CellTags->{"corecell", "opengroup"}], Cell[221010, 5100, 154, 2, 36, "Subsubsection", CellTags->{"corecell", "opengroup"}], Cell[805757, 17357, 117, 2, 47, "Subtitle", CellTags->"opengroup"], Cell[805877, 17361, 2167, 45, 351, "Text", Evaluatable->False, CellTags->{"finalcell", "buttoncell", "opengroup"}]}, "singlepopulation"->{ Cell[77195, 1712, 907, 23, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{"corecell", "notopen", "singlepopulation"}], Cell[78515, 1750, 305, 5, 25, "SmallText", CellTags->{"corecell", "singlepopulation"}], Cell[78823, 1757, 3990, 104, 440, "Input", CellTags->{"corecell", "differentacrossnotebooks", "singlepopulation"}], Cell[282215, 6374, 235, 4, 74, "Section", CellTags->{"corecell", "singlepopulation"}], Cell[282453, 6380, 2140, 58, 104, "Input", CellTags->{"corecell", "singlepopulation"}], Cell[284618, 6442, 183, 3, 38, "Subsection", CellTags->{"corecell", "singlepopulation"}], Cell[284804, 6447, 3551, 51, 27, "Input", CellTags->{"corecell", "singlepopulation"}], Cell[288392, 6503, 214, 4, 38, "Subsection", CellTags->{"corecell", "singlepopulation"}], Cell[288609, 6509, 3736, 58, 66, "Input", CellTags->{"corecell", "singlepopulation"}]}, "unique_meandynamic"->{ Cell[136922, 3083, 5290, 75, 22, "Input", CellTags->{"corecell", "unique_meandynamic"}]}, "unique_payofffunction"->{ Cell[27794, 595, 2112, 33, 47, "Input", CellTags->{"corecell", "unique_payofffunction"}]}, "unique_payoffmatrix"->{ Cell[71161, 1616, 6031, 94, 74, "Input", CellTags->{"corecell", "unique_payoffmatrix"}]}, "unique_trajectoryspecs"->{ Cell[252876, 5740, 2877, 67, 142, "Input", CellTags->{ "corecell", "differentacrossnotebooks", "unique_trajectoryspecs"}]}, "3Dexclusive"->{ Cell[278148, 6278, 208, 3, 36, "Subsubsection", CellTags->{"corecell", "3Dexclusive"}], Cell[278359, 6283, 2075, 39, 231, "Text", CellTags->{"corecell", "3Dexclusive", "differentacrossnotebooks"}], Cell[280437, 6324, 1410, 30, 85, "Input", CellTags->{"3Dexclusive", "differentacrossnotebooks"}], Cell[292702, 6584, 3709, 57, 47, "Input", CellTags->{"corecell", "3Dexclusive"}], Cell[562154, 12405, 6833, 144, 579, "Input", CellTags->{"initcell", "3Dexclusive"}], Cell[568990, 12551, 6345, 134, 522, "Input", CellTags->{"initcell", "3Dexclusive"}]} } *) (*CellTagsIndex CellTagsIndex->{ {"buttoncell", 921545, 19754}, {"corecell", 923244, 19802}, {"differentacrossnotebooks", 940234, 20242}, {"finalcell", 945580, 20358}, {"initcell", 945720, 20362}, {"notopen", 950458, 20487}, {"opengroup", 952449, 20545}, {"singlepopulation", 953643, 20575}, {"unique_meandynamic", 954586, 20596}, {"unique_payofffunction", 954709, 20599}, {"unique_payoffmatrix", 954831, 20602}, {"unique_trajectoryspecs", 954955, 20605}, {"3Dexclusive", 955106, 20609} } *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[579, 22, 535, 11, 139, "Title", CellTags->"opengroup"], Cell[CellGroupData[{ Cell[1139, 37, 221, 6, 30, "Text", Evaluatable->False], Cell[1363, 45, 1675, 39, 19, "Input", CellOpen->False, CellTags->"notopen"], Cell[3041, 86, 1031, 23, 19, "Input", CellOpen->False, CellTags->"notopen"] }, Closed]], Cell[CellGroupData[{ Cell[4109, 114, 169, 3, 47, "Subtitle", CellTags->{"corecell", "opengroup"}], Cell[CellGroupData[{ Cell[4303, 121, 225, 4, 68, "Section", Evaluatable->False, CellTags->{"corecell", "opengroup"}], Cell[CellGroupData[{ Cell[4553, 129, 180, 4, 38, "Subsection", CellTags->"corecell"], Cell[4736, 135, 1272, 25, 84, "Text", Evaluatable->False, CellTags->{"corecell", "differentacrossnotebooks"}], Cell[CellGroupData[{ Cell[6033, 164, 18432, 337, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{ "buttoncell", "corecell", "notopen", "differentacrossnotebooks"}], Cell[24468, 503, 3314, 89, 41, "Output", CellOpen->True, CellTags->{"buttoncell", "corecell", "notopen", "differentacrossnotebooks"}] }, {2}]], Cell[27794, 595, 2112, 33, 47, "Input", CellTags->{"corecell", "unique_payofffunction"}], Cell[CellGroupData[{ Cell[29931, 632, 112, 2, 25, "SmallText", CellTags->"corecell"], Cell[CellGroupData[{ Cell[30068, 638, 171, 2, 36, "Subsubsection", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[30242, 642, 944, 25, 123, "Input", CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[CellGroupData[{ Cell[31223, 672, 79, 1, 36, "Subsubsection", CellTags->"corecell"], Cell[31305, 675, 1103, 29, 47, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[32445, 709, 68, 1, 30, "Subsubsection", CellTags->"corecell"], Cell[32516, 712, 634, 19, 27, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[33187, 736, 90, 1, 30, "Subsubsection", CellTags->"corecell"], Cell[33280, 739, 911, 25, 47, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[34228, 769, 71, 1, 30, "Subsubsection", CellTags->"corecell"], Cell[34302, 772, 1003, 24, 27, "Input", CellTags->"corecell"] }, Closed]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[35366, 803, 395, 6, 30, "Subsection", CellTags->{"corecell", "opengroup"}], Cell[CellGroupData[{ Cell[35786, 813, 347, 6, 36, "Subsubsection", CellTags->{"corecell", "opengroup"}], Cell[36136, 821, 612, 14, 45, "Text", Evaluatable->False, CellTags->{"corecell", "differentacrossnotebooks"}], Cell[CellGroupData[{ Cell[36773, 839, 197, 3, 23, "SmallText", CellTags->{"corecell", "opengroup"}], Cell[CellGroupData[{ Cell[36995, 846, 19720, 394, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{ "buttoncell", "corecell", "differentacrossnotebooks", "notopen"}], Cell[56718, 1242, 14419, 370, 129, "Print", Evaluatable->False, CellOpen->True, CellTags->{"buttoncell", "corecell", "differentacrossnotebooks", "notopen"}] }, {2}]] }, Open ]], Cell[71161, 1616, 6031, 94, 74, "Input", CellTags->{"corecell", "unique_payoffmatrix"}], Cell[77195, 1712, 907, 23, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{"corecell", "notopen", "singlepopulation"}] }, Open ]], Cell[CellGroupData[{ Cell[78139, 1740, 351, 6, 36, "Subsubsection", CellTags->"corecell"], Cell[CellGroupData[{ Cell[78515, 1750, 305, 5, 25, "SmallText", CellTags->{"corecell", "singlepopulation"}], Cell[78823, 1757, 3990, 104, 440, "Input", CellTags->{"corecell", "differentacrossnotebooks", "singlepopulation"}] }, Closed]], Cell[CellGroupData[{ Cell[82850, 1866, 233, 4, 25, "SmallText", CellTags->"corecell"], Cell[83086, 1872, 137, 4, 29, "Text", CellTags->"corecell"], Cell[83226, 1878, 1487, 49, 142, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[84716, 1929, 102, 2, 29, "Text", CellTags->"corecell"], Cell[84821, 1933, 3107, 87, 218, "Input", CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell[87989, 2027, 398, 6, 38, "Subsection", CellTags->{"corecell", "opengroup"}], Cell[88390, 2035, 217, 6, 28, "Text", CellTags->"corecell"], Cell[88610, 2043, 1072, 27, 90, "Input", CellTags->{"corecell", "differentacrossnotebooks"}] }, Open ]], Cell[CellGroupData[{ Cell[89719, 2075, 395, 6, 38, "Subsection", CellTags->"corecell"], Cell[90117, 2083, 1405, 28, 193, "Text", CellTags->"corecell"], Cell[91525, 2113, 584, 12, 66, "Input", CellTags->"corecell"] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell[92158, 2131, 193, 4, 68, "Section", Evaluatable->False, CellTags->{"corecell", "opengroup"}], Cell[92354, 2137, 1371, 23, 96, "Text", CellTags->"corecell"], Cell[CellGroupData[{ Cell[93750, 2164, 82, 1, 38, "Subsection", CellTags->{"corecell", "opengroup"}], Cell[CellGroupData[{ Cell[93857, 2169, 16144, 301, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{"buttoncell", "corecell", "notopen"}], Cell[110004, 2472, 6327, 175, 102, "Output", Evaluatable->False, CellOpen->True, CellTags->{"buttoncell", "corecell", "notopen"}] }, {2}]] }, Open ]], Cell[CellGroupData[{ Cell[116377, 2653, 179, 3, 38, "Subsection", CellTags->"corecell"], Cell[116559, 2658, 763, 14, 47, "Text", CellTags->"corecell"], Cell[CellGroupData[{ Cell[117347, 2676, 15146, 282, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{"buttoncell", "corecell", "notopen"}], Cell[132496, 2960, 4402, 119, 40, "Output", Evaluatable->False, CellOpen->True, CellTags->{"buttoncell", "corecell", "notopen"}] }, {2}]] }, Closed]], Cell[136922, 3083, 5290, 75, 22, "Input", CellTags->{"corecell", "unique_meandynamic"}], Cell[CellGroupData[{ Cell[142237, 3162, 193, 3, 23, "SmallText", CellTags->"corecell"], Cell[142433, 3167, 391, 7, 27, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[142861, 3179, 259, 4, 23, "SmallText", CellTags->"corecell"], Cell[143123, 3185, 444, 8, 27, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[143604, 3198, 302, 4, 23, "SmallText", CellTags->"corecell"], Cell[143909, 3204, 562, 10, 27, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[144508, 3219, 147, 3, 23, "SmallText", CellTags->"corecell"], Cell[144658, 3224, 632, 15, 84, "Text", CellTags->"corecell"], Cell[145293, 3241, 364, 11, 73, "Input", CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[145672, 3255, 245, 6, 19, "Input", CellOpen->False, CellTags->{"corecell", "notopen"}], Cell[145920, 3263, 438, 11, 45, "Text", CellTags->"corecell"], Cell[146361, 3276, 402, 8, 26, "Input", CellTags->"corecell"], Cell[CellGroupData[{ Cell[146788, 3288, 89, 1, 36, "Subsubsection", CellTags->"corecell"], Cell[146880, 3291, 1039, 17, 155, "Text", CellTags->"corecell"], Cell[147922, 3310, 1415, 43, 142, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[149374, 3358, 71, 1, 30, "Subsubsection", CellTags->"corecell"], Cell[CellGroupData[{ Cell[149470, 3363, 128, 2, 23, "SmallText", CellTags->"corecell"], Cell[149601, 3367, 1005, 28, 66, "Input", CellTags->"corecell"], Cell[150609, 3397, 868, 20, 66, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[151514, 3422, 76, 1, 23, "SmallText", CellTags->"corecell"], Cell[151593, 3425, 840, 23, 79, "Input", CellTags->"corecell"], Cell[152436, 3450, 3533, 86, 313, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[155972, 3538, 865, 19, 66, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[156874, 3562, 59, 1, 23, "SmallText", CellTags->"corecell"], Cell[156936, 3565, 1949, 53, 143, "Input", CellTags->"corecell"], Cell[158888, 3620, 834, 21, 85, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[159759, 3646, 135, 2, 23, "SmallText", CellTags->"corecell"], Cell[159897, 3650, 604, 13, 27, "Input", CellTags->"corecell"], Cell[160504, 3665, 868, 20, 66, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[161409, 3690, 381, 6, 23, "SmallText", CellTags->"corecell"], Cell[161793, 3698, 5891, 133, 256, "Input", CellTags->"corecell"], Cell[167687, 3833, 1202, 28, 66, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[168926, 3866, 339, 5, 23, "SmallText", CellTags->"corecell"], Cell[169268, 3873, 323, 7, 47, "Text", CellTags->"corecell"], Cell[169594, 3882, 2484, 41, 27, "Input", CellTags->"corecell"], Cell[172081, 3925, 1096, 25, 66, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[173214, 3955, 180, 3, 23, "SmallText", CellTags->"corecell"], Cell[173397, 3960, 229, 6, 47, "Text", CellTags->"corecell"], Cell[173629, 3968, 8285, 152, 237, "Input", CellTags->"corecell"], Cell[181917, 4122, 1286, 27, 66, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[183240, 4154, 57, 1, 23, "SmallText", CellTags->"corecell"], Cell[183300, 4157, 1618, 43, 143, "Input", CellTags->"corecell"], Cell[184921, 4202, 779, 20, 66, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[185737, 4227, 55, 1, 23, "SmallText", CellTags->"corecell"], Cell[185795, 4230, 1389, 39, 177, "Input", CellTags->"corecell"], Cell[187187, 4271, 697, 17, 66, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[187921, 4293, 125, 2, 23, "SmallText", CellTags->"corecell"], Cell[188049, 4297, 1468, 41, 104, "Input", CellTags->"corecell"], Cell[189520, 4340, 1171, 34, 85, "Input", CellTags->"corecell"], Cell[190694, 4376, 706, 18, 66, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[191437, 4399, 65, 1, 23, "SmallText", CellTags->"corecell"], Cell[191505, 4402, 647, 14, 119, "Text", CellTags->"corecell"], Cell[192155, 4418, 992, 28, 66, "Input", CellTags->"corecell"], Cell[193150, 4448, 1429, 40, 177, "Input", CellTags->"corecell"], Cell[194582, 4490, 728, 18, 66, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[195347, 4513, 71, 1, 23, "SmallText", CellTags->"corecell"], Cell[195421, 4516, 490, 8, 101, "Text", CellTags->"corecell"], Cell[195914, 4526, 272, 8, 27, "Input", CellTags->"corecell"], Cell[196189, 4536, 1131, 33, 85, "Input", CellTags->"corecell"], Cell[197323, 4571, 774, 18, 66, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[198134, 4594, 130, 2, 23, "SmallText", CellTags->"corecell"], Cell[198267, 4598, 13770, 275, 1016, "Input", CellTags->"corecell"], Cell[212040, 4875, 894, 20, 66, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[212971, 4900, 62, 1, 23, "SmallText", CellTags->"corecell"], Cell[213036, 4903, 1199, 34, 66, "Input", CellTags->"corecell"], Cell[214238, 4939, 809, 20, 66, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[215084, 4964, 49, 1, 23, "SmallText", CellTags->"corecell"], Cell[215136, 4967, 230, 5, 65, "Text", CellTags->"corecell"], Cell[215369, 4974, 957, 27, 66, "Input", CellTags->"corecell"], Cell[216329, 5003, 719, 17, 66, "Input", CellTags->"corecell"] }, Closed]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell[217109, 5027, 128, 3, 68, "Section", Evaluatable->False, CellTags->"corecell"], Cell[CellGroupData[{ Cell[217262, 5034, 211, 3, 39, "Subsection", CellTags->{"corecell", "opengroup"}], Cell[217476, 5039, 1658, 27, 67, "Text", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[219137, 5068, 1848, 28, 47, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[CellGroupData[{ Cell[221010, 5100, 154, 2, 36, "Subsubsection", CellTags->{"corecell", "opengroup"}], Cell[CellGroupData[{ Cell[221189, 5106, 121, 3, 25, "SmallText", CellTags->"corecell"], Cell[221313, 5111, 2543, 49, 360, "Text", CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[CellGroupData[{ Cell[223893, 5165, 118, 3, 25, "SmallText", CellTags->"corecell"], Cell[224014, 5170, 2659, 62, 443, "Text", CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[226688, 5235, 1311, 30, 196, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[CellGroupData[{ Cell[228024, 5269, 19951, 357, 19, "Input", Evaluatable->False, CellOpen->False, CellTags->{ "buttoncell", "corecell", "differentacrossnotebooks", "notopen"}], Cell[247978, 5628, 4886, 109, 41, "Output", CellOpen->True, CellTags->{"buttoncell", "corecell", "differentacrossnotebooks", "notopen"}] }, {2}]], Cell[252876, 5740, 2877, 67, 142, "Input", CellTags->{ "corecell", "differentacrossnotebooks", "unique_trajectoryspecs"}] }, Open ]], Cell[CellGroupData[{ Cell[255790, 5812, 72, 1, 36, "Subsubsection", CellTags->"corecell"], Cell[255865, 5815, 1006, 18, 157, "Text", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[256874, 5835, 2173, 43, 123, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[259050, 5880, 175, 4, 27, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[259262, 5889, 70, 1, 30, "Subsubsection", CellTags->"corecell"], Cell[259335, 5892, 3142, 74, 455, "Text", CellTags->"corecell"], Cell[262480, 5968, 1030, 23, 85, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[263547, 5996, 199, 3, 30, "Subsubsection", CellTags->"corecell"], Cell[263749, 6001, 2069, 32, 247, "Text", CellTags->"corecell"], Cell[265821, 6035, 333, 7, 47, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[266191, 6047, 147, 2, 30, "Subsubsection", CellTags->"corecell"], Cell[266341, 6051, 2432, 49, 232, "Text", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[268776, 6102, 955, 20, 142, "Input", CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[CellGroupData[{ Cell[269768, 6127, 77, 1, 30, "Subsubsection", CellTags->"corecell"], Cell[269848, 6130, 4514, 75, 771, "Text", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[274365, 6207, 1243, 21, 173, "Text", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[275611, 6230, 2488, 42, 85, "Input", CellTags->"corecell"] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell[278148, 6278, 208, 3, 36, "Subsubsection", CellTags->{"corecell", "3Dexclusive"}], Cell[278359, 6283, 2075, 39, 231, "Text", CellTags->{"corecell", "3Dexclusive", "differentacrossnotebooks"}], Cell[280437, 6324, 1410, 30, 85, "Input", CellTags->{"3Dexclusive", "differentacrossnotebooks"}] }, Closed]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell[281908, 6361, 75, 2, 47, "Subtitle", CellTags->"corecell"], Cell[281986, 6365, 204, 5, 27, "Input", CellTags->"corecell"], Cell[CellGroupData[{ Cell[282215, 6374, 235, 4, 74, "Section", CellTags->{"corecell", "singlepopulation"}], Cell[282453, 6380, 2140, 58, 104, "Input", CellTags->{"corecell", "singlepopulation"}], Cell[CellGroupData[{ Cell[284618, 6442, 183, 3, 38, "Subsection", CellTags->{"corecell", "singlepopulation"}], Cell[284804, 6447, 3551, 51, 27, "Input", CellTags->{"corecell", "singlepopulation"}] }, Closed]], Cell[CellGroupData[{ Cell[288392, 6503, 214, 4, 38, "Subsection", CellTags->{"corecell", "singlepopulation"}], Cell[288609, 6509, 3736, 58, 66, "Input", CellTags->{"corecell", "singlepopulation"}] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[292394, 6573, 161, 3, 44, "Section", CellTags->"corecell"], Cell[CellGroupData[{ Cell[292580, 6580, 119, 2, 38, "Subsection", CellTags->"corecell"], Cell[292702, 6584, 3709, 57, 47, "Input", CellTags->{"corecell", "3Dexclusive"}], Cell[296414, 6643, 4651, 84, 180, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[301068, 6729, 8253, 168, 503, "Input", CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[CellGroupData[{ Cell[309358, 6902, 186, 3, 38, "Subsection", CellTags->"corecell"], Cell[309547, 6907, 2234, 40, 104, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[311818, 6952, 188, 3, 30, "Subsection", CellTags->"corecell"], Cell[312009, 6957, 2199, 41, 123, "Input", CellTags->"corecell"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[314257, 7004, 149, 3, 44, "Section", CellTags->"corecell"], Cell[CellGroupData[{ Cell[314431, 7011, 166, 3, 38, "Subsection", CellTags->"corecell"], Cell[CellGroupData[{ Cell[314622, 7018, 464, 9, 47, "Text", CellTags->"corecell"], Cell[315089, 7029, 5139, 111, 351, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[320231, 7142, 2612, 43, 66, "Input", CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[CellGroupData[{ Cell[322880, 7190, 685, 13, 83, "Text", CellTags->"corecell"], Cell[323568, 7205, 5822, 128, 446, "Input", CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[CellGroupData[{ Cell[329427, 7338, 198, 3, 26, "Text", CellTags->"corecell"], Cell[329628, 7343, 8658, 209, 674, "Input", CellTags->{"differentacrossnotebooks", "corecell"}] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[338335, 7558, 172, 3, 38, "Subsection", CellTags->"corecell"], Cell[338510, 7563, 4514, 105, 389, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[343027, 7670, 4733, 104, 408, "Input", CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[CellGroupData[{ Cell[347797, 7779, 159, 3, 30, "Subsection", CellTags->"corecell"], Cell[347959, 7784, 8605, 182, 484, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[356567, 7968, 8331, 175, 446, "Input", CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[364947, 8149, 72, 1, 44, "Section", CellTags->"corecell"], Cell[CellGroupData[{ Cell[365044, 8154, 93, 1, 29, "Text"], Cell[365140, 8157, 668, 12, 47, "Input", CellTags->"corecell"], Cell[365811, 8171, 14859, 257, 541, "Input", CellTags->"corecell"], Cell[380673, 8430, 19502, 391, 1016, "Input", CellTags->"corecell"], Cell[400178, 8823, 1713, 33, 66, "Input", CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[CellGroupData[{ Cell[401928, 8861, 61, 1, 29, "Text", CellTags->"corecell"], Cell[401992, 8864, 4245, 65, 47, "Input", CellTags->"corecell"], Cell[406240, 8931, 7112, 140, 446, "Input", CellTags->"corecell"], Cell[413355, 9073, 5938, 104, 218, "Input", CellTags->{"corecell", "differentacrossnotebooks"}], Cell[419296, 9179, 8585, 166, 598, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[427918, 9350, 64, 1, 26, "Text", CellTags->"corecell"], Cell[427985, 9353, 2555, 64, 218, "Input", CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[CellGroupData[{ Cell[430577, 9422, 77, 1, 26, "Text", CellTags->"corecell"], Cell[430657, 9425, 13075, 278, 1282, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[443769, 9708, 79, 1, 26, "Text", CellTags->"corecell"], Cell[443851, 9711, 3668, 69, 256, "Input", CellTags->{"corecell", "differentacrossnotebooks"}] }, Closed]], Cell[CellGroupData[{ Cell[447556, 9785, 154, 3, 26, "Text", CellTags->"corecell"], Cell[447713, 9790, 4602, 93, 294, "Input", CellTags->"corecell"] }, Closed]], Cell[CellGroupData[{ Cell[452352, 9888, 152, 2, 26, "Text"], Cell[452507, 9892, 2511, 74, 294, "Input", CellTags->"corecell"] }, Closed]] }, Closed]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell[455091, 9974, 137, 2, 47, "Subtitle"], Cell[CellGroupData[{ Cell[455253, 9980, 167, 3, 74, "Section", CellTags->"initcell"], Cell[CellGroupData[{ Cell[455445, 9987, 85, 1, 38, "Subsection", CellTags->"initcell"], Cell[CellGroupData[{ Cell[455555, 9992, 323, 5, 36, "Subsubsection", CellTags->"initcell"], Cell[455881, 9999, 2022, 33, 85, "Input", CellTags->{"initcell", "differentacrossnotebooks"}], Cell[457906, 10034, 3170, 75, 142, "Input", CellTags->"initcell"] }, Closed]], Cell[CellGroupData[{ Cell[461113, 10114, 193, 3, 36, "Subsubsection", CellTags->"initcell"], Cell[461309, 10119, 2455, 63, 218, "Input", CellTags->"initcell"], Cell[463767, 10184, 2570, 66, 275, "Input", CellTags->"initcell"], Cell[466340, 10252, 5355, 117, 484, "Input", CellTags->"initcell"], Cell[471698, 10371, 3016, 78, 294, "Input", CellTags->"initcell"], Cell[474717, 10451, 962, 26, 66, "Input", CellTags->"initcell"], Cell[475682, 10479, 1802, 44, 199, "Input", CellTags->"initcell"], Cell[477487, 10525, 3302, 75, 389, "Input", CellTags->"initcell"], Cell[480792, 10602, 1914, 46, 180, "Input", CellTags->"initcell"], Cell[482709, 10650, 3327, 84, 370, "Input", CellTags->"initcell"], Cell[486039, 10736, 1112, 31, 85, "Input", CellTags->"initcell"], Cell[487154, 10769, 1154, 31, 85, "Input", CellTags->"initcell"], Cell[488311, 10802, 7480, 162, 788, "Input", CellTags->"initcell"], Cell[495794, 10966, 3377, 80, 180, "Input", CellTags->"initcell"] }, Closed]], Cell[CellGroupData[{ Cell[499208, 11051, 246, 4, 30, "Subsubsection", CellTags->"initcell"], Cell[499457, 11057, 2456, 64, 237, "Input", CellTags->"initcell"], Cell[501916, 11123, 2836, 65, 123, "Input", CellTags->"initcell"], Cell[504755, 11190, 2855, 58, 104, "Input", CellTags->"initcell"], Cell[507613, 11250, 4221, 88, 237, "Input", CellTags->"initcell"], Cell[511837, 11340, 13402, 211, 313, "Input", CellTags->"initcell"] }, Closed]], Cell[CellGroupData[{ Cell[525276, 11556, 253, 4, 30, "Subsubsection", CellTags->"initcell"], Cell[525532, 11562, 2484, 56, 104, "Input", CellTags->"initcell"], Cell[528019, 11620, 11218, 224, 788, "Input", CellTags->"initcell"], Cell[539240, 11846, 9634, 205, 693, "Input", CellTags->"initcell"] }, Closed]], Cell[CellGroupData[{ Cell[548911, 12056, 174, 3, 30, "Subsubsection", CellTags->"initcell"], Cell[CellGroupData[{ Cell[549110, 12063, 332, 7, 47, "Text", CellTags->{"initcell", "differentacrossnotebooks"}], Cell[549445, 12072, 5262, 145, 569, "Input", CellTags->{"initcell", "differentacrossnotebooks"}], Cell[554710, 12219, 1995, 46, 85, "Input", CellTags->"initcell"], Cell[556708, 12267, 5051, 125, 465, "Input", CellTags->{"initcell", "differentacrossnotebooks"}] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[561808, 12398, 343, 5, 30, "Subsubsection", CellTags->"initcell"], Cell[562154, 12405, 6833, 144, 579, "Input", CellTags->{"initcell", "3Dexclusive"}], Cell[568990, 12551, 6345, 134, 522, "Input", CellTags->{"initcell", "3Dexclusive"}] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[575384, 12691, 139, 2, 30, "Subsection", CellTags->"initcell"], Cell[CellGroupData[{ Cell[575548, 12697, 164, 2, 36, "Subsubsection", CellTags->"initcell"], Cell[575715, 12701, 19160, 385, 1016, "Input", CellTags->"initcell"], Cell[594878, 13088, 18188, 374, 1491, "Input", CellTags->"initcell"] }, Closed]], Cell[CellGroupData[{ Cell[613103, 13467, 206, 5, 30, "Subsubsection", CellTags->"initcell"], Cell[613312, 13474, 32172, 623, 2156, "Input", CellTags->"initcell"], Cell[645487, 14099, 25787, 462, 1567, "Input", CellTags->"initcell"] }, Closed]], Cell[CellGroupData[{ Cell[671311, 14566, 76, 1, 30, "Subsubsection", CellTags->"initcell"], Cell[671390, 14569, 3819, 72, 465, "Input", CellTags->"initcell"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[675258, 14647, 119, 2, 38, "Subsection", CellTags->"initcell"], Cell[CellGroupData[{ Cell[675402, 14653, 212, 3, 36, "Subsubsection", CellTags->"initcell"], Cell[675617, 14658, 23030, 460, 1073, "Input", CellTags->"initcell"] }, Closed]], Cell[CellGroupData[{ Cell[698684, 15123, 325, 5, 30, "Subsubsection", CellTags->"initcell"], Cell[699012, 15130, 17675, 343, 1757, "Input", CellTags->"initcell"] }, Closed]], Cell[CellGroupData[{ Cell[716724, 15478, 307, 5, 30, "Subsubsection", CellTags->"initcell"], Cell[717034, 15485, 23316, 465, 1016, "Input", CellTags->"initcell"], Cell[740353, 15952, 4521, 95, 465, "Input", CellTags->"initcell"] }, Closed]], Cell[CellGroupData[{ Cell[744911, 16052, 288, 4, 30, "Subsubsection", CellTags->"initcell"], Cell[745202, 16058, 15914, 320, 1738, "Input", CellTags->"initcell"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[761165, 16384, 176, 3, 30, "Subsection", CellTags->"initcell"], Cell[CellGroupData[{ Cell[761366, 16391, 230, 4, 36, "Subsubsection", CellTags->"initcell"], Cell[761599, 16397, 10022, 191, 1130, "Input", CellTags->"initcell"], Cell[771624, 16590, 8368, 123, 104, "Input", CellTags->"initcell"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[780041, 16719, 175, 3, 30, "Subsection", CellTags->"initcell"], Cell[780219, 16724, 16310, 399, 2061, "Input", CellTags->"initcell"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[796578, 17129, 214, 4, 44, "Section", CellOpen->True], Cell[CellGroupData[{ Cell[796817, 17137, 168, 2, 38, "Subsection"], Cell[796988, 17141, 2549, 61, 294, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[799574, 17207, 204, 3, 30, "Subsection"], Cell[799781, 17212, 1803, 40, 180, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[801621, 17257, 150, 2, 30, "Subsection"], Cell[801774, 17261, 3922, 89, 465, "Input"] }, Closed]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[805757, 17357, 117, 2, 47, "Subtitle", CellTags->"opengroup"], Cell[805877, 17361, 2167, 45, 351, "Text", Evaluatable->False, CellTags->{"finalcell", "buttoncell", "opengroup"}] }, Open ]] } ] *) (* End of internal cache information *)