Skip to content
This repository was archived by the owner on Jul 5, 2025. It is now read-only.

alifyasa/wardrobe-inventory-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wardrobe Inventory Simulation

How it Works

  1. Everyday at SHOWER_TIMES, mark current outfit as DIRTY and get a CLEAN outfit.
  2. Use exponetial distribution with MEAN_LAUNDRY_PER_WEEK to determine laundry times. This has a hard limit of MAX_LAUNDRY_PER_WEEK and MAX_LAUNDRY_PER_WEEK. Laundry marks every DIRTY outfit as BEING_CLEANED.
  3. After a laundry is done, schedule next laundry at 5 am tomorrow. This marks BEING_CLEANED outfits as CLEAN.

The aim is to determine the minimum amount of clothes I need to have.

Result

Using this configuration

var SIMULATION_DURATION_HOUR = 40 * 365 * 24

var SHOWER_TIME = []int{6, 17}

const MEAN_LAUNDRY_DURATION_HOUR = 24
const MIN_LAUNDRY_DURATION_HOUR = MEAN_LAUNDRY_DURATION_HOUR / 2
const MAX_LAUNDRY_DURATION_HOUR = MEAN_LAUNDRY_DURATION_HOUR * 3

I got this result

WARDROBE INVENTORY SIMULATION (2024-12-15T09:49:08+07:00)

Simulated Time (Hours)  : 350400
Total Outfit            : 15
Logs Path               : logs/2024-12-15T09:49:08+07:00.json

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Contributors