(* 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[ 6301, 174] NotebookOptionsPosition[ 5438, 141] NotebookOutlinePosition[ 5983, 162] CellTagsIndexPosition[ 5940, 159] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Initialization", "Section", CellChangeTimes->{{3.542788535115634*^9, 3.542788538398822*^9}}], Cell["\<\ Inputing our values for ammo and potions [a & p respectively] Time in Minutes, Capacity in Oz and Cost in gp/projectile. ~ Average hunting resources ~\ \>", "Text", CellChangeTimes->{{3.5427885420400305`*^9, 3.542788563572262*^9}, { 3.5427887682739697`*^9, 3.5427888251452227`*^9}, {3.5454834544639406`*^9, 3.5454834612811527`*^9}, {3.549764160172293*^9, 3.5497641606823225`*^9}, { 3.5497643288219395`*^9, 3.5497643498311415`*^9}, {3.5497643915675287`*^9, 3.5497644384282084`*^9}, {3.549764549420557*^9, 3.549764556390956*^9}, { 3.549764592785037*^9, 3.5497646403117557`*^9}, 3.549764693849818*^9}], Cell[BoxData[{ FormBox[ RowBox[{ RowBox[{"TimeSpent", " ", "=", " ", "20"}], ";"}], TraditionalForm], "\[IndentingNewLine]", FormBox[ RowBox[{ RowBox[{"aSpent", " ", "=", " ", "300"}], ";", " ", RowBox[{"aCost", " ", "=", " ", "007"}], ";", RowBox[{"aMass", "=", "0.9"}], ";"}], TraditionalForm], "\n", FormBox[ RowBox[{ RowBox[{"pSpent", " ", "=", " ", "070"}], ";", RowBox[{"pCost", "=", " ", "050"}], ";", " ", RowBox[{"pMass", "=", "2.7"}], ";"}], TraditionalForm], "\n", FormBox[ RowBox[{ RowBox[{"Cap", "=", "900"}], " ", ";"}], TraditionalForm]}], "Input", CellChangeTimes->{{3.542788566979457*^9, 3.5427886100769215`*^9}, { 3.54278873960233*^9, 3.5427887861729937`*^9}, {3.542788835720828*^9, 3.5427889300792246`*^9}, {3.5427890696642084`*^9, 3.5427890809408536`*^9}, 3.5427894126718273`*^9, {3.5427901530191727`*^9, 3.5427901559083385`*^9}, { 3.545481669965033*^9, 3.545481672122156*^9}, {3.5454832241139355`*^9, 3.545483225549138*^9}, {3.5454834044502525`*^9, 3.5454834050430536`*^9}, { 3.5454834424363194`*^9, 3.545483446367526*^9}, {3.5455594613685184`*^9, 3.5455594645509243`*^9}, {3.5455595363246436`*^9, 3.5455595420654535`*^9}, {3.5455596160823793`*^9, 3.5455596284532013`*^9}, {3.5455599428625336`*^9, 3.545559944640937*^9}, { 3.5455600043346395`*^9, 3.5455600204114647`*^9}, {3.5497643665921*^9, 3.549764381118931*^9}, 3.5497644441075335`*^9, {3.5497644937093706`*^9, 3.5497645729669037`*^9}, {3.5497646147282925`*^9, 3.5497646157153487`*^9}, 3.5497646487192364`*^9, {3.549764695835932*^9, 3.5497647071475782`*^9}, { 3.549765389625614*^9, 3.5497654509021187`*^9}, {3.5497654858651185`*^9, 3.5497654908854055`*^9}, {3.549768145813259*^9, 3.5497681679605255`*^9}, { 3.549768406918193*^9, 3.549768430691553*^9}}], Cell[BoxData[""], "Input", CellChangeTimes->{{3.5497681431001034`*^9, 3.549768143474125*^9}, 3.549768173874864*^9}] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Computing the Linear Programming Problem\ \>", "Section", CellChangeTimes->{{3.542788956602742*^9, 3.5427889723136406`*^9}}], Cell["\<\ Constraints in plain text:\[LineSeparator]we seek to maxmize used small \ \[OpenCurlyDoubleQuote]stone\[CloseCurlyDoubleQuote]s while manintianing that \ we don\[CloseCurlyQuote]t run out of \[OpenCurlyDoubleQuote]fish\ \[CloseCurlyDoubleQuote] before breaking all small \ \[OpenCurlyDoubleQuote]stone\[CloseCurlyDoubleQuote]s\[LineSeparator]All that \ while having a total Capacity of \[OpenCurlyDoubleQuote]Cap\ \[CloseCurlyDoubleQuote].\ \>", "Text", CellChangeTimes->{{3.542788977708949*^9, 3.542789137244074*^9}}], Cell[CellGroupData[{ Cell[BoxData[ FormBox[ RowBox[{"Maximize", "[", RowBox[{ RowBox[{"{", RowBox[{"PB", ",", RowBox[{"PB", "\[LessEqual]", RowBox[{"POT", "*", RowBox[{"aSpent", "/", "pSpent"}]}]}], ",", RowBox[{ RowBox[{ RowBox[{"PB", "*", "aMass"}], "+", RowBox[{"POT", " ", "pMass"}]}], "<", "Cap"}]}], "}"}], ",", RowBox[{"{", RowBox[{"PB", ",", "POT"}], "}"}]}], "]"}], TraditionalForm]], "Input", CellChangeTimes->{{3.542789143422427*^9, 3.542789281554328*^9}, 3.542789421541335*^9, {3.5497655366190214`*^9, 3.549765566875752*^9}, { 3.5497679618217354`*^9, 3.5497681309814105`*^9}, {3.5497683876080885`*^9, 3.549768402290929*^9}, {3.5497684455194016`*^9, 3.549768458317133*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"4117.647058823529`", ",", RowBox[{"{", RowBox[{ RowBox[{"PB", "\[Rule]", "588.235294117647`"}], ",", RowBox[{"POT", "\[Rule]", "137.2549019607843`"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{ 3.5497681864095807`*^9, {3.5497683893251867`*^9, 3.549768451884765*^9}}] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"Spent", " ", "per", " ", "1", " ", "hour"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"to", " ", "come"}], " ", "*)"}], "\[IndentingNewLine]"}]], "Input", CellChangeTimes->{{3.5497681825783615`*^9, 3.5497683067694654`*^9}}] }, Open ]] }, ScreenStyleEnvironment->"Working", WindowSize->{760, 589}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, PrintingCopies->1, PrintingPageRange->{32000, 32000}, PrintingOptions->{"Magnification"->1., "PaperOrientation"->"Portrait", "PaperSize"->{583.1999999999999, 829.8}}, FrontEndVersion->"8.0 for Microsoft Windows (64-bit) (February 23, 2011)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[579, 22, 99, 1, 71, "Section"], Cell[681, 25, 627, 11, 83, "Text"], Cell[1311, 38, 1832, 34, 88, "Input"], Cell[3146, 74, 120, 2, 31, InheritFromParent] }, Open ]], Cell[CellGroupData[{ Cell[3303, 81, 135, 3, 71, "Section"], Cell[3441, 86, 529, 9, 65, "Text"], Cell[CellGroupData[{ Cell[3995, 99, 758, 18, 30, "Input"], Cell[4756, 119, 337, 9, 30, "Output"] }, Open ]], Cell[5108, 131, 314, 7, 72, InheritFromParent] }, Open ]] } ] *) (* End of internal cache information *)