This paper presents an exact model for the resource investment problem with generalized precedence relations in which the minimum or maximum time lags between a pair of activities may vary depending on the chosen modes. All resources considered are renewable. The objective is to determine a mode and a start time for each activity so that all constraints are obeyed and the resource investment cost is minimized. Project scheduling of this type occurs in many fields for instance, construction industries. The proposed model has been inspired by the packing problems. In spite of the fact that it needs a feasible solution to start for conventional models, the new model has no need for a feasible solution to startup with. Computational results with a set of 60 test problems have been reported and the efficiency of the proposed model has been analyzed.