Predicting Next Recalculation

  • Thread starter Alkatran
  • Start date
In summary: The planets are still the most important, but moons get more attention than they did before. Far off objects are still neglected, but not as much as they were before.In summary, the solar system simulator now uses a priority queue to avoid recalculating all objects in the system every time a new calculation is needed. Thisqueue is based on absolute relative velocity. The planets are still the most important, but moons get more attention than they did before. Far off objects are still neglected, but not as much as they were before.
  • #1
Alkatran
Science Advisor
Homework Helper
959
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
  • #2
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...

[tex]\alpha = lim_{\Delta t\rightarrow 0} \frac{\Delta\omega}{\Delta t}[/tex]

Dynamcially repopulate your priority queue with those values for each object.
 
  • #3
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.
 

What is "Predicting Next Recalculation"?

"Predicting Next Recalculation" is a scientific method used to forecast when the next recalculation or update of a particular data set or model will occur.

Why is predicting next recalculation important?

Predicting next recalculation allows scientists and researchers to plan and prepare for any changes or updates to a data set or model. It also helps ensure the accuracy and reliability of the data being used in their research.

What factors are considered when predicting next recalculation?

Factors such as the frequency of data updates, the complexity of the data set or model, and any potential external influences or events that could impact the data may be considered when predicting next recalculation.

What are the challenges of predicting next recalculation?

One of the main challenges of predicting next recalculation is the uncertainty and unpredictability of external factors that may affect the data. Another challenge is the ever-changing nature of some data sets or models, making it difficult to accurately forecast when the next recalculation will occur.

How can scientists improve the accuracy of predicting next recalculation?

Scientists can improve the accuracy of predicting next recalculation by continuously monitoring and analyzing data trends and patterns, collaborating with other experts in the field, and regularly updating and refining their prediction methods.

Similar threads

  • Programming and Computer Science
Replies
2
Views
2K
  • Programming and Computer Science
Replies
7
Views
1K
  • Introductory Physics Homework Help
Replies
18
Views
1K
  • Sci-Fi Writing and World Building
Replies
21
Views
993
  • Classical Physics
Replies
7
Views
817
  • Sci-Fi Writing and World Building
2
Replies
37
Views
3K
Replies
17
Views
2K
Replies
13
Views
2K
  • Programming and Computer Science
2
Replies
58
Views
3K
  • Electrical Engineering
Replies
2
Views
391
Back
Top