[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] "No value" problem, not part of the data set - (MathProg)
From: |
Noli Sicad |
Subject: |
[Help-glpk] "No value" problem, not part of the data set - (MathProg) |
Date: |
Thu, 17 Dec 2009 06:48:13 +0700 |
Hi,
I am trying to read a dbf file (*.dbf) from shapefile (i.e. ESRI
ArcGIS) or GIS file (*.shp) and writing a dbf table.
I am wondering how can I solve this problem - "no value" problem as
you can see in the console output below, it is not part of the data
set from dbf file.
~~~~~~~~~~~~~~~
Reading tab8...
Display statement at line 30
Area_Stand[A,R,1,3] = 131.507
Area_Stand[A,R,2,3] = 122.955
Area_Stand[A,'',1,1] = 57.899
Area_Stand[A,'',2,1] = 15.573
Area_Stand[A,'',3,1] = 78.544
Area_Stand[A,'',4,1] = 67.906
Area_Stand[A,'',5,1] = 145.412
Area_Stand[A,R,1,2] = 155.223
Area_Stand[A,'',2,2] = 64.358
Area_Stand[A,'',3,2] = 35.798
Area_Stand[A,R,4,2] = 124.597
Area_Stand[B,'',1,3] = 46.048
Area_Stand[B,'',2,3] = 73.329
Area_Stand[B,'',3,3] = 40.189
Area_Stand[B,'',1,1] = 4.184
Area_Stand[B,'',2,1] = 15.175
Area_Stand[B,'',3,1] = 52.294
Area_Stand[B,'',1,2] = 78.506
Area_Stand[B,'',2,2] = 32.534
Area_Stand[B,'',3,2] = 22.573
Area_Stand[B,'',4,2] = 6.566
Area_Stand[B,'',5,2] = 58.724
Area_Stand[B,'',4,3] = 69.777
Area_Stand[C,'',1,3] = 96.944
Area_Stand[C,'',2,3] = 23.426
Area_Stand[C,'',3,3] = 43.471
Area_Stand[C,'',1,1] = 208.631
Area_Stand[C,'',2,1] = 245.654
Area_Stand[C,'',3,1] = 43.55
Area_Stand[C,'',4,2] = 6.934
Area_Stand[C,'',5,2] = 163.692
Area_Stand[C,'',6,2] = 72.195
Area_Stand[C,'',7,2] = 23.371
Area_Stand[C,'',8,2] = 72.455
Generating Area...
ReadingDbfGIS_7.mod:41: no value for Area_Stand[A,R,1,1]
MathProg model processing error
~~~~~~~~~~~~~~~~~~~~~
My problem are in here:
# Problem here
param A{i in I}:= sum {j in J, k in K, l in L} Area_Stand[i,j,k,l];
# Problem here as well.
subject to Area {i in I}:
sum {j in J,k in K,l in L} XForestLand[i,j,k,l] = sum {j in J,k in
K,l in L} Area_Stand[i,j,k,l];
How can I put conditions on these two equation e.g if statements in
these to equation.
Please see the mathprog script and console output below.
Thanks in advance, Noli
~~~~~~~~~~~~~~~~~~~~~
Mathprog script
~~~~~~
#Reading dbf (*,dbf) from shapefile (*..shp), GIS file i.e. ArcGIS
file and writing dbf table.
/*
Noli Sicad <address@hidden>
stands8.shp
stands8.dbf
stands8.shx
stabds8.prj
*/
set I;
table tab IN "xBASE" "vegtype.dbf": I <- [VEG_TYPE];
display I;
set J;
table tab2 IN "xBASE" "vegtype2.dbf": J <- [VEG_TYPE2];
display J;
set K;
table tab3 IN "xBASE" "climatec.dbf": K <- [CLIMATE_C];
display K;
set L;
table tab4 IN "xBASE" "MGT.dbf": L <- [MANAGEMENT];
display L;
param Area_Stand{i in I,j in J,k in K,l in L};
set S, dimen 4;
table tab8 IN "xBASE" "stands8.dbf": S <- [VEG_TYPE,
VEG_TYPE2,CLIMATE_C,MANAGEMENT], Area_Stand ~ACRES;
display Area_Stand;
var XForestLand{i in I,j in J,k in K,l in L};
# Problem here
param A{i in I}:= sum {j in J, k in K, l in L} Area_Stand[i,j,k,l];
# Problem here as well.
subject to Area {i in I}:
sum {j in J,k in K,l in L} XForestLand[i,j,k,l] = sum {j in J,k in
K,l in L} Area_Stand[i,j,k,l];
~~~~~~~~~~~~~~~
Console output
~~~~~~~~~~~~~~~
Parameter(s) specified in the command line:
--cover --clique --gomory --mir -m ReadingDbfGIS_7.mod
Reading model section from ReadingDbfGIS_7.mod...
ReadingDbfGIS_7.mod:78: warning: unexpected end of file; missing end
statement inserted
78 lines were read
Reading tab...
Display statement at line 12
I:
A
B
C
D
Reading tab2...
Display statement at line 16
J:
R
''
Reading tab3...
Display statement at line 20
K:
1
2
3
4
5
6
7
8
Reading tab4...
Display statement at line 24
L:
1
2
3
Reading tab8...
Display statement at line 30
Area_Stand[A,R,1,3] = 131.507
Area_Stand[A,R,2,3] = 122.955
Area_Stand[A,'',1,1] = 57.899
Area_Stand[A,'',2,1] = 15.573
Area_Stand[A,'',3,1] = 78.544
Area_Stand[A,'',4,1] = 67.906
Area_Stand[A,'',5,1] = 145.412
Area_Stand[A,R,1,2] = 155.223
Area_Stand[A,'',2,2] = 64.358
Area_Stand[A,'',3,2] = 35.798
Area_Stand[A,R,4,2] = 124.597
Area_Stand[B,'',1,3] = 46.048
Area_Stand[B,'',2,3] = 73.329
Area_Stand[B,'',3,3] = 40.189
Area_Stand[B,'',1,1] = 4.184
Area_Stand[B,'',2,1] = 15.175
Area_Stand[B,'',3,1] = 52.294
Area_Stand[B,'',1,2] = 78.506
Area_Stand[B,'',2,2] = 32.534
Area_Stand[B,'',3,2] = 22.573
Area_Stand[B,'',4,2] = 6.566
Area_Stand[B,'',5,2] = 58.724
Area_Stand[B,'',4,3] = 69.777
Area_Stand[C,'',1,3] = 96.944
Area_Stand[C,'',2,3] = 23.426
Area_Stand[C,'',3,3] = 43.471
Area_Stand[C,'',1,1] = 208.631
Area_Stand[C,'',2,1] = 245.654
Area_Stand[C,'',3,1] = 43.55
Area_Stand[C,'',4,2] = 6.934
Area_Stand[C,'',5,2] = 163.692
Area_Stand[C,'',6,2] = 72.195
Area_Stand[C,'',7,2] = 23.371
Area_Stand[C,'',8,2] = 72.455
Generating Area...
ReadingDbfGIS_7.mod:41: no value for Area_Stand[A,R,1,1]
MathProg model processing error
>Exit code: 1 Time: 0.209
- [Help-glpk] "No value" problem, not part of the data set - (MathProg),
Noli Sicad <=