(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 11.2' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 12944, 322] NotebookOptionsPosition[ 11709, 299] NotebookOutlinePosition[ 12049, 314] CellTagsIndexPosition[ 12006, 311] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[ RowBox[{"Clear", "[", RowBox[{ "k1", ",", "k2", ",", "k3", ",", "k4", ",", "k5", ",", " ", "pP", ",", " ", "pT", ",", " ", "d"}], "]"}]], "Input", CellChangeTimes->{{3.7180902976435823`*^9, 3.7180903174915*^9}, { 3.7180905421953487`*^9, 3.7180905460995893`*^9}, {3.718106511950369*^9, 3.718106512092639*^9}, {3.718522079923431*^9, 3.718522084242169*^9}},ExpressionUUID->"16736113-e798-4c1c-87fa-\ 8a198f63a309"], Cell[BoxData[ RowBox[{ RowBox[{"System", " ", "=", " ", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"DS", "=", RowBox[{ RowBox[{ RowBox[{"-", "k1"}], " ", "T", " ", "S"}], " ", "+", " ", RowBox[{"k2", " ", "TS"}], " ", "-", RowBox[{"k3", " ", "P", " ", "S"}], " ", "+", RowBox[{"k4", " ", "PS"}], " ", "-", RowBox[{"k1", " ", "Tc", " ", "S"}], " ", "+", " ", RowBox[{"k2", " ", "TcS"}], " ", "+", " ", RowBox[{"d", " ", RowBox[{"(", RowBox[{"TS", "+", "PS", "+", "TcS", "+", "TSP", "+", "TcSP"}], ")"}]}]}]}], ",", "\[IndentingNewLine]", RowBox[{"DT", "=", RowBox[{ RowBox[{ RowBox[{"-", "k1"}], " ", "T", " ", "S"}], " ", "+", " ", RowBox[{"k2", " ", "TS"}], " ", "-", RowBox[{"k1", " ", "T", " ", "PS"}], " ", "+", RowBox[{"k2", " ", "TSP"}], "+", "pT", "-", RowBox[{"d", " ", "T"}]}]}], ",", "\[IndentingNewLine]", RowBox[{"DP", "=", RowBox[{ RowBox[{ RowBox[{"-", "k3"}], " ", "P", " ", "S"}], " ", "+", " ", RowBox[{"k4", " ", "PS"}], " ", "-", RowBox[{"k3", " ", "P", " ", "TS"}], " ", "+", " ", RowBox[{"k4", " ", "TSP"}], " ", "-", " ", RowBox[{"k3", " ", "P", " ", "TcS"}], " ", "+", " ", RowBox[{"k4", " ", "TcSP"}], "+", "pP", "-", RowBox[{"d", " ", "P"}]}]}], ",", "\[IndentingNewLine]", RowBox[{"DTS", "=", RowBox[{ RowBox[{ RowBox[{"+", "k1"}], " ", "T", " ", "S"}], " ", "-", RowBox[{"k2", " ", "TS"}], " ", "-", RowBox[{"k3", " ", "P", " ", "TS"}], " ", "+", " ", RowBox[{"k4", " ", "TSP"}], "-", RowBox[{"d", " ", "TS"}]}]}], ",", "\[IndentingNewLine]", RowBox[{"DPS", "=", RowBox[{ RowBox[{ RowBox[{"+", "k3"}], " ", "P", " ", "S"}], " ", "-", RowBox[{"k4", " ", "PS"}], " ", "-", RowBox[{"k1", " ", "T", " ", "PS"}], " ", "+", RowBox[{"k2", " ", "TSP"}], " ", "-", RowBox[{"k1", " ", "Tc", " ", "PS"}], " ", "+", RowBox[{"k2", " ", "TcSP"}], "-", RowBox[{"d", " ", "PS"}]}]}], ",", "\[IndentingNewLine]", RowBox[{"DTSP", "=", RowBox[{ RowBox[{ RowBox[{"+", "k1"}], " ", "T", " ", "PS"}], " ", "-", RowBox[{"k2", " ", "TSP"}], " ", "+", RowBox[{"k3", " ", "P", " ", "TS"}], " ", "-", RowBox[{"k4", " ", "TSP"}], " ", "-", RowBox[{"k5", " ", "TSP"}], "-", RowBox[{"d", " ", "TSP"}]}]}], ",", "\[IndentingNewLine]", RowBox[{"DTcSP", "=", RowBox[{ RowBox[{ RowBox[{"+", "k1"}], " ", "Tc", " ", "PS"}], " ", "-", RowBox[{"k2", " ", "TcSP"}], " ", "+", " ", RowBox[{"k3", " ", "P", " ", "TcS"}], " ", "-", RowBox[{"k4", " ", "TcSP"}], " ", "+", RowBox[{"k5", " ", "TSP"}], "-", RowBox[{"d", " ", "TcSP"}]}]}], ",", "\[IndentingNewLine]", RowBox[{"DTcS", " ", "=", " ", RowBox[{ RowBox[{ RowBox[{"+", "k1"}], " ", "Tc", " ", "S"}], " ", "-", RowBox[{"k2", " ", "TcS"}], " ", "-", RowBox[{"k3", " ", "TcS", " ", "P"}], " ", "+", RowBox[{"k4", " ", "TcSP"}], " ", "-", RowBox[{"d", " ", "TcS"}]}]}], ",", "\[IndentingNewLine]", RowBox[{"DTc", " ", "=", RowBox[{ RowBox[{ RowBox[{"-", "k1"}], " ", "Tc", " ", "S"}], " ", "+", RowBox[{"k2", " ", "TcS"}], " ", "-", RowBox[{"k1", " ", "Tc", " ", "PS"}], " ", "+", RowBox[{"k2", " ", "TcSP"}], "-", RowBox[{"d", " ", "Tc"}]}]}], ",", "\[IndentingNewLine]", RowBox[{"DF", " ", "=", " ", RowBox[{ RowBox[{"k5", " ", "TSP"}], " ", "-", RowBox[{"d", " ", "F"}]}]}]}], "\[IndentingNewLine]", "}"}]}], ";"}]], "Input", CellChangeTimes->{{3.71801260762827*^9, 3.7180126411318903`*^9}, { 3.71801268350284*^9, 3.7180127026542387`*^9}, {3.718012806131282*^9, 3.718012930758841*^9}, {3.71801299695649*^9, 3.718013122574473*^9}, { 3.718013340951579*^9, 3.718013347974641*^9}, {3.718013387511984*^9, 3.7180134353699217`*^9}, {3.718013479052829*^9, 3.718013504380312*^9}, { 3.718013549422504*^9, 3.718013614912588*^9}, {3.718013710085277*^9, 3.7180137343890247`*^9}, {3.7180137789669456`*^9, 3.718013901323059*^9}, { 3.718024664654086*^9, 3.7180246675181723`*^9}, {3.718024714596184*^9, 3.718024725106557*^9}, {3.718025387503203*^9, 3.7180254828799477`*^9}, 3.718025519312546*^9, 3.718025551471047*^9, {3.718105945834485*^9, 3.7181059983649817`*^9}, {3.718106108818445*^9, 3.7181061108982153`*^9}, 3.718106239158045*^9, {3.718106288422781*^9, 3.718106312102459*^9}, { 3.718435928023245*^9, 3.7184360092409163`*^9}, {3.7184381737547693`*^9, 3.7184381770977707`*^9}, {3.7184416914061832`*^9, 3.7184417497109337`*^9}, {3.7184791905448647`*^9, 3.718479284901651*^9}, { 3.718480620509452*^9, 3.718480636217276*^9}, {3.718481646787418*^9, 3.718481647394528*^9}},ExpressionUUID->"ad959554-5deb-455f-963a-\ 1f4308bbbf9a"], Cell[BoxData[ RowBox[{ RowBox[{"Prepositions", " ", "=", " ", RowBox[{"{", "\[IndentingNewLine]", RowBox[{ RowBox[{"S", " ", "\[GreaterEqual]", " ", "0"}], ",", "\[IndentingNewLine]", RowBox[{"T", " ", "\[GreaterEqual]", " ", "0"}], ",", "\[IndentingNewLine]", RowBox[{"P", " ", "\[GreaterEqual]", " ", "0"}], ",", "\[IndentingNewLine]", RowBox[{"TS", " ", "\[GreaterEqual]", " ", "0"}], ",", "\[IndentingNewLine]", RowBox[{"PS", " ", "\[GreaterEqual]", " ", "0"}], ",", "\[IndentingNewLine]", RowBox[{"TPS", " ", "\[GreaterEqual]", " ", "0"}], ",", "\[IndentingNewLine]", RowBox[{"TcPS", " ", "\[GreaterEqual]", " ", "0"}], ",", "\[IndentingNewLine]", RowBox[{"TcS", " ", "\[GreaterEqual]", " ", "0"}], ",", "\[IndentingNewLine]", RowBox[{"Tc", " ", "\[GreaterEqual]", " ", "0"}], ",", "\[IndentingNewLine]", RowBox[{"F", " ", "\[GreaterEqual]", " ", "0"}], ",", "\[IndentingNewLine]", RowBox[{"k1", " ", "\[GreaterEqual]", " ", "0"}], ",", "\[IndentingNewLine]", RowBox[{"k2", " ", "\[GreaterEqual]", " ", "0"}], ",", "\[IndentingNewLine]", RowBox[{"k3", " ", "\[GreaterEqual]", " ", "0"}], ",", "\[IndentingNewLine]", RowBox[{"k4", " ", "\[GreaterEqual]", " ", "0"}], ",", "\[IndentingNewLine]", RowBox[{"k5", " ", "\[GreaterEqual]", " ", "0"}]}], "\[IndentingNewLine]", "}"}]}], ";"}]], "Input", CellChangeTimes->{{3.718090328256434*^9, 3.7180904100388308`*^9}, { 3.718090454813139*^9, 3.718090516323148*^9}, {3.718090636620866*^9, 3.7180906945830507`*^9}, {3.718106116145836*^9, 3.718106117822402*^9}, 3.718106236003748*^9},ExpressionUUID->"861953d7-42f1-4e6e-8d04-\ 2eb80a7167ae"], Cell[BoxData[ RowBox[{"Rulez1", " ", "=", " ", RowBox[{"{", RowBox[{ RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"System", "[", RowBox[{"[", "4", "]"}], "]"}], "\[Equal]", "0"}], ",", " ", "TS"}], "]"}], ",", RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"System", "[", RowBox[{"[", "5", "]"}], "]"}], "\[Equal]", "0"}], ",", "PS"}], "]"}], ",", RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"System", "[", RowBox[{"[", "8", "]"}], "]"}], "\[Equal]", "0"}], ",", "TcS"}], "]"}]}], "}"}]}]], "Input",ExpressionUUID->"eaf85294-4179-44ad-9107-\ ff76fb97c76c"], Cell[BoxData[ RowBox[{"Rulez2", " ", "=", " ", RowBox[{"Assuming", "[", RowBox[{"Prepositions", ",", " ", RowBox[{"FullSimplify", "[", RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"System", "[", RowBox[{"[", "6", "]"}], "]"}], "/.", "Rulez"}], ")"}], "\[Equal]", "0"}], ",", " ", "TSP"}], "]"}], "]"}]}], "]"}]}]], "Input",Expressio\ nUUID->"f8e1f1a6-132b-4e4e-aa15-7fffe2302536"], Cell[BoxData[ RowBox[{"Rulez3", " ", "=", " ", RowBox[{"Assuming", "[", RowBox[{"Prepositions", ",", RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"System", "[", RowBox[{"[", "7", "]"}], "]"}], "/", "Rulez"}], ")"}], "/.", "Rulez2"}], ")"}], "\[Equal]", "0"}], ",", " ", "TcSP"}], "]"}]}], "]"}]}]], "Input",ExpressionUUID->"b1aed912-5f0a-4929-b2cb-7e983231144f"], Cell[BoxData[ RowBox[{"BalanceExpr", " ", "=", " ", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"pT", "/", "pP"}], ")"}], RowBox[{"(", RowBox[{"P", "+", "PS"}], ")"}]}], "+", RowBox[{ RowBox[{"(", RowBox[{"TSP", "+", "TcSP"}], ")"}], RowBox[{"(", RowBox[{"pT", "/", "pP"}], ")"}]}], "-", RowBox[{"(", RowBox[{"T", "+", "TS", "+", "TSP", "+", RowBox[{"k5", " ", "TSP"}]}], ")"}]}], "\[Equal]", "0"}]}]], "Input", CellChangeTimes->{{3.718572760264008*^9, 3.718572780063426*^9}, { 3.718575305617491*^9, 3.718575335450841*^9}, {3.718575386967114*^9, 3.7185753875935698`*^9}, {3.718575457250575*^9, 3.718575457638966*^9}},ExpressionUUID->"6bf6d8cf-5265-4070-9b8c-\ e51b7f8e0047"], Cell[BoxData[ RowBox[{"BalanceLong", "=", RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"(", RowBox[{"BalanceExpr", "/.", "Rulez1"}], ")"}], "/.", "Rulez2"}], ")"}], "/.", "Rulez3"}], ")"}]}]], "Input", CellChangeTimes->{{3.718572823676065*^9, 3.7185728846487303`*^9}, { 3.718575268011774*^9, 3.7185752748206463`*^9}, {3.7185754787693977`*^9, 3.718575492257049*^9}},ExpressionUUID->"052c720a-22ed-448a-825d-\ 0f46738fddd5"], Cell[BoxData[ RowBox[{"BalanceShort", " ", "=", " ", RowBox[{"FullSimplify", "[", "BalanceLong", "]"}]}]], "Input", CellChangeTimes->{{3.718572892557878*^9, 3.7185729005771027`*^9}, { 3.7185754960416*^9, 3.718575513671455*^9}},ExpressionUUID->"efddf961-a12a-498c-a7dc-\ 4338cb795528"], Cell[BoxData[ RowBox[{"Solve", "[", RowBox[{"BalanceShort", ",", "T"}], "]"}]], "Input", CellChangeTimes->{{3.718573066976644*^9, 3.718573082207334*^9}, { 3.7185753476872663`*^9, 3.718575350024948*^9}, {3.718575390885001*^9, 3.7185753912885237`*^9}, {3.718575464039907*^9, 3.718575469006939*^9}, { 3.718575516718039*^9, 3.718575520283669*^9}},ExpressionUUID->"0eacdcc6-6360-4953-9031-\ 067486eeb2f6"], Cell[BoxData[""], "Input", CellChangeTimes->{{3.718575780197586*^9, 3.718575809016083*^9}},ExpressionUUID->"19ef4060-b6c8-4d73-ad11-\ 3fedaba11893"] }, WindowSize->{1693, 911}, WindowMargins->{{27, Automatic}, {Automatic, 65}}, FrontEndVersion->"11.2 for Linux x86 (64-bit) (September 10, 2017)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[558, 20, 444, 9, 31, "Input",ExpressionUUID->"16736113-e798-4c1c-87fa-8a198f63a309"], Cell[1005, 31, 5098, 110, 285, "Input",ExpressionUUID->"ad959554-5deb-455f-963a-1f4308bbbf9a"], Cell[6106, 143, 1788, 39, 400, "Input",ExpressionUUID->"861953d7-42f1-4e6e-8d04-2eb80a7167ae"], Cell[7897, 184, 687, 22, 31, "Input",ExpressionUUID->"eaf85294-4179-44ad-9107-ff76fb97c76c"], Cell[8587, 208, 487, 13, 31, "Input",ExpressionUUID->"f8e1f1a6-132b-4e4e-aa15-7fffe2302536"], Cell[9077, 223, 508, 14, 31, "Input",ExpressionUUID->"b1aed912-5f0a-4929-b2cb-7e983231144f"], Cell[9588, 239, 771, 21, 31, "Input",ExpressionUUID->"6bf6d8cf-5265-4070-9b8c-e51b7f8e0047"], Cell[10362, 262, 473, 12, 31, "Input",ExpressionUUID->"052c720a-22ed-448a-825d-0f46738fddd5"], Cell[10838, 276, 294, 6, 31, "Input",ExpressionUUID->"efddf961-a12a-498c-a7dc-4338cb795528"], Cell[11135, 284, 415, 8, 31, "Input",ExpressionUUID->"0eacdcc6-6360-4953-9031-067486eeb2f6"], Cell[11553, 294, 152, 3, 31, "Input",ExpressionUUID->"19ef4060-b6c8-4d73-ad11-3fedaba11893"] } ] *) (* End of internal cache information *)