[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] What am I missing?
From: |
Reginald Beardsley |
Subject: |
[Help-glpk] What am I missing? |
Date: |
Thu, 12 Aug 2010 10:41:31 -0700 (PDT) |
I'm trying to use glpk for the first time. I can run plan.lp OK, but when I
try to set up my own problem, it fails. Looking at the examples and rereading
the manual has not gotten through my thick head what I'm doing wrong.
I'm attempting a basis pursuit, so I want to find the coefficients for a set of
wavelets from a dictionary that sum to the measured data subject to an L1 norm.
This example is exact. x0=1 x1=0 x2=2 x3=3. sum is the sum of the last column
(i.e. RHS).
Thanks,
Reg
Here's my attempt to construct an example using CPLEX format:
minimize
z : + 21 x0 + 13.27 x1 + 6.769 x2 + 5.262 x3 -
50.3246
subject to
t1 : + 1 x0 + 1 x1 + 1 x2 + 1 x3 =
6
t2 : + 0.9912 x0 + 0.9206 x1 + 0.6255 x2 + 0.465 x3 =
3.637
t3 : + 0.9826 x0 + 0.8524 x1 + 0.4832 x2 + 0.3568 x3 =
3.02
t4 : + 0.9741 x0 + 0.7936 x1 + 0.4075 x2 + 0.3008 x3 =
2.692
t5 : + 0.9657 x0 + 0.7426 x1 + 0.3591 x2 + 0.265 x3 =
2.479
t6 : + 0.9575 x0 + 0.6981 x1 + 0.3246 x2 + 0.2396 x3 =
2.325
t7 : + 0.9493 x0 + 0.6591 x1 + 0.2985 x2 + 0.2203 x3 =
2.207
t8 : + 0.9414 x0 + 0.6248 x1 + 0.2778 x2 + 0.2051 x3 =
2.112
t9 : + 0.9335 x0 + 0.5944 x1 + 0.261 x2 + 0.1926 x3 =
2.033
t10 : + 0.9258 x0 + 0.5674 x1 + 0.2468 x2 + 0.1822 x3 =
1.966
t11 : + 0.9181 x0 + 0.5433 x1 + 0.2348 x2 + 0.1733 x3 =
1.907
t12 : + 0.9106 x0 + 0.5216 x1 + 0.2243 x2 + 0.1656 x3 =
1.856
t13 : + 0.9032 x0 + 0.502 x1 + 0.2151 x2 + 0.1588 x3 =
1.81
t14 : + 0.896 x0 + 0.4843 x1 + 0.207 x2 + 0.1528 x3 =
1.768
t15 : + 0.8888 x0 + 0.4682 x1 + 0.1997 x2 + 0.1474 x3 =
1.731
t16 : + 0.8817 x0 + 0.4535 x1 + 0.1932 x2 + 0.1426 x3 =
1.696
t17 : + 0.8748 x0 + 0.44 x1 + 0.1872 x2 + 0.1382 x3 =
1.664
t18 : + 0.8679 x0 + 0.4275 x1 + 0.1818 x2 + 0.1342 x3 =
1.634
t19 : + 0.8612 x0 + 0.416 x1 + 0.1768 x2 + 0.1305 x3 =
1.606
t20 : + 0.8545 x0 + 0.4054 x1 + 0.1722 x2 + 0.1271 x3 =
1.58
t21 : + 0.848 x0 + 0.3955 x1 + 0.168 x2 + 0.124 x3 =
1.556
t22 : + 0.8415 x0 + 0.3863 x1 + 0.164 x2 + 0.1211 x3 =
1.533
t23 : + 0.8352 x0 + 0.3777 x1 + 0.1603 x2 + 0.1184 x3 =
1.511
bounds
x0 >= 0.0
x1 >= 0.0
x2 >= 0.0
x3 >= 0.0
end
- [Help-glpk] What am I missing?,
Reginald Beardsley <=