An R6 class representing a transition in a semi-Markov model.
Andrew J. Sims andrew.sims@newcastle.ac.uk
rdecision::Edge
-> rdecision::Arrow
-> Transition
new()
Create an object of type MarkovTransition
.
Transition$new(source, target, cost = 0, label = "")
source
MarkovState
from which the transition starts.
target
MarkovState
to which the transition ends.
cost
Cost associated with the transition.
label
Character string containing a label for the transition (the name of the event).
A new Transition
object.
modvars()
Find all the model variables.
Transition$modvars()
Find variables of type ModVar
that have been
specified as values associated with this MarkovTransition
.
Includes operands of these ModVar
s, if they are expressions.
A list of ModVar
s.
set_cost()
Set the cost associated with the transition.
Transition$set_cost(c = 0)
c
Cost associated with the transition.
Updated Transition
object.
cost()
Return the cost associated with traversing the edge.
Transition$cost()
Cost.
clone()
The objects of this class are cloneable with this method.
Transition$clone(deep = FALSE)
deep
Whether to make a deep clone.
A specialism of class Arrow
which is used in a semi-Markov
model to represent a transition between two MarkovState
s. The
transition is optionally associated with a cost. The transition probability
is associated with the model (SemiMarkovModel
) rather than the
transition.