The necessity of avoiding simultaneous storage in the same space of given group of products arises in many cases, for example, either for reasons of deterioration of the products, or to reduce the danger of fire. In this paper, we develop a heuristic method that searches for the smallest number of warehouses needed to store n products satisfying restrictions on simultaneous storage. We are given the following: • the quantity c i , for every product p i , i=1,2,…, n, to store, • sets Γ( i), i=1,2,…, n, that contain the products that must not be stored in the same warehouse with product p i , • the capacity W of the available warehouses. The problem is formulated in the framework of graph theory and the procedure of the method is presented with a numerical example.