These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

Science & Industry

 
  • Topic is locked indefinitely.
 

Reprocessing Formula weirdness

Author
Offspring Doshu
Sajuuk-Kharr
#1 - 2015-01-08 22:12:26 UTC  |  Edited by: Offspring Doshu
Hi, I've been trying to set up a spreadsheet for reprocessing and I'm encountering an issue that doesn't seem to have been answered on the forum. The issue is with the formula which I took from here http://eve-industry.org/export/IndustryFormulas.pdf

Rate = Facility Modifier * (1 + 0.03 * Reprocessing) * (1 + 0.02 * Reprocessing Efficiency) * (1 + 0.02 * Ore Specific Skill) * Implant Modifier * (1 - Station Tax)

Station Tax = 5% - (0.75% * Corporation Standing)

Facility Modifier 0.50
Implant Modifier 1.00
Reprocessing 5.00
Reprocessing Efficiency 4.00
Ore Specific Skill 0.00
Corporation Standing 0.52

Scordite exemplifies my issue (Base units / In-Game reprocess amount / Spreadsheet reprocess amount):

Tritanium 346 || 204 || 205
Mexallon 173 || 102 || 102

What is basically bugging me is that extra Tritanium that my spreadsheet calculates (OCD much?). I am not sure what is causing it but I tried approaching it as the game does. I tried the following:

Final results = Base Units - round (Unrecoverable) - round((Reprocessed)) * Tax)

Reprocessed = Base Units - round (Unrecoverable)

Scordite______Tritanium____ Mexallon
Base__________346_______173
Unrecoverable___132________66
Reprocess______214_______107
Tax_____________10_________5
Final___________204_______102


If I try it this way it seems to give me the same results as in-game. Can someone point the error of my ways?

Thanks!
Rawketsled
Generic Corp Name
#2 - 2015-01-09 03:50:12 UTC
What rounding function are you using?

You might want to try swapping it to a Floor function (or vice versa).
Offspring Doshu
Sajuuk-Kharr
#3 - 2015-01-09 08:21:40 UTC  |  Edited by: Offspring Doshu
It is my understanding that for POS you round down and for NPC Station you round to the next integer. Either way it doesn't change anything if I use a different round function. In the example I just used round(). Doesn't this function the same as floor?
Aerie Evingod
Midwest Miners LLC
#4 - 2015-01-09 15:22:39 UTC
You have another problem too... You don't get mex from scordite.
Offspring Doshu
Sajuuk-Kharr
#5 - 2015-01-09 15:40:17 UTC
Hah true. That is besides the point though. The numbers are correct I just forgot to change the column header.
Velicitia
XS Tech
#6 - 2015-01-09 16:33:49 UTC  |  Edited by: Velicitia
Offspring Doshu wrote:
It is my understanding that for POS you round down and for NPC Station you round to the next integer. Either way it doesn't change anything if I use a different round function. In the example I just used round(). Doesn't this function the same as floor?



not necessarily, as it will round up or down based on where it falls (e.g. 204.5 = 205, and 204.4 = 204).

On the other hand, floor() will ALWAYS shove it down to the previous integer (so even 204.999999999999 = 204).

Edit --- maths work fine for me

Station 0.5
Implant 0
Repro 5
Eff 4
Ore 0
Standing 0.52

Tax 0.0461

Base Yield 346

Skills 214.866
Less Tax 9.9053226
Result 204.9606774
FloorResult 204

One of the bitter points of a good bittervet is the realisation that all those SP don't really do much, and that the newbie is having much more fun with what little he has. - Tippia

Regnar Avastum
#7 - 2015-01-09 18:19:05 UTC
Velicitia wrote:
[quote=Offspring Doshu]


The formula posted by the OP is flawed. Velicitia in the example given (Scordite) you are correct, you reached the correct value but only by chance. Here is the example of Kernite using your method and my own:

http://gyazo.com/1fe769174d09057c7739fc71c2b8118f

The normal formula yields a difference of 1 for the second material (difference from in game final values).

I've tested all the ores and ice in station and at a POS. My method seems to give the correct answers.

Rate = Facility Modifier * (1 + 0.03 * Reprocessing) * (1 + 0.02 * Reprocessing Efficiency) * (1 + 0.02 * Ore Specific Skill) * Implant Modifier

Net Yield = floor(Rate * Base Units) - round [ floor(Rate * Base Units) * Station Tax ]

Station Tax = max(0, 5% - (0.75% * Corporation Standing)

The problem seems to be with the fact that in order to calculate the final yield you first calculate yield based on skills/implants/station attributes, hence the "Rate". Out of that value, that must be rounded using floor(), we substract the station tax which again must be rounded() and we reach the final value.

This is the only way I managed to reach the same numbers seen in game.
Velicitia
XS Tech
#8 - 2015-01-09 20:52:39 UTC
Regnar Avastum wrote:
Velicitia wrote:
[quote=Offspring Doshu]


The formula posted by the OP is flawed. Velicitia in the example given (Scordite) you are correct, you reached the correct value but only by chance. Here is the example of Kernite using your method and my own:

http://gyazo.com/1fe769174d09057c7739fc71c2b8118f

The normal formula yields a difference of 1 for the second material (difference from in game final values).

I've tested all the ores and ice in station and at a POS. My method seems to give the correct answers.

Rate = Facility Modifier * (1 + 0.03 * Reprocessing) * (1 + 0.02 * Reprocessing Efficiency) * (1 + 0.02 * Ore Specific Skill) * Implant Modifier

Net Yield = floor(Rate * Base Units) - round [ floor(Rate * Base Units) * Station Tax ]

Station Tax = max(0, 5% - (0.75% * Corporation Standing)

The problem seems to be with the fact that in order to calculate the final yield you first calculate yield based on skills/implants/station attributes, hence the "Rate". Out of that value, that must be rounded using floor(), we substract the station tax which again must be rounded() and we reach the final value.

This is the only way I managed to reach the same numbers seen in game.



There's no difference between doing it your way and my way ... "luck" had nothing to do with it. I just wrote it out quickly and a little more broken out than necessary.

Floor (((Base * Rate) * (1- Tax)),1) results in the same answer (I think, posting from phone).

One of the bitter points of a good bittervet is the realisation that all those SP don't really do much, and that the newbie is having much more fun with what little he has. - Tippia

Regnar Avastum
#9 - 2015-01-09 21:04:58 UTC  |  Edited by: Regnar Avastum
Don't wanna disagree but there is a difference as I exemplified in the provided link. I typed the exact same formula you mentioned and it gives a different result than in game.

I might be missing something but I don't see what since it works perfectly.

Here is the same example with more info (the final Tax and Skills rows are for your formula) http://gyazo.com/5b07cd9ae1dbd0ac99713c6cc2bf78ac

floor( 158.16) is not equal to floor(165.80) - round (7.64) = and the latter gives the correct answer.
Velicitia
XS Tech
#10 - 2015-01-09 21:55:10 UTC
OK, Got home and re-read things.

Confirming OP's maths are wrong, and I had missed a round (or floor) somewhere.

One of the bitter points of a good bittervet is the realisation that all those SP don't really do much, and that the newbie is having much more fun with what little he has. - Tippia

Offspring Doshu
Sajuuk-Kharr
#11 - 2015-01-17 16:26:42 UTC
Sorry, forgot to check back :)). i tried doing it the way regnar described and it works! Thanks for the input guys.
KenFlorian
Jednota Inc
#12 - 2015-02-08 19:19:25 UTC
Hi Offspring,

Are you willing to share your sheet? I've been working on this myself and would greatly appreciate it.