HD Delta trajectory examples
From PlanetsWiki
[edit] Examples for numerical optimized HD Delta trajectories
In this section I just wanted to show some examples on how complicate this issue really is!
Note: I did not use an mixed-integer optimization algorithm, so the resulting values were not integer, but I included a part that 'preferred' values which were (or almost) integers. Also know, that optimization is a very complicate issue, the solution depends heavily on the starting values and on the exact definition of the so called objective function. Eventually there may be more than one solution to a given problem, which makes it difficult to find the 'global' optimum. All that together means that the following examples show 'some' (good!) solution, but perhaps not the best one that exists. But the intention of these examples is to show how evil Tim was when he wrote that piece of code, not how to solve the problem yourself. But it may still help one to find a practical solution, if you get the idea.
All following pictures are optimized for a 'total production', this is the sum of all productions in a turn, it's the same as the variable 'R' in the Hyperdimensional Stress formula.
For the production I assumed that the immediate income (that means the creation of new minerals in the next few turns) is also pretty important so I weighted the values for the HD Delta in the form 1/i ^2 where i is the turn number. Of course I constrained the problem by the limit of 999 for the maximal HD value, nevertheless the calculation should try to reach that very sharp at the end of the lifetime I explained in this section.
Each of the next few diagrams shows several graphs:
- Blue is the R value for that turn (see sxis on the right side)
- Black is the sum of R up to that turn. Note: the graph is scaled to fit within the diagramm. The correct last value, that is the total production R, is written in the title.
- Red shows the actual values of the HD Stress, you see where it begins and that it stops short before reaching 1000 (axis on the right side)
- Magenta is the result of the optimization, the HD delta stress trajectory. If you would follow by applying Scalar Wave Amp and Scalar Wave Damper devices (but this can be quite difficult!!) than your creation of new minerals would be as expected. (Axis in the left side)
First example: Starting value for HD Stress was 200, HD Delta Stress was to be optimized over the next 50 turns, and the maximum allowed values for HD Delta had to lie between -15 and +15:
The next picture started at the same value, but allowed +/- 25 HD Stress Delta for the next 25 turns.
The third diagramm shows a starting value of 700 and the optimization on 25 turns with a limit of +/- 15 HD Delta Stress.
The last example shows what happens if the third calculation allowed a limit of +/- 50 HD Delta Stress.




