Skip to content

Distribution Modeler

Jake Close edited this page Dec 6, 2017 · 25 revisions

Project Overview:

Modeler part of the project

This is a test

Project Structure:

How to implement a new distribution:

For this example, we will use the Normal Distribution.

  1. Create new file for service following the name style "ModelerDistribution" + "distribution Name"
ModelerDistributionNormal.service.coffe
  1. Import the service into the my_module.module file, under the component/service section with the rest of the distributions.

  2. Implement Normal Distribution Class

  • Create class outline from base class
'use strict'

BaseService = require 'scripts/BaseClasses/BaseService.coffee'

###
  @name:
  @type: service
  @desc: Normal Distribution Class
###

module.exports = class NormalDist extends BaseService
  @inject 'socrat_analysis_modeler_getParams'
  initialize: () ->
    @calc = @socrat_analysis_modeler_getParams

 'socrat_modeler_distribution_Normal': require 'scripts/analysis/tools/Modeler/ModelerDistributionNormal.service.coffee'
Clone this wiki locally