Basic generating musem with linear cost function