So the latest problem that came up is that a given node cannot transmit and receive simultaneously. You would think that this would be easy to solve in a discrete event simulation of a wireless ad hoc network. For example, you might do this:
- Find all the packets you will simulate this round
- Find all the senders of those packets
- Set some flag to forbid them from recieving
And yeah, you can do that. The problem is, there are at least three kinds of packets. Virtual packets are symbolic, and have no meaning outside of reporting/administrative functions. They aren’t simulations of something, they are part of the simulation. But because the event queue needs packets, they exist. Actually, the event queue doesn’t need packets, now that I think about it. The event queue needs objects, and doesn’t care if those objects are packets or pachyderms. But I have to handle pachyderms, in that case.
The second kind of packet is an internal message from one part of a node to another. But you know, now that I think about it, I’m looking at this wrong. Only packets create sender conflicts. The other things aren’t packets, and they don’t need to be packets. Definitely food for thought.
Hmm… if I put my other classes in with the “Packet” class, that is, in the same file, then that file really becomes the events file, that is, the file where we define what types of messages get put on the event queue…
For some reason, I get the awful feeling that I’m programming in Ruby, but I’m actually still programming in AppleScript, or worse, in Java. Like I’m just not grokking what I could be doing here.