flamingo
01-20-2009, 10:47 AM
Update:
I am trying to use Simplex to solve an Ax = b problem. A is 100 x 10.
My code seems to set up the sparse columns and Aij as expected. I'd like to minimize the slack variables. How should I set up obj to do that? I've tried obj[1..n] = 1, obj[n..n+m] = 1, and obj[1..n+m] = 1. All seem to result in zero solution. (Only slack variables have non-zero values.) I'm reading the results from u.
Please advise if I'm either setting the objective function incorrectly or reading the solution from the wrong place.
thanks
I am trying to use Simplex to solve an Ax = b problem. A is 100 x 10.
My code seems to set up the sparse columns and Aij as expected. I'd like to minimize the slack variables. How should I set up obj to do that? I've tried obj[1..n] = 1, obj[n..n+m] = 1, and obj[1..n+m] = 1. All seem to result in zero solution. (Only slack variables have non-zero values.) I'm reading the results from u.
Please advise if I'm either setting the objective function incorrectly or reading the solution from the wrong place.
thanks