Is my QRB calculation right?
Posted: Thu Aug 15, 2019 6:00 pm
This is for a project I'm working on.
I'm interfacing with the telnet client. With the recent change in QRB calculations, I want to make sure I get a constant points value, something I can store and apply calculations later to (say the K constant value changes). For instance, I'd refer to queue-info and its basecredit value, then store that for later. If I wanted to perform a QRB calculation later (or any other calculation), I could.
Is that a safe bet? Is my QRB calculation above correct? Are base points always Integer value (aka always a whole number)?
Code: Select all
function Get-QRB($base_points, $TimeAssigned, $TimeFinished, $Deadline){
$k = 0.75
$deadline_length = [Math]::Round(($TimeAssigned - $Deadline).Days, 1)
$elapsed_time = [Math]::Round(($TimeAssigned - $TimeFinished).Hours / 24, 1)
return $base_points * [Math]::Max(1, [Math]::Sqrt($k * $deadline_length / $elapsed_time))
}
Is that a safe bet? Is my QRB calculation above correct? Are base points always Integer value (aka always a whole number)?