Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] ET of Quadratic Program Solution

Subject: CGAL users discussion list

List archive

[cgal-discuss] ET of Quadratic Program Solution


Chronological Thread 
  • From: Narusaki <>
  • To:
  • Subject: [cgal-discuss] ET of Quadratic Program Solution
  • Date: Thu, 12 Mar 2015 18:29:44 -0700 (PDT)

Hi everyone,

I'm trying to use the quadratic program class in CGAL. I tried the first
example in the manual and see the same result.

However, when I change the constraint -x + 2y <= 4 to -x + 1.8y <= 4 by
calling qp.set_a(1, 1, 1.8), it gives result as follow (for changing the
constraint, I've changed the NT of QP class from int to double):
==================
status: OPTIMAL
objective value: 0/1
variable values:
0: 0/1
1: 4/1
==================
, which is obviously not the optimal solution. But if I change the ET of QP
Solution from Gmpz to MP_Float, it gives:
==================
status: OPTIMAL
objective value: 1.61559e-029/2.85568e-030
variable values:
0: 25.6/14.48
1: 46.4/14.48
==================
, which is more reasonable.

I think both Gmpz and MP_Float give arbitrary solution, so where did I go
wrong?



--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/ET-of-Quadratic-Program-Solution-tp4660574.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page