A method for mapping a plurality of lighting fixtures to a plurality of spatial locations each indicated within a floor plan, each lighting fixture comprising a photosensor , the method comprising: generating a first data set by sequentially directing each of the plurality of lighting fixtures to turn on, one at a time, and receiving data corresponding to a strength of light measured by the photosensor from every other one of the plurality of lighting fixtures, wherein the first dataset corresponds to strengths of light received by the photosensor of each of the plurality of lighting fixtures from every other one of the plurality of lighting fixtures , and obtaining a second dataset, based on a floor plan including a plurality of rooms each separated by walls which optically isolate said rooms, corresponding to distances between each of the plurality of spatial locations within the floor plan to every other one of the plurality of spatial locations within the floor plan, and applying a heuristic evaluation using the first and second datasets to identify one or more possible mappings of the plurality of lighting fixtures to the plurality of spatial locations within the floorplan, the method being characterized in that the heuristic evaluation utilizes the function: Min f p = ∑ D p i , p j A i , j wherein: i and j each correspond to a set of identifiers for each of the plurality of spatial locations, p corresponds to a permutation of identifiers for each of the plurality of lighting fixtures, D corresponds to the second dataset, and A corresponds to the first dataset. generating a first data set by sequentially directing each of the plurality of lighting fixtures to turn on, one at a time, and receiving data corresponding to a strength of light measured by the photosensor from every other one of the plurality of lighting fixtures, wherein the first dataset corresponds to strengths of light received by the photosensor of each of the plurality of lighting fixtures from every other one of the plurality of lighting fixtures , and obtaining a second dataset, based on a floor plan including a plurality of rooms each separated by walls which optically isolate said rooms, corresponding to distances between each of the plurality of spatial locations within the floor plan to every other one of the plurality of spatial locations within the floor plan, and applying a heuristic evaluation using the first and second datasets to identify one or more possible mappings of the plurality of lighting fixtures to the plurality of spatial locations within the floorplan, the method being characterized in that the heuristic evaluation utilizes the function: Min f p = ∑ D p i , p j A i , j wherein: i and j each correspond to a set of identifiers for each of the plurality of spatial locations, p corresponds to a permutation of identifiers for each of the plurality of lighting fixtures, D corresponds to the second dataset, and A corresponds to the first dataset. i and j each correspond to a set of identifiers for each of the plurality of spatial locations, p corresponds to a permutation of identifiers for each of the plurality of lighting fixtures, D corresponds to the second dataset, and A corresponds to the first dataset. <EOS>