Implemented the penalizing function and the VM assignment protocol