def test_include_parameter_twice(self):
     # Test to avoid override
     aop = AbstractOptimizationProblem()
     p1 = MX.sym('p1', 3)
     p2 = MX.sym('p2', 5)
     aop.include_parameter(p1)
     aop.include_parameter(p2)
     self.assertTrue(is_equal(aop.p[:p1.numel()], p1))
     self.assertTrue(is_equal(aop.p[p1.numel():], p2))
    def test_include_parameter(self):
        aop = AbstractOptimizationProblem()
        p = MX.sym('p', 2)
        aop.include_parameter(p)

        self.assertTrue(is_equal(aop.p, p))