From 6673ee455d57101b02214e61227c2064a564945d Mon Sep 17 00:00:00 2001 From: aalfonsi Date: Tue, 10 Oct 2023 16:23:13 -0600 Subject: [PATCH] added test --- ...CashFlow_test_NPV_delayed_construction.xml | 77 +++++++++++++++++++ ...sh_Flow_input_NPV_delayed_construction.xml | 56 ++++++++++++++ tests/gold/dumpNPVDelay.csv | 2 + tests/tests | 8 ++ 4 files changed, 143 insertions(+) create mode 100644 tests/CashFlow_test_NPV_delayed_construction.xml create mode 100644 tests/Cash_Flow_input_NPV_delayed_construction.xml create mode 100644 tests/gold/dumpNPVDelay.csv diff --git a/tests/CashFlow_test_NPV_delayed_construction.xml b/tests/CashFlow_test_NPV_delayed_construction.xml new file mode 100644 index 000000000..e80f583f9 --- /dev/null +++ b/tests/CashFlow_test_NPV_delayed_construction.xml @@ -0,0 +1,77 @@ + + + CashFlow_test_delayed_contruction_time + A. Alfonsi + 2023-10-10 + + This test tests the possibility to allow for CAPEX construction times spanning on multiple years (not only in the first one). + + + Models.ExternalModel.TEAL + + Addressed issue #17 + + + + + . + MCrun,printTOfile + + + + BOP_capacity, BOP_TOT_revenueEL, IP_capacity, IP_TOT_revenueBY, Multiplier + NPV + + + + + GRO_CashFlow_in, GRO_CashFlow_out + + + + + + + + 1 + + 300.0E6 + 350.0E6 + 51.0E6 + 31.5E6 + 1.0 + + + + + + GRO_CashFlow_in + OutputPlaceHolder + + + GRO_CashFlow_in + GRO_CashFlow_out + + + + + + SET_CashFlow_in + Cash_Flow + test_MC + SET_CashFlow_out + + + SET_CashFlow_out + dumpNPVDelay + + + + + + csv + SET_CashFlow_out + input,output + + + diff --git a/tests/Cash_Flow_input_NPV_delayed_construction.xml b/tests/Cash_Flow_input_NPV_delayed_construction.xml new file mode 100644 index 000000000..d03a79b5f --- /dev/null +++ b/tests/Cash_Flow_input_NPV_delayed_construction.xml @@ -0,0 +1,56 @@ + + + 0.05 + 0.392 + 0.04 + + BOP|CA + BOP|RE + IP|CA + IP|RE + + + + + 15 + + + + + BOP_capacity + -4510000000 -4510000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 1100000000 + 0.64 + 5. 9.50 8.55 7.70 6.93 6.23 5.90 5.90 5.91 5.90 5.91 5.90 5.91 5.90 5.91 + + + + + + BOP_TOT_revenueEL + 1.0 + + + + + + 15 + + + + + -153000000 + IP_capacity + 231000000 + 1.0 + + + + + + IP_TOT_revenueBY + 1.0 + + + + diff --git a/tests/gold/dumpNPVDelay.csv b/tests/gold/dumpNPVDelay.csv new file mode 100644 index 000000000..1ddc59bc3 --- /dev/null +++ b/tests/gold/dumpNPVDelay.csv @@ -0,0 +1,2 @@ +BOP_capacity,BOP_TOT_revenueEL,IP_capacity,IP_TOT_revenueBY,Multiplier,NPV +300000000.0,350000000.0,51000000.0,31500000.0,1.0,-1049009630.29 diff --git a/tests/tests b/tests/tests index c97470450..55f55e3a5 100644 --- a/tests/tests +++ b/tests/tests @@ -115,4 +115,12 @@ rel_err = 0.001 [../] + [./CashFlow_test_delayed_contruction_time] + type = 'RavenFramework' + input = 'CashFlow_test_NPV_delayed_construction.xml' + UnorderedCsv = 'dumpNPVDelay.csv' + max_time = 500 + rel_err = 0.001 + [../] + []