Skip to content

Instantly share code, notes, and snippets.

@shiftkey
Created January 18, 2013 03:42
Show Gist options
  • Save shiftkey/4562167 to your computer and use it in GitHub Desktop.
Save shiftkey/4562167 to your computer and use it in GitHub Desktop.
Waste Collection Type Calculation Algorithm
EXAMPLE 1
IF the Collection Day (in WASTE_COLLECTION_DAYS dataset) is “WEDNESDAY EVEN”
THEN
The Household’s General Waste will be picked up every WEDNESDAY and
IF the current week is designated as an EVEN week (in WASTE_COLLECTION_WEEKS_REFERENCE_TABLE dataset)
THEN
The Household’s Recycled Waste will be picked up that week
ELSE
The Household’s Green Waste will be picked up that week
ENDIF
ENDIF
EXAMPLE 2
IF the Collection Day (in WASTE_COLLECTION_DAYS dataset) is “FRIDAY ODD”
THEN
The Household’s General Waste will be picked up every FRIDAY and
IF the current week is designated as an ODD week (in WASTE_COLLECTION_WEEKS_REFERENCE_TABLE dataset)
THEN
The Household’s Recycled Waste will be picked up that week
ELSE
The Household’s Green Waste will be picked up that week
ENDIF
ENDIF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment