Today I plan to work on the climbers. This is the one month anniversary of this blog and my space elevator simulation project.
I started to restructure the model to make this easier. The ribbonDynamics method computed the influence of one ribbon segment on the next, checked if the load on the segment caused it to break, and cleaned up the forces on the ribbon segment in preparation for the next iteration.
ribbonDynamics is being broken into several methods. The first is simpleSegDynamics, which can compute the influence of one ribbon segment on the next, presuming that nothing is attached to that ribbon segment. The logic to determine whether the segment has broken has also become a new method, and needs to be moved from the ribbon class to the ribbon segment class. A new method will be created to handle the case where there is a climber or something else attached to the ribbon. "Something else" can include things like a mass in geosynchronous orbit representing a station.
In the cell phone infrastructure business, the hardware out in the field, like the base stations associated with each tower, the base site controllers that coordinate multiple towers, and everything else required to connect with the publically switched telephone networks are referred to as "furniture". For the space elevator simulation, I will call anything hooked to the ribbon furniture as well.
Showing posts with label redesign. Show all posts
Showing posts with label redesign. Show all posts
Saturday, July 5, 2008
Saturday, June 7, 2008
Restructuring the Model
The ribbon in the original C code was represented by an array of ribbon segments, which act like a set of masses connected with springs. The simulation typically works sequentially through the list, with a couple of places where pairs of adjacent points are processed.
In the model, the climbers are held in a separate data structure. There is a little book keeping to determine which ribbon segment the climber is attached to, and then the climber forces on the ribbon due to acceleration are computed and applied. The ribbon forces on the climber are approximated, with a tendency to move the climber towards the ribbon if it starts drifting away.
If the representation of the ribbon was moved from an array to a linked list, then the climbers could be added into the list between ribbon segments. The climbers would become very short ribbon segments with a higher mass, and the length and tension of the segments above and below each climber would be adjusted to represent the climber moving along the ribbon. The existing ribbon and point dynamics routines would then be used to compute the ribbon effects on the climber.
Java has a LinkedList class that is part of the AbstractCollection class, so it should be fairly quick.
In the model, the climbers are held in a separate data structure. There is a little book keeping to determine which ribbon segment the climber is attached to, and then the climber forces on the ribbon due to acceleration are computed and applied. The ribbon forces on the climber are approximated, with a tendency to move the climber towards the ribbon if it starts drifting away.
If the representation of the ribbon was moved from an array to a linked list, then the climbers could be added into the list between ribbon segments. The climbers would become very short ribbon segments with a higher mass, and the length and tension of the segments above and below each climber would be adjusted to represent the climber moving along the ribbon. The existing ribbon and point dynamics routines would then be used to compute the ribbon effects on the climber.
Java has a LinkedList class that is part of the AbstractCollection class, so it should be fairly quick.
Subscribe to:
Posts (Atom)