What changes should be made to the DGM calculation in the presence of miners that are mining at different difficulty levels? For example, a pool that dynamically adjusts difficulty based on the users hashrate, or one that allows the user to select their own target value?
It's more or less the same, but instead of p=1/D you should use throughout p=d/D, where d is the difficulty of the current share submitted.