Module: YNelson

Extended by:
YPetri::World::PetriNetAspect, YPetri::World::SimulationAspect
Defined in:
lib/y_nelson.rb,
lib/y_nelson/dsl.rb,
lib/y_nelson/version.rb

Overview

YNelson is an implementation of a cross between Ted Nelson’s Zz structure, and a specific type of universal Petri net (PN), to whose creation I put particularly large amount of design considerations. The resulting data structure, combining the qualities of the said PN with those of a relational database, I refer to as Nelson net.

A Nelson net can be viewed as a genralization of a spreadsheet. Ted Nelson does note similarities between zz structures and spreadsheets and makes wide use of spreadsheet metaphors in his terminology: cells, rows, columns, ranks, cursors, selections… Nelson net arises by adding spreadsheet “formulas” to the mixture, which are nothing else than PN transitions.

From spreadsheet software implementations, we are used to various constraints regarding the available PN transitions. In Nelson nets, these constraints are removed by the Nelson nets being based on the said formally defined universal PN. Also, the plain globally orthogonal structure of rows/columns/sheets typical for spreadsheet implementations is generalized to the locally orthogonal zz structure with unlimited number of dimensions. The generalization is as follows:

  1. Both places and transitions of the PN are zz objects.

  2. The way the spreadsheet is based on PNs is properly formalized.

Luckily, Ted Nelson and his crowd already put energy into explaining the ins and outs of zz structures. There is a growing body of literature on this, including zz structure applications in bioinformatics. And I add to this my explanation of the extended PN type that I designed and implemented in YPetri gem (gem install YPetri), which is a dependency of YNelson.

Defined Under Namespace

Modules: DSL, Yzz Classes: Agent, Dimension, DimensionPoint, Net, Place, Transition, ZzPoint

Constant Summary collapse

VERSION =
"2.3.8"
DEBUG =
false

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.dimensionsObject (readonly)

Returns the value of attribute dimensions.



57
58
59
# File 'lib/y_nelson.rb', line 57

def dimensions
  @dimensions
end

Class Method Details

.Dimension(*args) ⇒ Object

Convenience constructor.



42
43
44
# File 'lib/y_nelson/dimension.rb', line 42

def YNelson.Dimension *args
  YNelson::Dimension.new *args
end

.included(receiver) ⇒ Object

Allows summoning YNelson::DSL by ‘include YNelson’.



65
66
67
68
# File 'lib/y_nelson.rb', line 65

def included receiver
  receiver.extend YNelson::DSL
  receiver.delegate :y_nelson_agent, to: "self.class"
end