Days and Months

Nicolás Munafó
Preview of Days and MonthsPreview of Days and Months

About this model

This diagram models a time tracking system, intricately designed to simulate the passage of days and their aggregation into weeks and months within a simulated environment. It initiates with a source node labeled "Days," which produces resources representing individual days. These resources are then accumulated in a pool node titled "Day," effectively counting the progression of time. The system employs four registers to analyze and interpret the flow of time further. One register determines the start of a new week by checking if the current day modulo 7 equals zero, effectively identifying every seventh day. Another register calculates the current month number by dividing the day count by 30 and adding one, assuming every month to have 30 days for simplicity.

Additionally, a third register computes the week number by dividing the day count by 7 and adding one, thereby tracking weeks. The fourth register is configured to detect the first day of each month by checking if the day modulo 30 equals zero, representing a simplistic monthly cycle. Throughout this diagram, state connections transmit the value of the day from the "Day" pool to each register, allowing these computational nodes to assess and update based on the passing of each day. This design creates a dynamic system capable of simulating an ongoing calendar, providing outputs that indicate week and month transitions, aligned with a simplified understanding of time measured in days.

“Days and Months” is a public Machinations diagram by Nicolás Munafó, shared in the Machinations Community.

You can open the original diagram in the Machinations app, press Play to watch how resources move through it, and change its values to see how the system responds. Machinations is a visual tool for designing, simulating and balancing game economies and other systems, where resources flow through sources, pools, drains, converters and gates.