|
From: Bill R. <wr...@um...> - 2004-02-16 22:28:53
|
I've been trying to send this message to the *@src.uchicago.edu
addresses but it keeps getting bounced back, so I thought I'd send it this
way.
-Bill
--
Not sure if this is the right address to send this to, but I
couldn't find any place else on the repast website.
So I'm working with the RasterSpace class, and I wrote a subclass
that I'm calling QualitySpace. Initially I tried to use the fully
detailed RasterSpace constructor in the following way:
// this simple constructor just calls the parent constructor with
the
// right world sizes
QualitySpace(int x, int y) {
super(0,y,x,0,1,x,y);
}
x and y are the respective size of the world. I was thinking
RasterSpace numbered from upper left to bottom right, hence why the y and
x are where they are in the constructor call. However GIS numbers from
lower left to upper right, so my plan was incorrect. I would expect then
when I make this call that the constructor would crash and I would get an
error message, but it got past this and didn't crash till I attempted to
get the size of the space at which point I got the following error stack:
alveare-ARMSR$ java.lang.NullPointerException
at
uchicago.src.sim.space.RasterSpace.putValueAt(RasterSpace.java:295)
at ARMSR.QualitySpace.initializeNormalMean(QualitySpace.java:39)
at ARMSR.QualitySpace.initializeNormalMean(QualitySpace.java:39)
at ARMSR.Model.createQualitySpaces(Model.java:111)
at ARMSR.Model.buildModel(Model.java:657)
at ARMSR.Model.begin(Model.java:773)
at
uchicago.src.sim.engine.BaseController.beginModel(BaseController.java:337)
..blahblahblah...
Where the line in my code in QualitySpace.java is:
for ( x=0; x<getSizeX(); x++) {
Anyway, probably not a big deal but it seems to me this should be
throwing an error in the constructor not waiting till I attempt to put a
value.
Take care,
Bill
|