Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

Which high sec EVE system is the most central to high sec - or in other words, has the fewest average jumps to every other high sec system?

If possible, I would also like to know:

  • Which high sec system is most central to all other high sec regions (closest system in region)
  • Which high sec system is most central to all other high sec regions (center of each region)
  • Which high sec system is most central to all other systems
  • Which system is most central to all other systems

Info can be generated from http://community.eveonline.com/community/toolkit.asp.

share|improve this question
    
That is an extremely tall order, and I'm not entirely sure if it's even possible to determine without running the entirety of the map through some sort of advanced pathfinding algorithm (which could take days or weeks). No one's going to know that kind of stuff off the top of their head. Just looking at the EVE Map I could take a couple stabs in the dark, but it wouldn't be spot on. Why are you interested in this sort of information? –  Phill.Zitt Feb 4 '13 at 5:18
    
@Phill.Zitt I've been flying high sec incursions for some time now, but am often away from Eve during longer skill training blocks and would like to minimize the number of jumps I have to make to reach whichever new incursion site pops up. The first two of the additional points are similar, but might produce a different answer. The last two are mostly for the sake of completeness - to see if the same system pops up again, and are less important still. –  michaelc Feb 4 '13 at 5:58
    
I seriously doubt you're going to get an answer to this, but it's an interesting question. I'm tempted to try but my code-fu isn't that strong. –  Steve V. Feb 4 '13 at 6:19
    
@Phill.Zitt Breadth first search isn't too advanced and should work, only 1090 nodes so execution time shouldn't be too bad. Sadly, I've run into trouble implementing recursion in T-SQL. –  michaelc Feb 4 '13 at 7:45
    
Correction, 1212 nodes - I forgot that high sec is 0.45 sec and above, not just 0.5 sec and above - sec status rounds. And I believe that only 1106 can be reached via only high sec (route from Jita). Auto pilot and SQL are now giving same jump counts from Jita. –  michaelc Feb 5 '13 at 4:35
add comment

1 Answer

up vote 4 down vote accepted

I am not proficient in T-SQL, as any expert can assure you. That said, this information I think is correct (enough for me now anyway), but I would love to accept a better (more readable, more complete, etc) answer.

Excluding obvious island systems (low average and max jumps) manually, here are the top ten systems to base out of for rapid access to all high sec systems not in islands (106 island systems):

System      Avg Max
-------------------
Sivala      12  30
Uedama      12  31
Inaro       12  31
Kaaputenen  12  31
Kamio       12  31
Ikao        12  32
Niarja      12  32
Madirmilire 12  33
Ashab       12  34
Algogille   13  27

Below is what I ran (I called exec dbo.usp_Eve_BFS in another query). Please note that this T-SQL is hacked together from online tutorials by a T-SQL neophyte. It ran for 4:21 minutes on my machine.

CREATE PROCEDURE dbo.usp_Eve_BFS
AS
BEGIN
    SET XACT_ABORT ON
    BEGIN TRAN
    SET NOCOUNT ON;

    CREATE TABLE #Result (Id int NOT NULL PRIMARY KEY, Name nvarchar(100), Average int, Maximum int)
    INSERT INTO #Result (Id, Name) SELECT solarSystemID, solarSystemName FROM mapSolarSystems WHERE security >= 0.45

    DECLARE @StartNode int
    DECLARE c CURSOR FOR SELECT Id FROM #Result
    OPEN c
    FETCH NEXT FROM c INTO @StartNode

    WHILE @@FETCH_STATUS=0
    BEGIN
        CREATE TABLE #Discovered (Id int NOT NULL PRIMARY KEY, Parent int NULL, Depth int)
        INSERT INTO #Discovered (Id, parent, depth) VALUES (@StartNode, NULL, 0)

        WHILE @@ROWCOUNT > 0
        BEGIN
            INSERT INTO #Discovered (Id, Parent, Depth)
            SELECT toSolarSystemID, MAX(fromSolarSystemID), MIN(Depth) + 1
            FROM #Discovered d JOIN mapSolarSystemJumps ON d.Id = fromSolarSystemID
            JOIN #Result ON (mapSolarSystemJumps.toSolarSystemID = #Result.Id)
            WHERE toSolarSystemID NOT IN (SELECT Id From #Discovered)
            AND Depth = ( -- make sure the fromSolarSystemID matches the MIN(depth)!
                SELECT MIN(Depth) FROM #Discovered d JOIN mapSolarSystemJumps ON d.Id = fromSolarSystemID
                JOIN #Result ON (mapSolarSystemJumps.toSolarSystemID = #Result.Id)
                WHERE toSolarSystemID NOT IN (SELECT Id From #Discovered)
            )
            GROUP BY toSolarSystemID
        END;

        WITH BacktraceCTE(Id, Depth) AS
        (
            SELECT Id, Depth
            FROM #Discovered d
            WHERE d.Id = @StartNode
        UNION ALL
            SELECT d.Id, d.Depth
            FROM #Discovered d JOIN BacktraceCTE cte ON d.Parent = cte.Id
        )
        UPDATE #Result
        SET Average = a.Average, Maximum = a.Maximum
        FROM (SELECT AVG(Depth) AS Average, MAX(Depth) AS Maximum FROM BacktraceCTE) AS a
        WHERE #Result.Id = @StartNode

        DROP TABLE #Discovered

        FETCH NEXT FROM c INTO @StartNode
    END

    SELECT * FROM #Result ORDER BY Average, Maximum;
    DROP TABLE #Result

    COMMIT TRAN
    RETURN 0
END
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.