Page 1 of 2

cost pricing appears to not be working

Posted: Thu Aug 04, 2011 9:37 am
by Guest
usually the warehouse will aggregate the cost of goods. That means if you buy 10,000 of an item for 10.00 each, and then you buy another 5,000 of the same item for 5.00 each .... the "cost" of the item in your ware house will show up as 15,000 items at an average cost of 7.50 each.

I tested this function tonigh with 30 million herbs, q 0.

First I shipped 27 million to myself at 18.50 each. Then I shipped the balance of 3 million herbs to myself at 150.00 each - emptying the warehouse of q 0 herbs.

Then I accepted my contract for 27m @ 18.50 each and checked the warehouse to confirm cost recorded at 18.50. I followed by accepting the second contract for 3 million q 0 herbs, priced at 150.00 each. When I checked the warehouse pricing - all 30 million were listed at 18.50 each

Posted: Thu Aug 04, 2011 12:15 pm
by pearlbay
Hi BoneChanter,

I'll pass this on!

Best regards,

pearlbay

Posted: Sat Aug 06, 2011 10:35 pm
by Guest
this appears to only happen (to me) when you are "buying" contracts you have sent to yourself.

I "bought" a shipment of pears I had produced myself at 2.50 per pear, 500,000 items ; once that was in my warehouse - I went to the market and bought 200,000 more pears from the market @ 100.00 each.

I ended up with 700k pears priced at a correct avg. of 36.36 each.

When I did the same with cherries - but in the reverse order - the items only showed the market purchase price.

(1) went to market, bought 200,000 cherries at 90.00 ; now warehouse shows 200k cherries, 90 per item.

(2) went to contracts and "bought" 500,000 cherries I produced myself at 2.50 per item.

(3) warehouse now shows 700,000 cherries at an (incorrect) avg price of 90.00 each.

Posted: Mon Aug 08, 2011 10:47 am
by pearlbay
Hi Bonechanter,

thanks for the feedback, I'll pass this on!

Cheers,

pearlbay

cost accounting fails

Posted: Fri Aug 26, 2011 9:15 am
by Guest
this problem continues. Usually occurs when combining items held in contract with items purchased at market.

Example (1) I hold 2 million q:0 grain in a contract I shipped to myself, at cost/value 2.50 per grain

(2) I currently have NO q:0 in my inventory

(3) I buy 10,000 q:0 grain at 100.00 each

(now there is 10,000 q:0 grain in inventory)

(4) I "accept the shipment of 2 million q:0 grain to myself @ 2.50 per

result = 2,010,000 q:0 grain @ 100.00 each

The rules about "cheating" make a BIG DEAL about never selling
something for LESS than it Cost.

If your not going to implement cost tracking, then you can forget about asking us to follow it.

Posted: Fri Aug 26, 2011 10:33 am
by Duffhead
Hello,

I'll have the programmer look into this again.

Posted: Fri Aug 26, 2011 4:23 pm
by Duffhead
Here's the answer I received:

The problem is that we differentiate one and the same product by its quality. Example: If you have cereal Q0 in your storage with an average price per unit of 1,00, and you buy new cereal Q0 with a higher price, the two lots are put together, and a new ppa is calculated by the average.

Posted: Sat Aug 27, 2011 9:08 am
by Guest
the two lots are put together, and a new ppa is calculated by the average
The complaint is that this is failing to occur. If you buy 10 q:0 items at 5.00
and ten more at 10.00 ; you should end up with 20 items at an avg ppa of
7.50.

((10 * 5) + (10 * 10) )/20 = 7.50 NOT 10.00 !

This does not occur , instead you end up with 20 items priced at the
cost of the last item purchased.

I don't understand what part of the math you fail to comprehend ?

If I buy 2,000,000 grain q:10 for 2.50 , and then buy another 10,000 q:10 grain for 100.00, the ppa for 2,010,000 q:10 grain should be 2.985.
But the warehouse says its 2,010,000 grain at ppa 100.00

(2,000,000 * 2.5) = 5,000,000
(10,000 * 100) = 1,000.000

(5,000,000 + 1,000,000) = 6,000,000

6,000,000 / 2,010,000 = 2.985

a picture story

Posted: Tue Aug 30, 2011 1:16 am
by Guest
apparently describing the malfunction in text is not sufficient so we'll try it with picture2.

Step 1.

I produce cherries 489,380, q.0 and place them in my warehouse.
the ppa = 2.50


Step 2.

I open and accept a contract I sent to myself for cherries I had previously purchased. So now I have added the old cherries to the new cherries.
"new cherries" = 1,225,481 cherries, q.0 : price/ppa = 33.07

Image

Step 3.

Lets look at what the math should be.

cherries (1) 489,380 q.0 @ 2.50 = total cost = 1,223,450.00
cherries (2) 1,224,481 q.0 @ 33.07 = total cost = 40,526,656.67

cherries (1) + cherries (2) = total cherries = 1,714,861

total cost (1) + total cost (2) =
total cost of cherries in warehouse = 41,750,106.67

ppa = (total cost) // divided by (total inventory)

41,750,106.67 // 1,714,861 = 24.34

ppa should be 24.34

Step 4

Now lets look at what the warehouse shows for the total ppa

Image


As you can see the warehouse says all the cherries are worth only 2.50.

This is wrong, please correct the pearl script.

Posted: Tue Aug 30, 2011 10:22 am
by Duffhead
It is not wrong, your calculations simply don't suffice for the algorithms in the code.

We see what you're trying to say, and the calculation in the game could be similar to what you listed here, but as far as we can tell, you take the purchase price as a starting point. However, the price in the storage is the manufacturing price. As far as I know, the price isn't as easily calculated in the code as you demonstrate, but there are also rounding functions etc.

Posted: Wed Aug 31, 2011 2:32 am
by Guest
If your "ppa" is not based on the cost, then is a meaningless number. Which is how your "agorithm" takes an item a person PAID 100.00 for
and says it "COST" only 2.50.

Or you can just explain how I PAY 100.00 and your ppa number = 2.50.

PPA= PAY to BUY - AND - PAY to manufacture

You pretend no one manufactures ANYTHING. You pretend the only way to own material is to buy it at market.
Your PPA must account for Buying AND manufacturing. Your "algorithm" FAILS to account for manufacturing.

The "algorithm" was working prior to the update. This has only become an issue AFTER the update. Therefore I believe someone who has no understanding of the "cost of goods" has modified the algorithm.

The "PPA" is the average price of an item. The average price of an item is the sum of ALL COSTs you pay to aquire an item.

Example: grain q.0

(a) if I BUY grain q.0 , I may PAY 100.00 each to aquire (1) grain q.0

HOW MUCH DID I PAY ? (100.00) My ppa = 100.00

(b) If I PRODUCE grain q.0, I PAY 2.50 to aquire (1) grain q.0.

HOW MUCH DID I PAY ? (2.50) My ppa = 2.50

(c) If I BUY and I also PRODUCE grain q.0,

the ppa = everything I pay // divided by how many I aquire

the ppa = (mfg cost + market cost) // divided by inventory count.

1) If I produce 100 grain q.0 at manufacturing cost 2.50, how much did I PAY to get 100 grain q.0 ?

(100 x 2.50) = 250.00

2) If I BUY 100 q.0 grain at 100.00, how much did I PAY to get 100 q.0 grain ?

(100 x 100) = 10,000


3) If I BUY (100 grain q.0) and also PRODUCE ( (100 grain q.0),

HOW MUCH DID I PAY ? I PAY 250.00 PLUS PAY 10,000 for a TOTAL 200 grain q.0.
I PAY TOTAL 10,250 for 200 q.0 grain

What is the COST of each grain ? The cost is WHAT I PAY !! (10,250//200)

(250.00 + 10,000) // 200 = 51.25 , NOT 2.50 !!

You want to ignore manufacture cost and that is not how "COST" is defined. "COST" has to be what you pay to BUY or produce.
It cannot be just the cost to buy.

I don't have the willingness to explain this this again. You can put as many meaningless numbers in this game you desire.
Until your PPA = the COST, it is meaningless.

Posted: Wed Aug 31, 2011 7:33 am
by Guest
Hi Duffhead,
Duffhead wrote:It is not wrong, your calculations simply don't suffice for the algorithms in the code.

... However, the price in the storage is the manufacturing price. ...


Of course we all don't know your codes but the price in the storage was always - this means before the update - a "calculated" average price between produced and bought goods (I tested that at the beginning as well) and not any "manufacturing price" - whatever that means because the price changes with ranking, quality and prices of needed goods.

When you changed your calculation algorithm and I cannot believe in the prices in my storehouse anymore it would be nice to know! Then my entire optimization sheet cannot be updated ... awful situation in my opinion!

kind regards,
Volki

Posted: Wed Aug 31, 2011 8:19 am
by Guest
I did my own simple test now! Follow the results ...

I have halberds Q2 on the market for 950ct - since weeks.

Testing 1:
I buy one and in my storehouse the price is 950ct - fine
I send one to the market at 1,050ct - fine
I buy another one for 950ct and in my storehouse it is for 950ct - fine
Now I buy the one for 1,050ct and the price in the storehouse for both is 950ct instead of 1,000ct - WRONG!

Testing 2:
ok, maybe the system knows these halberds are mine and it does not want to change the price for any reason so I send both to the market for 1,050ct - fine
Now I buy both for 1050ct back & the storage shows 1050ct - fine but this means that the system does not know that these halberds are mine and Testing 1 shows an error ! ! !

Testing 3:
I have now 2 halberds at 1,050ct in my storehouse
I buy 2 halberds at 950ct from the market
Now my storehouse says 4 halberds for 1,050ct - again WRONG !

Please can you explain this kind of algorythm or send it to the programers because it seems that since the update is something wrong with the calculation of prices!

Please, don't be angry about me but I have to add this here ... none of these prices in the storage are "the manufacturing prices". It never was!

Check my account I did not delete the messages - User-ID:2323

Thanks, Volki

p.s.: I would propose to move this topic to the bug section because we are talking about a bug here - BoneChanter is right - thanks for being so bullheaded! :-)

Posted: Wed Aug 31, 2011 12:56 pm
by Duffhead
As far as I know, nothing was changed. I'll ask the programmer again.

Posted: Thu Sep 01, 2011 9:10 am
by Duffhead
Alright, here's the programmer's response: Two people (one support member and the programmer) were testing this again here and also in the German version. According to them, the calculations made by the game are correct.

The tests were very elaborate; they comprised market and contract transactions.

Additionally, the calculation in the storage is done to give you an approximate value. The unit price shown does not flow in in any calculations used further in the game. Anyhow, when trading, you should in any case stick to the market prices.