Code Monkey home page Code Monkey logo

cdr-gen's Introduction

cdr-gen

This is a Call Detail Record (CDR) generator based on the CDR Tool, developed by Paul Kinlan.

Command-line Usage

To generate a dataset of CDR records and save at <output_file>:

java -jar cdr-gen.jar <output_file> [<config_file>]

The default configuration file is at src/main/resources/config.json, but a custom configuration can be given at <config_file>.

API Usage

// load the default configuration file
CDRGen generator = new CDRGen();
        
Population population = new Population(generator.getConfig());
population.create();

List<Person> customers = population.getPopulation();

for (Person p : customers) {
    for (Call c : p.getCalls()) {
        // do something
    }
}

Configuration Options

  • callsMade: the average and standard deviation number of calls made by each customer.
  • numAccounts: the number of customers that will generate calls.
  • startDate and endDate: the period when the calls will be made.
  • callTypes: a list with all the call types, for now the Local type is the only obligatory.
  • dayDistribution: the probabilities of a call happening in each day of the week.
  • offPeakTimePeriod: the off peak is a period of time with reduced prices, it happens in the weekends and in the weekdays in a certain period of time, configured by this parameter.
  • outgoingCallParams: for each type of call it gives the cost of the minute, the average and standard deviation of the duration of a call within or not the off peak period and the probability of the call type happening.
  • outgoingNumberDistribution: the average and standard deviation number of phone number for each type of call. It is used to build the set of phone numbers that a customer can call.
  • phoneLines: how many phone lines a customer can have. The number of lines for a customer is randomly generated (gaussian), according to the average and standard deviation.
  • timeDistCsv [optional]: the full path to the file that contains the information about the probabilities of call happening in a given time in a weekday of weekend.

cdr-gen's People

Contributors

mayconbordin avatar hasanfd avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.