Turán problems for weighted graphs

What is the maximal number of edges in a multigraph on n vertices if every k-set spans at most r edges? We asymptotically determine the maximum possible weight of such (k,r)-dense graphs for almost all k and r as n tends to infinity, thus giving a generalization of Turán's theorem. We find exact answers in many cases, even when negative integer weights are also allowed.