Skip to content

sofayam/routine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A generator for daily routines

Operation

Run the main.py routine with your python interpreter (not included), to create a csv file.

To generate a new routine, edit the main.py file and change the Habits array, and the call to the Diary constructor.

Internals

The routine is generated through the definition of Habits which lead to activity when the habit fires.

For each day, each habit which has been defined is evaluated in order of definition.

Each habit which fires for a given day is assumed to allocate a block of time directly following the previous habit. The only exception is when the insert parameter is used, see below.

Parameters for Habit constructor:

Mandatory

  • days: days on which the habit may fire
  • dest: the destination where the habit is pursued - this is either a string or a tuple containing a base string and a limit number. In the latter case a string is constructed using the base string and a random number between 1 and the limit.
  • dur: duration of activity

Optional

  • prob: probability (in percent) with which the habit will fire
  • start: this starts the habit at a given time if there has been no preceding activity that day
  • insert: start the habit at the given time and return to the immediately previous destination after the given duration

Parameters for Diary constructor

  • name: this defines the name of the generated csv file
  • length: the number of days generated
  • startloc: the name of the starting location used every morning
  • wake: start time for activities every morning

see main.py for examples of use

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published