Advertisement
a3f

[Mathematica/Tibia] Optimize Stones Skilling

a3f
Jun 27th, 2012
370
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.20 KB | None | 0 0
  1. (* Content-type: application/vnd.wolfram.mathematica *)
  2.  
  3. (*** Wolfram Notebook File ***)
  4. (* http://www.wolfram.com/nb *)
  5.  
  6. (* CreatedBy='Mathematica 8.0' *)
  7.  
  8. (*CacheID: 234*)
  9. (* Internal cache information:
  10. NotebookFileLineBreakTest
  11. NotebookFileLineBreakTest
  12. NotebookDataPosition[       157,          7]
  13. NotebookDataLength[      4969,        149]
  14. NotebookOptionsPosition[      4200,        118]
  15. NotebookOutlinePosition[      4745,        139]
  16. CellTagsIndexPosition[      4702,        136]
  17. WindowFrame->Normal*)
  18.  
  19. (* Beginning of Notebook Content *)
  20. Notebook[{
  21.  
  22. Cell[CellGroupData[{
  23. Cell["Initialization", "Section",
  24.  CellChangeTimes->{{3.542788535115634*^9, 3.542788538398822*^9}}],
  25.  
  26. Cell["\<\
  27. Inputing our values for projectile and food (this case: fish [f], stone [s])
  28. Time in Hours and Capacity in Oz. //mosaada and andre only so far\
  29. \>", "Text",
  30.  CellChangeTimes->{{3.5427885420400305`*^9, 3.542788563572262*^9}, {
  31.   3.5427887682739697`*^9, 3.5427888251452227`*^9}, {3.5454834544639406`*^9,
  32.   3.5454834612811527`*^9}}],
  33.  
  34. Cell[BoxData[{
  35.  FormBox[
  36.   RowBox[{
  37.    RowBox[{"sTime", "=",
  38.     FractionBox["1", "60"]}], ";",
  39.    RowBox[{"sMass", "=", "3.60"}], ";"}], TraditionalForm], "\n",
  40.  FormBox[
  41.   RowBox[{
  42.    RowBox[{"fTime", "=",
  43.     RowBox[{
  44.      FractionBox["264",
  45.       SuperscriptBox["60", "2"]], " ", "/", "2"}]}], ";",
  46.    RowBox[{"fMass", "=", "0.20"}], ";"}], TraditionalForm], "\n",
  47.  FormBox[
  48.   RowBox[{
  49.    RowBox[{"Cap", "=", "8650"}], " ", ";"}], TraditionalForm]}], "Input",
  50.  CellChangeTimes->{{3.542788566979457*^9, 3.5427886100769215`*^9}, {
  51.    3.54278873960233*^9, 3.5427887861729937`*^9}, {3.542788835720828*^9,
  52.    3.5427889300792246`*^9}, {3.5427890696642084`*^9, 3.5427890809408536`*^9},
  53.    3.5427894126718273`*^9, {3.5427901530191727`*^9, 3.5427901559083385`*^9}, {
  54.    3.545481669965033*^9, 3.545481672122156*^9}, {3.5454832241139355`*^9,
  55.    3.545483225549138*^9}, {3.5454834044502525`*^9, 3.5454834050430536`*^9}, {
  56.    3.5454834424363194`*^9, 3.545483446367526*^9}, {3.5455594613685184`*^9,
  57.    3.5455594645509243`*^9}, {3.5455595363246436`*^9,
  58.    3.5455595420654535`*^9}, {3.5455596160823793`*^9,
  59.    3.5455596284532013`*^9}, {3.5455599428625336`*^9, 3.545559944640937*^9}, {
  60.    3.5455600043346395`*^9, 3.5455600204114647`*^9}, {3.5497737474901805`*^9,
  61.    3.549773748753253*^9}}]
  62. }, Open  ]],
  63.  
  64. Cell[CellGroupData[{
  65.  
  66. Cell["\<\
  67. Computing the Linear Programming Problem\
  68. \>", "Section",
  69.  CellChangeTimes->{{3.542788956602742*^9, 3.5427889723136406`*^9}}],
  70.  
  71. Cell["\<\
  72. Constraints in plain text:\[LineSeparator]we seek to maxmize used small \
  73. \[OpenCurlyDoubleQuote]stone\[CloseCurlyDoubleQuote]s while manintianing that \
  74. we don\[CloseCurlyQuote]t run out of \[OpenCurlyDoubleQuote]fish\
  75. \[CloseCurlyDoubleQuote] before breaking all small \
  76. \[OpenCurlyDoubleQuote]stone\[CloseCurlyDoubleQuote]s\[LineSeparator]All that \
  77. while having a total Capacity of \[OpenCurlyDoubleQuote]Cap\
  78. \[CloseCurlyDoubleQuote].\
  79. \>", "Text",
  80.  CellChangeTimes->{{3.542788977708949*^9, 3.542789137244074*^9}}],
  81.  
  82. Cell[CellGroupData[{
  83.  
  84. Cell[BoxData[
  85.  FormBox[
  86.   RowBox[{"Maximize", "[",
  87.    RowBox[{
  88.     RowBox[{"{",
  89.      RowBox[{
  90.       RowBox[{"s", " ", "sTime"}], ",",
  91.       RowBox[{
  92.        RowBox[{"s", " ", "sTime"}], "\[LessEqual]",
  93.        RowBox[{"f", " ", "fTime"}]}], ",",
  94.       RowBox[{
  95.        RowBox[{
  96.         RowBox[{"f", " ", "fMass"}], "+",
  97.         RowBox[{"s", " ", "sMass"}]}], "<", "Cap"}]}], "}"}], ",",
  98.     RowBox[{"{",
  99.      RowBox[{"s", ",", "f"}], "}"}]}], "]"}], TraditionalForm]], "Input",
  100.  CellChangeTimes->{{3.542789143422427*^9, 3.542789281554328*^9},
  101.    3.542789421541335*^9}],
  102.  
  103. Cell[BoxData[
  104.  RowBox[{"{",
  105.   RowBox[{"39.059934318555`", ",",
  106.    RowBox[{"{",
  107.     RowBox[{
  108.      RowBox[{"s", "\[Rule]", "2343.5960591133003`"}], ",",
  109.      RowBox[{"f", "\[Rule]", "1065.270935960591`"}]}], "}"}]}],
  110.   "}"}]], "Output",
  111.  CellChangeTimes->{{3.542789285369546*^9, 3.542789309927951*^9},
  112.    3.5427894253595533`*^9, 3.542790189016232*^9, 3.545481685401916*^9,
  113.    3.5454834692995663`*^9, 3.545559557609478*^9, 3.5455596237107925`*^9,
  114.    3.5455599501809464`*^9, {3.5455599900442147`*^9, 3.545560026963476*^9},
  115.    3.549773753394518*^9}]
  116. }, Open  ]]
  117. }, Open  ]]
  118. },
  119. ScreenStyleEnvironment->"Working",
  120. WindowSize->{760, 589},
  121. WindowMargins->{{0, Automatic}, {Automatic, 0}},
  122. PrintingCopies->1,
  123. PrintingPageRange->{32000, 32000},
  124. PrintingOptions->{"Magnification"->1.,
  125. "PaperOrientation"->"Portrait",
  126. "PaperSize"->{583.1999999999999, 829.8}},
  127. FrontEndVersion->"8.0 for Microsoft Windows (64-bit) (February 23, 2011)",
  128. StyleDefinitions->"Default.nb"
  129. ]
  130. (* End of Notebook Content *)
  131.  
  132. (* Internal cache information *)
  133. (*CellTagsOutline
  134. CellTagsIndex->{}
  135. *)
  136. (*CellTagsIndex
  137. CellTagsIndex->{}
  138. *)
  139. (*NotebookFileOutline
  140. Notebook[{
  141. Cell[CellGroupData[{
  142. Cell[579, 22, 99, 1, 71, "Section"],
  143. Cell[681, 25, 340, 6, 47, "Text"],
  144. Cell[1024, 33, 1289, 27, 110, "Input"]
  145. }, Open  ]],
  146. Cell[CellGroupData[{
  147. Cell[2350, 65, 135, 3, 71, "Section"],
  148. Cell[2488, 70, 529, 9, 65, "Text"],
  149. Cell[CellGroupData[{
  150. Cell[3042, 83, 574, 17, 30, "Input"],
  151. Cell[3619, 102, 553, 12, 30, "Output"]
  152. }, Open  ]]
  153. }, Open  ]]
  154. }
  155. ]
  156. *)
  157.  
  158. (* End of internal cache information *)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement