When storage and retrieval times of inventories are uncertain and the storage space for the inventories is limited, it is an important problem to assign the inventories to storage spaces so that the total expected number of relocations is minimized. This paper addresses a dynamic location problem as well as a static location problem. Mathematical models are proposed for obtaining the optimal solution. To overcome the excessive computational time of optimizing methods, a genetic algorithm is suggested. Also, simple heuristic rules are suggested to solve the dynamic location problem. Performance of various solution methods are compared with each other.