A constraint satisfaction optimization model was presented to deal with the optimization decision problem about the steel tube location. Through the analysis of stack height and the piling rules of steel tubes, a two-stage algorithm was given based on cluste-ring and constraint satisfaction technology. In the first stage, steel tubes to be put into storage are grouped by clustering-based approach according to their multiple attributes. In the second stage, by using constraint satisfaction technology, the specific location of steel tubes in each group is assigned, and the search space of the problem is dynamically shrunk through constraint propagation. Finally, this algorithm was compared with the classical BFD ( best fit deceasing) algorithm through experiments. Experimental results demon-strate that, in the premise of minimizing stacking operations, the algorithm can effectively reduce the quantity of stacks and achieve a well-performed utilization rate of stacks. And thus the results verify the feasibility and effectiveness of the model and algorithm.