コード例 #1
0
    def test_totals(self):
        """ Test calculation of total product and industry outputs"""

        variables = ac.basic_variables(self.Ut, self.V, self.G)
        q = variables[6]
        g = variables[7]

        npt.assert_equal(q, np.array([2., 5., 11.]))
        npt.assert_equal(g, np.array([3., 1., 3., 11.]))
コード例 #2
0
    def test_summation_vectors(self):
        """ Tests generation of summation vectors of right dimensions"""

        variables = ac.basic_variables(self.Ut, self.V, self.G)
        e_com = variables[4]
        e_ind = variables[5]

        npt.assert_equal(e_com, np.array([1., 1., 1.]))
        npt.assert_equal(e_ind, np.array([1., 1., 1., 1.]))
コード例 #3
0
    def test_totals(self):
        """ Test calculation of total product and industry outputs"""

        variables = ac.basic_variables(self.Ut, self.V, self.G)
        q = variables[6]
        g = variables[7]

        npt.assert_equal(q, np.array([2., 5., 11.]))
        npt.assert_equal(g, np.array([3., 1., 3., 11.]))
コード例 #4
0
    def test_summation_vectors(self):
        """ Tests generation of summation vectors of right dimensions"""

        variables = ac.basic_variables(self.Ut, self.V, self.G)
        e_com = variables[4]
        e_ind = variables[5]

        npt.assert_equal(e_com, np.array([1., 1., 1.]))
        npt.assert_equal(e_ind, np.array([1., 1., 1., 1.]))
コード例 #5
0
    def test_dimensions_detection_untrace(self):
        """ Tests detection of dimensions and traceability in SuUT"""

        variables = ac.basic_variables(self.Uu, self.V, self.G)
        com = variables[0]
        ind = variables[1]
        org = variables[2]
        ext = variables[-1]
        traceable = variables[3]

        self.assertEqual(com, 3)
        self.assertEqual(ind, 4)
        self.assertEqual(org, 1)
        self.assertEqual(ext, 2)
        self.assertFalse(traceable)
コード例 #6
0
    def test_dimensions_detection_untrace(self):
        """ Tests detection of dimensions and traceability in SuUT"""

        variables = ac.basic_variables(self.Uu, self.V, self.G)
        com = variables[0]
        ind = variables[1]
        org = variables[2]
        ext = variables[-1]
        traceable = variables[3]

        self.assertEqual(com, 3)
        self.assertEqual(ind, 4)
        self.assertEqual(org, 1)
        self.assertEqual(ext, 2)
        self.assertFalse(traceable)