Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (* 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[ 4969, 149]
- NotebookOptionsPosition[ 4200, 118]
- NotebookOutlinePosition[ 4745, 139]
- CellTagsIndexPosition[ 4702, 136]
- WindowFrame->Normal*)
- (* Beginning of Notebook Content *)
- Notebook[{
- Cell[CellGroupData[{
- Cell["Initialization", "Section",
- CellChangeTimes->{{3.542788535115634*^9, 3.542788538398822*^9}}],
- Cell["\<\
- Inputing our values for projectile and food (this case: fish [f], stone [s])
- Time in Hours and Capacity in Oz. //mosaada and andre only so far\
- \>", "Text",
- CellChangeTimes->{{3.5427885420400305`*^9, 3.542788563572262*^9}, {
- 3.5427887682739697`*^9, 3.5427888251452227`*^9}, {3.5454834544639406`*^9,
- 3.5454834612811527`*^9}}],
- Cell[BoxData[{
- FormBox[
- RowBox[{
- RowBox[{"sTime", "=",
- FractionBox["1", "60"]}], ";",
- RowBox[{"sMass", "=", "3.60"}], ";"}], TraditionalForm], "\n",
- FormBox[
- RowBox[{
- RowBox[{"fTime", "=",
- RowBox[{
- FractionBox["264",
- SuperscriptBox["60", "2"]], " ", "/", "2"}]}], ";",
- RowBox[{"fMass", "=", "0.20"}], ";"}], TraditionalForm], "\n",
- FormBox[
- RowBox[{
- RowBox[{"Cap", "=", "8650"}], " ", ";"}], 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.5497737474901805`*^9,
- 3.549773748753253*^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[{
- RowBox[{"s", " ", "sTime"}], ",",
- RowBox[{
- RowBox[{"s", " ", "sTime"}], "\[LessEqual]",
- RowBox[{"f", " ", "fTime"}]}], ",",
- RowBox[{
- RowBox[{
- RowBox[{"f", " ", "fMass"}], "+",
- RowBox[{"s", " ", "sMass"}]}], "<", "Cap"}]}], "}"}], ",",
- RowBox[{"{",
- RowBox[{"s", ",", "f"}], "}"}]}], "]"}], TraditionalForm]], "Input",
- CellChangeTimes->{{3.542789143422427*^9, 3.542789281554328*^9},
- 3.542789421541335*^9}],
- Cell[BoxData[
- RowBox[{"{",
- RowBox[{"39.059934318555`", ",",
- RowBox[{"{",
- RowBox[{
- RowBox[{"s", "\[Rule]", "2343.5960591133003`"}], ",",
- RowBox[{"f", "\[Rule]", "1065.270935960591`"}]}], "}"}]}],
- "}"}]], "Output",
- CellChangeTimes->{{3.542789285369546*^9, 3.542789309927951*^9},
- 3.5427894253595533`*^9, 3.542790189016232*^9, 3.545481685401916*^9,
- 3.5454834692995663`*^9, 3.545559557609478*^9, 3.5455596237107925`*^9,
- 3.5455599501809464`*^9, {3.5455599900442147`*^9, 3.545560026963476*^9},
- 3.549773753394518*^9}]
- }, Open ]]
- }, 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, 340, 6, 47, "Text"],
- Cell[1024, 33, 1289, 27, 110, "Input"]
- }, Open ]],
- Cell[CellGroupData[{
- Cell[2350, 65, 135, 3, 71, "Section"],
- Cell[2488, 70, 529, 9, 65, "Text"],
- Cell[CellGroupData[{
- Cell[3042, 83, 574, 17, 30, "Input"],
- Cell[3619, 102, 553, 12, 30, "Output"]
- }, Open ]]
- }, Open ]]
- }
- ]
- *)
- (* End of internal cache information *)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement