'Test problems with parameters.'

def test_parameter_problems(self):

    p1 = Parameter()
    p2 = Parameter(3, sign='negative')
    p3 = Parameter(4, 4, sign='positive')
    p = Problem(Maximize((p1 * self.a)), [((self.a + p1) <= p2), (self.b <= ((p3 + p3) + 2))])
    p1.value = 2
    p2.value = (- numpy.ones((3, 1)))
    p3.value = numpy.ones((4, 4))
    result = p.solve()
    self.assertAlmostEqual(result, (-6))
    p1.value = None
    with self.assertRaises(Exception) as cm:
        p.solve()
    self.assertEqual(str(cm.exception), 'Problem    has    missing    parameter    value.')
