Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: Calculation for Woodcutting rate  (Read 3391 times)

Zironic

  • Bay Watcher
  • [SDRAW_KCAB]
    • View Profile
Re: Calculation for Woodcutting rate
« Reply #15 on: August 09, 2008, 07:11:27 pm »

Or if you want to figure out how many total trees you can cut in a total amount of time - say 2 years - then you need to know how long it takes for trees to grow to be cut agian in that time span/.
Logged

LordZabujca

  • Bay Watcher
    • View Profile
Re: Calculation for Woodcutting rate
« Reply #16 on: August 09, 2008, 10:41:18 pm »

If he wants to know how long it takes to clear out an entire map of wood, then yes, knowing the growth rate of new trees is important.

In extremely unlikely cases, maybe - the trees take 3 years to grow from a sapling to a cuttable tree, and your woodcutter should normally cut all available wood in less than 1. So yeah, it pretty much doesn't matter.

Oh, and this "fixed" equation is still very silly. Admit it Ziornic - you just hate math, eh?
Logged

Zironic

  • Bay Watcher
  • [SDRAW_KCAB]
    • View Profile
Re: Calculation for Woodcutting rate
« Reply #17 on: August 09, 2008, 10:55:53 pm »

No I love math. This formula is extremely broken because it assumes the dwarf will never get injured, or sleep or have other issues. It was just me and a friend, who took a year of calculus talking about how to calculate woodcutting * JOKINGLY*

-PS I got a 5 on my AP Calc test.
Logged

Keldor

  • Bay Watcher
  • Blood for the blood god!
    • View Profile
Re: Calculation for Woodcutting rate
« Reply #18 on: August 09, 2008, 11:42:42 pm »

I noticed a couple problems with your usage of d's.  Namely the ((dC+L+S)-J)/dt bit.

Let's see if I can fix the formula...

let D = density
let M = max trees
let A = area
let T = trees cut
let G = trees grown
let G0 = initial trees on map
let C = base cutting rate
let L = skill level modifier
let S = stat modifier (Agility)
let Rl = base rate of skill gain per trees cut = dL/dT
let Rs = base rate of stat gain per trees cut = dS/dT
let Rsj = base rate of stat gain when doing things other than cutting trees
let Rt = base rate of tree growth
let J = percentage of time actually spent with tree cutting job (including traveling, so if there was no other job than cutting, this would be 1.00 or 100% )

then,

dT/dt = J*(S*D+C*L)
D = A/(G0+G-T)
dG/dt = Rt*(M-(G+G0-T))
dL/dt = J*Rl*dT/dt
dS/dt = J*Rs*dT/dt + (1-J)*Rsj

We can at least do a bit of work on this.

let L0 = initial level
let S0 = initial skill

L = J*Rl*T+L0
S = J*Rs*T + t*Rsj*(1-J)+S0

So can reduce it to two simultainuous differential equations.

dT/dt = J*(A*(J*Rs*T + t*Rsj*(1-J)+S0)/(G0+G-T)+C*(J*Rl*T+L0))
dG/dt = Rt*(M-(G+G0-T))

let Q = current trees standing = G+G0-T

then we can write the equations simply as:

dT/dt = J*(A*(J*Rs*T + t*Rsj*(1-J) + S0)/Q + C*(J*Rl*T+L0))
dG/dt = Rt*(M-Q)

next, differentiate Q

dQ/dt = dG/dt-dT/dt

factor, as much as possible, each equation into terms of T, Q, and G
dT/dt = (J*J*A*Rs*T+J*A*Rsj*t-J*J*Rsj*t+J*S0)/Q + (C*J*Rl)*T +C*L0
Q*dT/dt = T*(J*J*A*Rs+(C*J*Rl)*Q)+t*(J*A*Rsj-J*J*Rsj+(C*L0))+Q*(C*L0)+J*J*A*S0

we end up with something of the form:

Q*dT/dt = (k1+k2*Q)*T+k3*t+k4*Q+k5

differentiate both sides:

QT''+Q'T' = k1T'+k2QT'+k2Q'T+k4*Q'+k3
QT''+Q'T' = (k2T')Q+(k2T+k4)Q'+k1T'+k3

further solving is left as an exercise for the student.
« Last Edit: August 10, 2008, 12:09:36 am by Keldor »
Logged
If ignorance is bliss, why are my dwarves all tantruming?

LordZabujca

  • Bay Watcher
    • View Profile
Re: Calculation for Woodcutting rate
« Reply #19 on: August 10, 2008, 12:19:25 am »

Wait, what? You're calculating the density by dividing the AREA by the number of trees, not the other way around? How does that make any sense?
« Last Edit: August 10, 2008, 02:30:40 am by LordZabujca »
Logged

Zironic

  • Bay Watcher
  • [SDRAW_KCAB]
    • View Profile
Re: Calculation for Woodcutting rate
« Reply #20 on: August 10, 2008, 02:19:12 am »

I noticed a couple problems with your usage of d's.  Namely the ((dC+L+S)-J)/dt bit.

Let's see if I can fix the formula...

let D = density
let M = max trees
let A = area
let T = trees cut
let G = trees grown
let G0 = initial trees on map
let C = base cutting rate
let L = skill level modifier
let S = stat modifier (Agility)
let Rl = base rate of skill gain per trees cut = dL/dT
let Rs = base rate of stat gain per trees cut = dS/dT
let Rsj = base rate of stat gain when doing things other than cutting trees
let Rt = base rate of tree growth
let J = percentage of time actually spent with tree cutting job (including traveling, so if there was no other job than cutting, this would be 1.00 or 100% )

then,

dT/dt = J*(S*D+C*L)
D = A/(G0+G-T)
dG/dt = Rt*(M-(G+G0-T))
dL/dt = J*Rl*dT/dt
dS/dt = J*Rs*dT/dt + (1-J)*Rsj

We can at least do a bit of work on this.

let L0 = initial level
let S0 = initial skill

L = J*Rl*T+L0
S = J*Rs*T + t*Rsj*(1-J)+S0

So can reduce it to two simultainuous differential equations.

dT/dt = J*(A*(J*Rs*T + t*Rsj*(1-J)+S0)/(G0+G-T)+C*(J*Rl*T+L0))
dG/dt = Rt*(M-(G+G0-T))

let Q = current trees standing = G+G0-T

then we can write the equations simply as:

dT/dt = J*(A*(J*Rs*T + t*Rsj*(1-J) + S0)/Q + C*(J*Rl*T+L0))
dG/dt = Rt*(M-Q)

next, differentiate Q

dQ/dt = dG/dt-dT/dt

factor, as much as possible, each equation into terms of T, Q, and G
dT/dt = (J*J*A*Rs*T+J*A*Rsj*t-J*J*Rsj*t+J*S0)/Q + (C*J*Rl)*T +C*L0
Q*dT/dt = T*(J*J*A*Rs+(C*J*Rl)*Q)+t*(J*A*Rsj-J*J*Rsj+(C*L0))+Q*(C*L0)+J*J*A*S0

we end up with something of the form:

Q*dT/dt = (k1+k2*Q)*T+k3*t+k4*Q+k5

differentiate both sides:

QT''+Q'T' = k1T'+k2QT'+k2Q'T+k4*Q'+k3
QT''+Q'T' = (k2T')Q+(k2T+k4)Q'+k1T'+k3

further solving is left as an exercise for the student.

Alas I said: This formula is very basic and many things are left out or assumed.  I would differentiate both sides - however I lack the time or patient for a large problem. But taking quick glimpses of your formula. Ok Now assuming the k's are constants - because it just makes sense.

So far, Q= [Q'(K2T+K4-T')+K1t'+k3]/(T''-K2T')

I run into trouble further when trying to figure out what the K's represent as constants.

However I remember the question is of the rate of trees cut so T' needs to be solved for too.

T=[T'(Q'-K1-K2Q)-K4Q'-K3+QT'']/(K2Q')

T'=[Q'(K2T+K4)+K3-QT'']/(Q'-K1-K2Q)
Logged

Torak

  • Bay Watcher
  • God of Gods of Blood.
    • View Profile
Re: Calculation for Woodcutting rate
« Reply #21 on: August 10, 2008, 02:43:14 am »

Takes about half a second for a legendary dwarf with Mighty strength to cut a tree down at 100-105 fps, so I'd assume that in a 1x1 local tile,s he can cut all of it down in about 1500-1600 frames.

Not taking into account movement and sleep. (what was the fancy word for this, dead-something)
Logged
As you journey to the center of the world, feel free to read the death announcements of those dwarves that suffer your neglect.

One billion b-balls dribbling simultaneously throughout the galaxy. One trillion b-balls being slam dunked through a hoop throughout the cosmos. I can feel every single b-ball that has ever existed at my fingertips, I can feel their collective knowledge channeling through my veins. Every jumpshot, every rebound and three-pointer, every layup, dunk and free throw.

Draco18s

  • Bay Watcher
    • View Profile
Re: Calculation for Woodcutting rate
« Reply #22 on: August 10, 2008, 03:17:23 am »

Not taking into account movement and sleep. (what was the fancy word for this, dead-something)

Dead heading.  Heading, as in direction, dead as in useless.
Logged

axus

  • Bay Watcher
  • Axe Murderer
    • View Profile
Re: Calculation for Woodcutting rate
« Reply #23 on: August 13, 2008, 05:02:20 pm »

Thanks for sharing  ;D
Logged
Pages: 1 [2]