Powerfactor random value generation implemented in this commit.