neuromancer.dynamics.physics module

class neuromancer.dynamics.physics.Agent(state_names)[source]

Bases: Module, ABC

An agent is an object in a networked or otherwise distributed system that can: - have some intrinsic physics - serve as anchor for connections (pins)

forward(x)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

abstract intrinsic(x)[source]
class neuromancer.dynamics.physics.DeltaTemp(R=Parameter containing: tensor(1., requires_grad=True), feature_name='T', symmetric=False, pins=[])[source]

Bases: Interaction

Interaction physics for difference in temperature (assumed) between agents.

interact(x)[source]
class neuromancer.dynamics.physics.DeltaTempSwitch(R=Parameter containing: tensor([1.], requires_grad=True), feature_name='T', symmetric=False, pins=[])[source]

Bases: Interaction

Interaction physics for difference in temperature (assumed) between agents. Switched on/off depending on agent values (zero or nonzero).

interact(x)[source]
class neuromancer.dynamics.physics.HVACConnection(feature_name='T', symmetric=False, pins=[])[source]

Bases: Interaction

Imposition of a source term as an interaction.

interact(x)[source]
class neuromancer.dynamics.physics.Interaction(feature_name, pins, symmetric)[source]

Bases: Module, ABC

An interaction is a physical connection between agents: - interactions are pairwise - interactions can be one-sided or symmetric (influence both agents)

forward(x)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

abstract interact(x)[source]
class neuromancer.dynamics.physics.RCNode(C=Parameter containing: tensor([1.], requires_grad=True), state_names=['T'], scaling=1.0)[source]

Bases: Agent

RCNode agent. The intrinsic action of the agent is to effectively scale the interaction physics according to the capacitance of the agent. Examples include lumped volumes, rooms, etc.

intrinsic(x)[source]
class neuromancer.dynamics.physics.SourceSink(state_names=['T'])[source]

Bases: Agent

Generic Source / Sink agent. Useful for ‘dummy’ agents to which one can attach external signals.

intrinsic(x)[source]
neuromancer.dynamics.physics.map_from_agents(intrinsic_list)[source]

Quick helper function to construct state mappings: