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.
Previous page12
 

ME formula ROUNDING issue.

Author
Lutz Major
Austriae Est Imperare Orbi Universo
#21 - 2012-06-27 20:54:16 UTC
Lek Arthie wrote:
I suppose you mean this

raw materials: 2 * (1.2 * 1.2 + (0.1 / (1 +0))) = 3.08
extra materials: 1 * (1.2 * 1.2) = 1.44

for both the equations, cause thats the only way i can find your results.

But still if i use this formula then the isogen requirement is wrong.
With that formula and using rapid assembly line:

pe 1
isogen 3 <---- correct

pe 5
isogen 3 <----- thats wrong, it should be 2.

SadSadSad


Yes, of course I meant to multiply.

And, yes you are right, the math does not fit this way, because it's like

ROUND(raw) + ROUND(extra) and not ROUND(raw + extra) :( sorry for that - I should've checked my code the first way

Lek Arthie
Doomheim
#22 - 2012-06-27 21:36:42 UTC
If you round them separately then mexallon is again wrong (just like before)....
Its 4 instead of 5.

I dont know what is wrong, the formula seems to be just fine, i dont understand why this blueprint is so weird.
Lutz Major
Austriae Est Imperare Orbi Universo
#23 - 2012-06-28 17:24:21 UTC  |  Edited by: Lutz Major
Lek Arthie wrote:
If you round them separately then mexallon is again wrong (just like before)....
Its 4 instead of 5.

I dont know what is wrong, the formula seems to be just fine, i dont understand why this blueprint is so weird.

You sure, that you get 5 with Prod Eff 1?
I ran the numbers and got this quote:
[pre]
|============================================================|
| NAME | REQUIRED | MISSING | DMG/JOB | WASTE |
|============================================================|
| Raw Material (4x) | | | | |
|------------------------------------------------------------|
| Isogen | 2 | 3 | 100.00% | 50.0% |
| Mexallon | 3 | 4 | 100.00% | 33.3% |
| Pyerite | 3,644 | 4,214 | 100.00% | 37.5% |
| Tritanium | 4,394 | 5,081 | 100.00% | 37.5% |
|------------------------------------------------------------|
| Extra Material (4x) | | | | |
|------------------------------------------------------------|
| Isogen | 1 | 3 | 100.00% | |
| Mexallon | 1 | 4 | 100.00% | |
| Pyerite | 570 | 4,214 | 100.00% | |
| Tritanium | 687 | 5,081 | 100.00% | |
|------------------------------------------------------------|
| Skill (1x) | | | | |
|------------------------------------------------------------|
| Industry | 1 | 1 | | |
|------------------------------------------------------------|

Quote for: Tracking Link I, Material Efficiency Level: 0
Production Efficiency Skill: I, Production Slot Modifier: 1.2[/pre]

edit: DAMN YOU NEW BOARD!!!! for not having a PRE!!! - just quote and copy n' paste the bill of materials into a notepad ...

can you provide a screen shot of your BOM?
Lek Arthie
Doomheim
#24 - 2012-06-28 17:27:21 UTC  |  Edited by: Lek Arthie
Yes i tested in game. Using a rapid assembly line. With production efficiency 1 you get 5 mexallon and 3 isogen.
Where do you got that quote?
I tested on test server, but i dont think they have changed anything specifically on that blueprint.
Lutz Major
Austriae Est Imperare Orbi Universo
#25 - 2012-06-28 17:34:29 UTC
Lek Arthie wrote:
Yes i tested in game. Using a rapid assembly line. With production efficiency 1 you get 5 mexallon and 3 isogen.
Where do you got that quote?
I tested on test server, but i dont think they have changed anything specifically on that blueprint.

The quote comes from my private programs.
If you are sure about the 5, then I'll take a look into it on Singularity myself and erect a POS there and test this issue.
I spent quite a while on the code, so I'd like it to be right :)
Lek Arthie
Doomheim
#26 - 2012-06-28 17:42:21 UTC  |  Edited by: Lek Arthie
Yes i'm pretty sure its 5 mexallon, i checked it many times trying to figure out what is wrong.

If you can test it on test server with a PE level 1 char, please do and post here your results.
Yea i want the correct formula also, 1 mexallon might not be that much on this blueprint but i wonder if the formula gives wrong results on other more expensive materials.
Lek Arthie
Doomheim
#27 - 2012-06-28 22:11:13 UTC
Also note that if you round the raw and extra separately then the materials of lockbreaker blueprint are wrong. Only if you round them together you get correct results.
So maybe the problem with tracking link is not mexallon, but isogen which should be 2 instead of 3. (using rapid assembly with a level 5 PE skill).
Lek Arthie
Doomheim
#28 - 2012-07-01 21:08:15 UTC
Any chance for a CCP help on this issue? Smile
Lutz Major
Austriae Est Imperare Orbi Universo
#29 - 2012-07-03 18:55:12 UTC
Finally I got it, but I'm not pleased with the outcome :(

As a preface and reminder. There are three types of waste, which have to be applied to the base material quantity given in the database:

Material Waste: The base waste factor of every item is modified by the ME level of the blueprint. The formula for ME < 0 is MW = wasteFactor * (1 – ME), for all other it is MW = wasteFactor * (1 / (ME + 1)). With the "perfect ME level" there is no additional waste.
The wasteFactor is found in the invBlueprintTypes table of the database dumb. The number provided there should be considered in percent. So a waste factor of 10 equals 10%.

Skill Waste: The base skill waste for lack of knowledge is 25%. Each level of Production Efficiency reduces the waste by 5%. The formula is SW = 1.25 – (0.05 * PE level). With perfect PE, there is no additional waste.

Production Waste: Each assembly line has a material multiplier. Usually it is 1 (one), but for some assembly lines (Rapid Equipment, Advanced Small/Medium/Large Ship Assembly) it is higher. The formula is easy: PW = baseMaterialMultiplier
The baseMaterialMultiplier can be found in the ramAssemblyLineTypes of the data dump.


I’ve already showed in [1], that both raw and extra materials are subject to waste. Raw materials are affected by all three types of waste. Extra materials only by skill and production waste.
To determine the effective material quantity the formula looks like this:

Quantity = ROUND(rawMaterialQuantity * (SW * PW + MW) + baseExtraMaterialQuantity * SW * PW)

The rawMaterialQuantity is derived from the quantity to be found in the invTypeMaterials table, the baseExtraMaterialQuantity is the quantity from the ramTypeRequirements table from the database dump.
Mathew and Fubar explained in [2] how to calculate the material quantity (if an item in the ramTypeRequirements table is marked as recycle = 1, then the materials for this component have to be subtracted by the quantities of the actual item: e.g. the Gyrostab II has amongst other things 890 units of Tritanium as raw materials requirement and a recycle flagged Gyrostab I module as an extra material. Thus the 696 units of Tritanium for the Gyrostab I have to be removed from the raw quantity of 890, making 194 (= 890 – 696) units of Tritanium the new rawMaterialQuantity.

The problem: The formula above sometimes didn't work out as the OP already mentioned with the Tracking Link I.
Until this post, I was sure the rounding was done like in accounting: ROUND DOWN on values < 0.5, otherwise ROUND UP. Well, this is not true for every value: CCP rounds in favor for the user, when it comes to the number 2.5! Then the value is rounded down to 2!!!Sad

Take a look at this quote. It is the quote of a ME 0 Gyrostab I Blueprint (MW = 0.1), my char had a PE level of 3 (SW = 1.15) and I was building at a normal equipment array (PW = 1). The database dump states the raw material quantity of 2 units of Zydrine. So the above formula would give a final Quantity = ROUND(2 * (1.15 * 1 + 0.1) + 0 * 1.15 * 1) = ROUND(2.5) ... which would be normally 3, but the actual bill of material says 2 (and also uses up 2 units, when built!).

The same thing happend here (Tracking Link I, ME 0, PE 1, standard array) and here (Tracking Link I, ME 0, PE 5, rapid array)

As far as I can tell, all values above 2.5 are rounded correctly, like in accounting. Values between 1 and 1.499999999 are rounded down too. Above 1.5 and below 2 is rounded up. But I cannot test the behaviour of 1.5 (no such base quantity exists in the db!)


Peace Math is a lie!


[1] http://community.eveonline.com/ingameboard.asp?a=topic&threadID=1561558
[2] http://community.eveonline.com/ingameboard.asp?a=topic&threadID=1220024 (posts #30 and #31)
Zifrian
The Frog Pond
Ribbit.
#30 - 2012-07-03 20:03:15 UTC
Good rundown Lutz but I found that 2.5 is rounded up for some items as well. It's super confusing but appreciate you work in figuring it out.

Maximze your Industry Potential! - Download EVE Isk per Hour!

Import CCP's SDE - EVE SDE Database Builder

Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#31 - 2012-07-03 23:05:50 UTC
It /may/ be a floating point issue. I know javascript throws them sometimes with some of the code I've been using. (nothing fancy. just a *100, floor, then /100. I shouldn't end up with 6 decimals, but sometimes it happens.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Lutz Major
Austriae Est Imperare Orbi Universo
#32 - 2012-07-04 05:36:05 UTC
Zifrian wrote:
Good rundown Lutz but I found that 2.5 is rounded up for some items as well. It's super confusing but appreciate you work in figuring it out.

Nothing can be easy, can't it? *sigh*
Do you remember which items that were? I tested a some of the items with a raw material quantity of 2 units. And the only other item with one raw and one extra is the Tracking Link.
Wildly speculating: Maybe there are differences in the assembly lines?
Lutz Major
Austriae Est Imperare Orbi Universo
#33 - 2012-07-04 06:39:44 UTC
Steve Ronuken wrote:
It /may/ be a floating point issue. I know javascript throws them sometimes with some of the code I've been using. (nothing fancy. just a *100, floor, then /100. I shouldn't end up with 6 decimals, but sometimes it happens.

Yeah, I was thinking the same, but in the end, how can (1+1)*(1*1.2)+1*0.1 = 2.5 (raw+extra)*(SW+PW)+raw*MW generate a floating point defect? No dividends, No more than one digit after the comma.
Unless CCP does something really, really wired, ofc ;)
Lek Arthie
Doomheim
#34 - 2012-07-04 19:27:26 UTC
Was also trying to figure it out but with little success.
I think the formula is this:
ROUND(basemat+basemat(mewaste+stnwaste+pewaste))
But for those special blueprints like tracking link the only solution i found is that eve doesn't use normal round (arithmetic) instead it uses round to even.

Using round to even for those blueprints does fix the issue with tracking link. Unfortunately it doesn't work with blueprints like mega pulse laser i which is a normal blueprint.

I also don't like my solution either. I don't get why eve would use different rounding. If we can further our search to t2 blueprints similar to tracking link that produce ,5 decimals and investigate it further we might find something. But i'm really low on isk and cant really afford buying t2 bpcs. And those are not available on sisi.
I don't think we can be sure of the formula unless we find one that works globally.
Anyone else that can continue searching post here if you find anything.
Lek Arthie
Doomheim
#35 - 2012-07-10 10:45:11 UTC
Well round to even is not correct either... After checking eccm projector ii, only with normal round you can get the correct materials. I dont understand whats so special with that tracking link blueprint...
Previous page12