Class: Roby::TimeDistribution

Inherits:
Object
  • Object
show all
Defined in:
lib/roby/state/information.rb

Overview

A TimeDistribution object describes the evolution of a value object w.r.t. time. Time can be described by absolute values using Time objects or w.r.t. the plan by using EventGenerator objects

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(info) ⇒ TimeDistribution

Returns a new instance of TimeDistribution.



17
18
19
20
# File 'lib/roby/state/information.rb', line 17

def initialize(info)
    @info = info
    @timepoints = Array.new
end

Instance Attribute Details

#infoObject (readonly)

Returns the value of attribute info.



16
17
18
# File 'lib/roby/state/information.rb', line 16

def info
  @info
end

Instance Method Details

#set_decay(event, decay) ⇒ Object

Set a decay function which is valid from event



28
29
30
# File 'lib/roby/state/information.rb', line 28

def set_decay(event, decay)
    @timepoints << [event, :set_decay, decay]
end

#set_knowledge(event, value = 1.0) ⇒ Object

Set the knowledge value for the distribution at event For now, the only valid values are 0 (nothing known) and 1 (perfectly known)



35
36
37
# File 'lib/roby/state/information.rb', line 35

def set_knowledge(event, value = 1.0)
    @timepoints << [event, :set_knowledge, value]
end

#set_value(event, value) ⇒ Object

Set the predicted value of the distribution at event



23
24
25
# File 'lib/roby/state/information.rb', line 23

def set_value(event, value)
    @timepoints << [event, :set_value, value]
end