public int compareTo(Object tmp )
    {
        int result;
        
        if (tmp instanceof Person)
            result = (firstTicks < ((Person)tmp).GetFirstTicks() ? -1 : (firstTicks == ((Person)tmp).GetFirstTicks() ? 0 : 1));
        else if (tmp instanceof BlankEvent)
            result = (firstTicks < ((BlankEvent)tmp).GetFirstTick() ? -1 : (firstTicks == ((BlankEvent)tmp).GetFirstTick() ? 0 : 1));
        else
            result = (firstTicks < ((Bus)tmp).GetFirstTicks() ? -1 : (firstTicks == ((Bus)tmp).GetFirstTicks() ? 0 : 1));
        
    return result;
    }