How Can We Optimize Prediction Algorithms in a Dynamic Solar-System Simulator?

  • Thread starter Thread starter Alkatran
  • Start date Start date
AI Thread Summary
The discussion centers on optimizing a solar-system simulator to accommodate additional moons, addressing the challenge of calculating their orbits with a lower time step. The simulation has transitioned from a fixed time step to a priority queue system, allowing for recalculations of planetary positions at varying rates based on their interactions. This approach prioritizes moons over planets, but there are still discrepancies in attention given to different bodies, such as Mercury receiving more focus than Earth's moon. The current method for predicting recalculation times relies on the inverse of acceleration for smaller planets, raising the question of whether a more effective function could be developed. The discussion suggests exploring the use of instantaneous angular acceleration as a potential optimization, noting its sensitivity to changes in distance over time. Additionally, the priority queue has been modified to include absolute relative velocity, resulting in a more balanced distribution of recalculation priorities among celestial bodies.
Alkatran
Science Advisor
Homework Helper
Messages
959
Reaction score
0
I've recently been working on optimizing a solar-system simulator I wrote a year ago to allow me to add more moons. The issue I have (not surprisingly) is the orbit of moon's require a much lower time step to calculate.

Trying to avoid this, I've change the simulation to no longer used a fixed time step. Instead of (wait x seconds, recalculating all positions, repeat) it now has a priority queue containing all pairs of planet and it recalculates each pair at different rates (the next calculation time is specified during the recalculation of position).

I've managed to get it working, and it does work well. Moons mostly get more attention than the planets, and far off things like Pluto get almost no attention at all. However, I want to optimize the prediction of the next calculation time (some bodies are still getting the wrong amount of attention, mercury gets more than Earth's moon for example).

The current formula is simply the inverse of acceleration for the smaller planet, meaning planets being accelerated are more likely to be recalculated:
nextTime += Math.min(b1.mass, b2.mass)/force; //(all units in SI)

So I guess it all comes down to: what's a good function for predicting how often the forces need to be recalculated? (Currently assuming constant force between calculations and doing a simple x + vt + at^2/2)
 
Technology news on Phys.org
Would it be worth considering the inverse of instantaneous angular acceleration as an optimization approach? It's a lot like your model but it is sensitive to changes in r over time. Yours doesn't appear to be...

\alpha = lim_{\Delta t\rightarrow 0} \frac{\Delta\omega}{\Delta t}

Dynamcially repopulate your priority queue with those values for each object.
 
I modified the priority to include absolute relative velocity (based on the simple idea that "hmmm, the units don't match"). The distribution is MUCH nicer now.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...

Similar threads

Replies
2
Views
3K
Replies
7
Views
2K
Replies
18
Views
6K
Replies
2
Views
3K
Replies
15
Views
3K
Replies
7
Views
2K
Back
Top