lpdgenerator
Linked parking data generator, generates dumps of parking data in the form of linked data.
This generator tries to mimic the real world by creating events of interest that give people a reason to park somewhere.
Usage
First install lpdgenerator:
npm install lpdgenerator -s
const lpdgenerator = require('lpdgenerator');
var generator = new lpdgenerator();
var output_files = generator.generate();
This output_files is an array with elements of this structure:
{
city // The city number that is described in this file
file_time // The time that this file describes
result // The linked data
}
There could be multiple files of one city when the files split.
And then run the program with an input file as parameter:
node myprog <input-file>
Input
There is an example input file in the root.
Name | Description | Default |
---|---|---|
cities:number | The number of generated cities | 1 |
parkings:min_num_per_city | The minimum number of parkings per city | 1 |
parkings:max_num_per_city | The maximum number of parkings per city | 1 |
parkings:min_spaces | The minimum number of spaces per parking | 100 |
parkings:max_spaces | The maximum number of spaces per parking | 100 |
parkings:min_min_occupation | The minimum value of the standard occupation | 0.1 |
parkings:max_min_occupation | The maximum value of the standard occupation | 0.3 |
time:start | The time from which the generation starts | "1970-00-00T00:00:00" |
time:end | The time at which the generation stops | "1970-00-00T01:00:00" |
time:time_per_file | The amount of time in seconds that will be put in one file | 3600 |
time:interval | The interval in seconds at which the parkings get updated | 30 |
file:output_meta_data | Bool to see if meta data should be put in the file | false |
file:split | If files of cities should be split, if false will ignore "time:time_per_file" | true |
events:day_variables | An object that should contain the variables for every day of the week | see later |
events:change_rate | The rate at which the parameters of the event distributions should change in minutes | 1 |
Events
The variables in "events:day_variables" will denote how events will be generated for that day.
Name | Description | Default |
---|---|---|
min_events | Minimum number of events that day | 0 |
max_events | Maximum number of events that day | 1 |
min_duration | Minimum duration of the events | 0 |
max_duration | Maximum duration of the events | 1 |
min_occupation | Minimum occupation of an event | 0 |
max_occupation | Maximum occupation of an event | 1 |
mean | Events get generated via a Normal distribution. This is the mean of that distribution | 12 |
standard_deviation | The standard diviation for the distribution | 1 |
Literature
Literature that could be of intrest: