ismop / dap

3 stars 0 forks source link

Experiment generator #159

Closed mkasztelnik closed 8 years ago

mkasztelnik commented 8 years ago

It allows to create (or reuse) experiment and generates water wave for it. Simple example how to use it:

require 'experiment_generator'

gen = ExperimentGenerator.new(
        name: 'exp',
        from:  Time.new(2016, 9, 13, 11, 35),
        to: Time.new(2016, 9, 13, 11, 35) + 216.hours,
        steps: [
          WaveFunction.new(from: 0.12, to: 4, interval: 96.hours),
          WaveFunction.new(from: 4, to: 0, interval: 120.hours)
        ])

gen.call

If you just want to see what water wave will be generated turn on generator debug mode on:

gen.debug = true
gen.call
mkasztelnik commented 8 years ago

@nowakowski ping

nowakowski commented 8 years ago

Actually, I'm having trouble running this script as instructed. Hold on...

nowakowski commented 8 years ago

@mkasztelnik I've committed some minor fixes - check if you agree with them; merge if you do.

mkasztelnik commented 8 years ago

Thx for fixes. There is quite hard to test anything using localhost installation and doing it on development in quite scary. Would it be possible to have something like this: https://robots.thoughtbot.com/priming-the-pump for dap?

nowakowski commented 8 years ago

@mkasztelnik You can always push your branch to dap-dev and test there. I'll add some seeds, though (not entirely convinced about this dev:prime thing; seems a bit convoluted for our purposes...).