Skip to main content.
August 11th, 2004

I hate Java

It tries to do way too much for you. And the way it handles reference assignments is a PAIN! I was using a Vector object to hold a bunch of points I want to graph. Turns out, that Vectors don’t copy the object you are adding. They copy a reference, so if you don’t create a new object every time through, all of the previous insertions end up pointing at the most recent version of whatever you’re adding. SPEW! So, now that I know what it’s doing, I can correct for it, but man was it a pain to figure out what the problem was.

Posted by wmyers as work at 7:50 PM EDT

No Comments »

August 10th, 2004

sssim

After a brief meeting with Garrett this morning, I again attacked the SSSim applet, with the goal of getting all the right graphing chunks in place by the end of the day. Garrett took over on the basic layout design, putting the controls and elements where he wants to see them. The major parts of the design are done, the graphs do successfully graph points handed to them in a vector, so now it should be merely the job of making sure the points are built correctly, and then hooking up the point-building segment to the load buttons and doing final testing to make sure the graph is, in fact, drawing the correct points.

Posted by wmyers as work at 7:49 PM EDT

No Comments »

August 9th, 2004

exporting netlogo

Work is again moving ahead on the WEAVE applet. The guts of the tool are coming into focus, with a planned initial delivery date of 13 08 2004. Garrett was able to push me towards the goal today, and a bunch more of the applet’s innards are working because of it. You can use the link above to see how it looks so far. The buttons are inoperative at this point, but the basic layout is visible when you load the utility.

With the availability of the NetLogo 2.0.2 update, I was successfully able to export my Cops and Killers model as an applet, so you can experiment with it on your own.

Posted by wmyers as work at 7:47 PM EDT

No Comments »

August 6th, 2004

ssp review

This week marks the end of the summer workshops at Shodor, with the Shodor Scholars Program wrapping up today. On Monday, I started teaching myself yet another tool, NetLogo. NetLogo is a modeling environment based on the old teaching language Logo. The SSP students’ capstone activity is to build a complex model of some real-world process, using NetLogo, Stella, or AgentSheets. I sat in on a few days of the class this week to try to give some assistance to any of the groups who might need it. The team I ended up helping out was building a biological magnification model. Biological magnification is the process of stuff working its way up the food chain. For their model, they designed a 4-stage food chain in a lake, with the smallest critters starting off with a set amount of pollution. Every time a larger fish ate a smaller one, the predator got 50% of the prey’s pollution level, with a fixed percentage of their own pollution level leaching away every turn. They built in deaths from old age, high pollution levels, and being eaten. They also built a reasonable reproduction rate for each species (the smaller ones reproduce faster since they supply more food than the bigger fish).

They decided to try to build the entire model all at once. While it seems at first blush to be a good idea, breaking the job into small, manageable chunks would have been a better approach. I wrote a brief, simplified outline of their model over lunch on Tuesday, giving them some ideas to work on improving their attack method. I then started implementing the ideas I had come up with in my own model. They were able to successfully complete their model, in a couple different forms, but may consider modifying an extant model in the future, or at least breaking their scratch model into stages.

My model simulates killers in a population with cops chasing them. I built the model in an iterative manner, and have my 3rd version completed. Currently, I am working on getting the model converted into an applet so you can see how it works.

On a different track, I found a small typo in the implementation file of my linear congruential generator, which I have fixed.

And my WEAVE applet is gaining ground. I need to switch layout managers so the components end up precisely where I want them, instead of just plopped onto the screen. However, I am making headway on the project, with most of the visual stuff out of the way, needing only to position everything precisely where I want it, and to incorporate the math behind the scenes to drive the graphs.

Posted by wmyers as work at 7:45 PM EDT

5 Comments »

  Next Entries »