Page 1 of 1

Is my QRB calculation right?

Posted: Thu Aug 15, 2019 6:00 pm
by tmontney
This is for a project I'm working on.

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))
}
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)?

Re: Is my QRB calculation right?

Posted: Thu Aug 15, 2019 9:57 pm
by toTOW
Your formulas are correct : https://foldingathome.org/support/faq/p ... determined

Keep this in mind :
Deadline_length and Elapsed_time are measured in days to one decimal point.
In the old days of FAH, some projects were worth less than 1 point (0.6 for instance), but I think it has been a while that projects are using integer as base point.

Re: Is my QRB calculation right?

Posted: Fri Aug 16, 2019 2:26 pm
by tmontney
toTOW wrote:In the old days of FAH, some projects were worth less than 1 point (0.6 for instance), but I think it has been a while that projects are using integer as base point.
Sweet, thanks.