A dynamic policy for grouping maintenance activities