Weekly Challenge

Solve the challenge, share your solution and summit the ranks of our Community!
IDEAS WANTED

We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!

Submit Feedback
We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.

Challenge #123: When will Rabbits Rule the World?

Highlighted
Alteryx Certified Partner

Great question. Wasn't an easy solution but got there eventually. 

 

Here is my solution

 

Workflow:

Spoiler
Workflow.PNG

Macro:

Spoiler
Macro.PNG
Highlighted
6 - Meteoroid

This solution doesn't account for the point at which the rabbits born in month 2, 3, 4, 5, etc become 4 months old, meaning they can now give birth every month, only the original population, so it assumes all Rabbits "age>3" can all give birth when there should be a delay for every new litter.

Highlighted
6 - Meteoroid

Hi there,

 

I worked this one out in excel first as I'm very new to alteryx (see attached) and it looks to me like your solution may be incorrect.  Can you point out where your solution does the following:

 

- removes the females born in the preceding three months from the previous month's total rabbit population as they are too young to procreate, before calculating the number of males and females that are born in the current month and adding the number onto the previous month's rabbit population for the new total

- subtracts the number of rabbits that die (born in the -24)each month as part of the total rabbit population calculation before feeding into the above

 

I'm very new to alteryx and I'd love to understand where these elements are in your file.  

 

Many thanks

Highlighted
6 - Meteoroid

My Solution.  So, I took a different approach and decided to do this without using macros. Let me know what you think.

Highlighted
Alteryx Certified Partner

You had my curiousity, but now you have my attention: why do those conversion errors happen? The field type is set to int64, but the Multi-Row uses a float. However, those values should fit in a float, so: are these floating-point errors? @JoeM?

Highlighted
16 - Nebula
16 - Nebula

@Tim_Palmer I've modified your spreadsheet to match the provided solution. It's just a difference of opinion on the timing of births and deaths.

 

 

Highlighted
16 - Nebula
16 - Nebula

@Beastmode314 Impressive that you got that close with some generate rows tools!

Highlighted
6 - Meteoroid

I see, thanks for this.  So they missed the part in the brackets: (Alive months 0-23, die on the start of the 24th month).

 

As each month is dated the 2nd, by the time the 24th month comes round some rabbits should have died on the 1st day of the month..

 

 

6 - Meteoroid

I think I've found the issue: I have some Dead Rabbits reproducing.  I'll revise my solution...

Highlighted
16 - Nebula
16 - Nebula

@Beastmode314 wrote:

I have some Dead Rabbits reproducing.


the horror!