Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Weekly Challenges

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

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #123: When will Rabbits Rule the World?

Ayelavan
6 - Meteoroid

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

 

Here is my solution

 

Workflow:

Spoiler
Workflow.PNG

Macro:

Spoiler
Macro.PNG
Tim_Palmer
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.

Tim_Palmer
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

Beastmode314
6 - Meteoroid

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

Ruud
10 - Fireball

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?

patrick_digan
17 - Castor
17 - Castor

@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.

 

 

patrick_digan
17 - Castor
17 - Castor

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

Tim_Palmer
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..

 

 

Beastmode314
6 - Meteoroid

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

patrick_digan
17 - Castor
17 - Castor

@Beastmode314 wrote:

I have some Dead Rabbits reproducing.


the horror!