special cost structure involving fixed setup cost, freight cost, production cost and inventory holding cost. The freight cost is proportional to the number of containers used. We investigate the problem in which the maximal production capacity in one period is integral multiple of the capacity of a container and reveal the special structure of the optimal solution. We transfer the lot sizing problem into a shortest path problem and propose a network algorithm to deal with it. The T-period problem is solved in O(T) effort by the network algorithm.