In this paper, a multi-product continuous review inventory control problem within the batch arrival queuing approach (MQr/M/1) is modeled to find the optimal quantities of the maximum inventory. The objective function is to minimize the total costs of ordering, holding and shortage under warehouse space and service level, and expected lost-sales shortage cost constraints from retailer and warehouse viewpoints. Since the proposed model is NP-hard, an efficient imperialist competitive algorithm (ICA) is developed to solve the model. Moreover, to justify the proposed ICA, a simulated annealing algorithm is utilized, and to determine the best values of algorithm parameters that may result in a better solution, a fine-tuning procedure is followed. Finally, the performance of the proposed ICA is assessed through some numerical examples.