From ca330c7ac0892244bdfb7c9ee49c1420729521b6 Mon Sep 17 00:00:00 2001 From: Longye Tian Date: Tue, 23 Jul 2024 19:21:53 +1000 Subject: [PATCH 1/3] explain iso-revenue lines --- lectures/lp_intro.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lectures/lp_intro.md b/lectures/lp_intro.md index 27c8093f..29fced77 100644 --- a/lectures/lp_intro.md +++ b/lectures/lp_intro.md @@ -91,6 +91,8 @@ $$ The following graph illustrates the firm's constraints and iso-revenue lines. +Iso-revenue lines show all the combinations of materials and labor producing the same revenue. + ```{code-cell} ipython3 --- tags: [hide-input] From 72e85d53d7d63d70c01b4bae4df5e1955e64d9a6 Mon Sep 17 00:00:00 2001 From: Longye Tian Date: Tue, 23 Jul 2024 19:33:33 +1000 Subject: [PATCH 2/3] add comma in the numbers --- lectures/lp_intro.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lectures/lp_intro.md b/lectures/lp_intro.md index 29fced77..ef050216 100644 --- a/lectures/lp_intro.md +++ b/lectures/lp_intro.md @@ -337,7 +337,7 @@ OR-Tools tells us that the best investment strategy is: 3. At the beginning of the third year, the bank balance should be $ \$75,072.245 $. -4. At the end of the third year, the mutual fund will get payouts from the annuity and corporate bond and repay its loan from the bank. At the end it will own $ \$141018.24 $, so that it's total net rate of return over the three periods is $ 41.02\%$. +4. At the end of the third year, the mutual fund will get payouts from the annuity and corporate bond and repay its loan from the bank. At the end it will own $ \$141,018.24 $, so that it's total net rate of return over the three periods is $ 41.02\%$. @@ -544,14 +544,14 @@ c_ex2 = np.array([1.30*3, 0, 0, 1.06, 1.30]) A_ex2 = np.array([[1, 1, 0, 0, 0], [1, -rate, 1, 0, 1], [1, 0, -rate, 1, 0]]) -b_ex2 = np.array([100000, 0, 0]) +b_ex2 = np.array([100_000, 0, 0]) # Bounds on decision variables bounds_ex2 = [( 0, None), - (-20000, None), - (-20000, None), - (-20000, None), - ( 0, 50000)] + (-20_000, None), + (-20_000, None), + (-20_000, None), + ( 0, 50_000)] ``` Let's solve the problem and check the status using `success` attribute. @@ -583,7 +583,7 @@ SciPy tells us that the best investment strategy is: 3. At the beginning of the third year, the mutual fund should borrow $ \$20,000$ from the bank and invest in the annuity. -4. At the end of the third year, the mutual fund will get payouts from the annuity and corporate bond and repay its loan from the bank. At the end it will own $ \$141018.24 $, so that it's total net rate of return over the three periods is $ 41.02\% $. +4. At the end of the third year, the mutual fund will get payouts from the annuity and corporate bond and repay its loan from the bank. At the end it will own $ \$141,018.24 $, so that it's total net rate of return over the three periods is $ 41.02\% $. From 980e784b97507caf60193d87a5558c984c2c2c69 Mon Sep 17 00:00:00 2001 From: Longye Tian <133612246+longye-tian@users.noreply.github.com> Date: Tue, 23 Jul 2024 21:13:55 +1000 Subject: [PATCH 3/3] Update lectures/lp_intro.md Co-authored-by: Matt McKay --- lectures/lp_intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lectures/lp_intro.md b/lectures/lp_intro.md index ef050216..e314e6e1 100644 --- a/lectures/lp_intro.md +++ b/lectures/lp_intro.md @@ -91,7 +91,7 @@ $$ The following graph illustrates the firm's constraints and iso-revenue lines. -Iso-revenue lines show all the combinations of materials and labor producing the same revenue. +Iso-revenue lines show all the combinations of materials and labor that produce the same revenue. ```{code-cell} ipython3 ---