[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] setting up a basic LP using glp_set_mat_row
From: |
John Perry |
Subject: |
[Help-glpk] setting up a basic LP using glp_set_mat_row |
Date: |
Fri, 6 Jan 2012 13:27:04 -0600 |
Hi
I'm trying to set up an LP using glp_set_mat_row. As I understand it, I need to
(1) create a problem
(2) set an objective direction
(3) set the objective function's coefficients
(4) create columns
(5) create rows
(6) set the rows
(7) solve
The system I'm trying is simple: x >= 1, y >= 1, minimizing x + y. This has the
solution (1,1), but the solver tells me there is no solution.
I'm sure I'm setting it up wrong, but I don't know what. I've attached code
below; can anyone tell me what I'm doing wrong?
(If my etiquette is wrong, can anyone tell me how I should go about asking the
question?)
regards
john perry
test.cpp
Description: test.cpp
- [Help-glpk] setting up a basic LP using glp_set_mat_row,
John Perry <=