Skip to Content.
Sympa Menu

cgal-discuss - AW: [cgal-discuss] Segmentation fault from Quadratic (and Linear) Program

Subject: CGAL users discussion list

List archive

AW: [cgal-discuss] Segmentation fault from Quadratic (and Linear) Program


Chronological Thread 
  • From: Gärtner Bernd <>
  • To: "" <>
  • Cc: "Brise Yves" <>
  • Subject: AW: [cgal-discuss] Segmentation fault from Quadratic (and Linear) Program
  • Date: Wed, 11 Jan 2012 20:25:12 +0000
  • Accept-language: de-CH, en-US

Dear William,

thanks for reporting this. We had been made aware of a similar issue recently
which we are currently tracking down. I will see whether this one is related.
I'll get back to you when we know more. As a quick fix (that worked in the
other case), you might try to replace the equality constraint by a pair of
inequality constraints.

Sorry for the inconvenience.

Best regards,
Bernd.

________________________________________
Von: William Taysom
[]
Gesendet: Dienstag, 10. Januar 2012 16:13
Bis:

Betreff: [cgal-discuss] Segmentation fault from Quadratic (and Linear) Program

Hello,

I recently found a small example quadratic program (actually the objective is
linear) which causes a segmentation fault. The basic setup is as follows and
a complete test file is attached.

== qp_segault (excerpt) ==

const int X = 0;
const int Y = 1;
const int Z = 2;

Quadratic_program<NT> qp;

void set_row(int i, NT x, NT y, NT z, Comparison_result rel, NT b) {
qp.set_a(X, i, x);
qp.set_a(Y, i, y);
qp.set_a(Z, i, z);
qp.set_r(i, rel);
qp.set_b(i, b);
}

int main() {
// Just try to minimize X
// though the objective function doesn't make a difference.
qp.set_c(X, 1);

set_row(0, 1, 1, 1, EQUAL, 4);
set_row(1, 1, 1, 1, LARGER, 4);
set_row(2, 1, 0, 1, LARGER, 3);
set_row(3, 1, 1, 0, LARGER, 3);

qp.set_u(X, true, 2);

Quadratic_program_solution<ET> sol;
sol = solve_quadratic_program(qp, ET());
std::cout << sol;
}

==

Pretty much any change to the problem setup removes the segfault, but changes
to the objective function, solution function, number type, and options do not.

I'm new to CGAL, and I've been very pleased with the API so far. I hope we
can work together to find the root cause of this segfault.

Best regards,
William


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss




Archive powered by MHonArc 2.6.16.

Top of Page