pacman.model.graphs.machine package

Submodules

pacman.model.graphs.machine.machine_edge module

class pacman.model.graphs.machine.machine_edge.MachineEdge(pre_vertex, post_vertex, traffic_type=<EdgeTrafficType.MULTICAST: 1>, label=None, traffic_weight=1)[source]

Bases: pacman.model.graphs.abstract_edge.AbstractEdge

A simple implementation of a machine edge

Parameters:
  • pre_vertex (pacman.model.graphs.machine.abstract_machine_vertex.impl.MachineVertex) – the vertex at the start of the edge
  • post_vertex (pacman.model.graphs.machine.abstract_machine_vertex.impl.MachineVertex) – the vertex at the end of the edge
  • traffic_type (pacman.model.graphs.common.edge_traffic_type.EdgeTrafficType) – The type of traffic that this edge will carry
  • label (str) – The name of the edge
  • traffic_weight (int) – the optional weight of traffic expected to travel down this edge relative to other edges (default is 1)
label

The label of the edge

Returns:The label
Return type:str
Raises:None – Raises no known exceptions
post_vertex

The vertex at the end of the edge

Return type:pacman.model.graphs.abstract_vertex.AbstractVertex
pre_vertex

The vertex at the start of the edge

Return type:pacman.model.graphs.abstract_vertex.AbstractVertex
traffic_type

The traffic type of the edge

Return type:py:class:pacman.model.graphs.common.edge_traffic_type.EdgeTrafficType
traffic_weight

The amount of traffic expected to go down this edge relative to other edges

pacman.model.graphs.machine.machine_fpga_vertex module

class pacman.model.graphs.machine.machine_fpga_vertex.MachineFPGAVertex(fpga_id, fpga_link_id, board_address=None, label=None, constraints=None)[source]

Bases: pacman.model.graphs.machine.machine_vertex.MachineVertex, pacman.model.graphs.abstract_fpga_vertex.AbstractFPGAVertex

A virtual vertex on an FPGA link

board_address

The IP address of the board to which the device is connected, or None for the boot board

Return type:str
fpga_id

The id of the FPGA to which the vertex is connected

Return type:int

The link of the FPGA to which the vertex is connected

Return type:int
resources_required

The resources required by the vertex

Return type:pacman.model.resources.ResourceContainer
set_virtual_chip_coordinates(virtual_chip_x, virtual_chip_y)[source]

Set the details of the virtual chip that has been added to the machine for this vertex

Parameters:
  • virtual_chip_x – The x-coordinate of the added chip
  • virtual_chip_y – The y-coordinate of the added chip
virtual_chip_x

The x-coordinate of the virtual chip where this vertex is to be placed

Return type:int
virtual_chip_y

The y-coordinate of the virtual chip where this vertex is to be placed

Return type:int

pacman.model.graphs.machine.machine_graph module

class pacman.model.graphs.machine.machine_graph.MachineGraph(label)[source]

Bases: pacman.model.graphs.impl.graph.Graph

A graph whose vertices can fit on the chips of a machine

pacman.model.graphs.machine.machine_outgoing_edge_partition module

class pacman.model.graphs.machine.machine_outgoing_edge_partition.MachineOutgoingEdgePartition(identifier, constraints=None, label=None, traffic_weight=1)[source]

Bases: pacman.model.graphs.impl.outgoing_edge_partition.OutgoingEdgePartition

An outgoing edge partition for a Machine Graph

Parameters:
  • identifier – The identifier of the partition
  • constraints – Any initial constraints
  • label – An optional label of the partition
  • traffic_weight – the weight of this partition in relation to other partitions

pacman.model.graphs.machine.machine_vertex module

class pacman.model.graphs.machine.machine_vertex.MachineVertex(label=None, constraints=None)[source]

Bases: pacman.model.graphs.common.constrained_object.ConstrainedObject, pacman.model.graphs.abstract_vertex.AbstractVertex

A machine graph vertex

Parameters:
Raises:

pacman.exceptions.PacmanInvalidParameterException

  • If one of the constraints is not valid

label

The label of the vertex

Return type:str
resources_required

The resources required by the vertex

Return type:pacman.model.resources.ResourceContainer

pacman.model.graphs.machine.simple_machine_vertex module

class pacman.model.graphs.machine.simple_machine_vertex.SimpleMachineVertex(resources, label=None, constraints=None)[source]

Bases: pacman.model.graphs.machine.machine_vertex.MachineVertex

A MachineVertex that stores its own resources

resources_required

The resources required by the vertex

Return type:pacman.model.resources.ResourceContainer

Module contents

class pacman.model.graphs.machine.MachineEdge(pre_vertex, post_vertex, traffic_type=<EdgeTrafficType.MULTICAST: 1>, label=None, traffic_weight=1)[source]

Bases: pacman.model.graphs.abstract_edge.AbstractEdge

A simple implementation of a machine edge

Parameters:
  • pre_vertex (pacman.model.graphs.machine.abstract_machine_vertex.impl.MachineVertex) – the vertex at the start of the edge
  • post_vertex (pacman.model.graphs.machine.abstract_machine_vertex.impl.MachineVertex) – the vertex at the end of the edge
  • traffic_type (pacman.model.graphs.common.edge_traffic_type.EdgeTrafficType) – The type of traffic that this edge will carry
  • label (str) – The name of the edge
  • traffic_weight (int) – the optional weight of traffic expected to travel down this edge relative to other edges (default is 1)
label

The label of the edge

Returns:The label
Return type:str
Raises:None – Raises no known exceptions
post_vertex

The vertex at the end of the edge

Return type:pacman.model.graphs.abstract_vertex.AbstractVertex
pre_vertex

The vertex at the start of the edge

Return type:pacman.model.graphs.abstract_vertex.AbstractVertex
traffic_type

The traffic type of the edge

Return type:py:class:pacman.model.graphs.common.edge_traffic_type.EdgeTrafficType
traffic_weight

The amount of traffic expected to go down this edge relative to other edges

class pacman.model.graphs.machine.MachineFPGAVertex(fpga_id, fpga_link_id, board_address=None, label=None, constraints=None)[source]

Bases: pacman.model.graphs.machine.machine_vertex.MachineVertex, pacman.model.graphs.abstract_fpga_vertex.AbstractFPGAVertex

A virtual vertex on an FPGA link

board_address

The IP address of the board to which the device is connected, or None for the boot board

Return type:str
fpga_id

The id of the FPGA to which the vertex is connected

Return type:int

The link of the FPGA to which the vertex is connected

Return type:int
resources_required

The resources required by the vertex

Return type:pacman.model.resources.ResourceContainer
set_virtual_chip_coordinates(virtual_chip_x, virtual_chip_y)[source]

Set the details of the virtual chip that has been added to the machine for this vertex

Parameters:
  • virtual_chip_x – The x-coordinate of the added chip
  • virtual_chip_y – The y-coordinate of the added chip
virtual_chip_x

The x-coordinate of the virtual chip where this vertex is to be placed

Return type:int
virtual_chip_y

The y-coordinate of the virtual chip where this vertex is to be placed

Return type:int
class pacman.model.graphs.machine.MachineGraph(label)[source]

Bases: pacman.model.graphs.impl.graph.Graph

A graph whose vertices can fit on the chips of a machine

class pacman.model.graphs.machine.MachineOutgoingEdgePartition(identifier, constraints=None, label=None, traffic_weight=1)[source]

Bases: pacman.model.graphs.impl.outgoing_edge_partition.OutgoingEdgePartition

An outgoing edge partition for a Machine Graph

Parameters:
  • identifier – The identifier of the partition
  • constraints – Any initial constraints
  • label – An optional label of the partition
  • traffic_weight – the weight of this partition in relation to other partitions
class pacman.model.graphs.machine.MachineSpiNNakerLinkVertex(spinnaker_link_id, board_address=None, label=None, constraints=None)[source]

Bases: pacman.model.graphs.machine.machine_vertex.MachineVertex, pacman.model.graphs.abstract_spinnaker_link_vertex.AbstractSpiNNakerLinkVertex

A virtual vertex on a SpiNNaker Link

board_address

The IP address of the board to which the device is connected, or None for the boot board

Return type:str
resources_required

The resources required by the vertex

Return type:pacman.model.resources.ResourceContainer
set_virtual_chip_coordinates(virtual_chip_x, virtual_chip_y)[source]

Set the details of the virtual chip that has been added to the machine for this vertex

Parameters:
  • virtual_chip_x – The x-coordinate of the added chip
  • virtual_chip_y – The y-coordinate of the added chip

The SpiNNaker Link that the vertex is connected to

virtual_chip_x

The x-coordinate of the virtual chip where this vertex is to be placed

Return type:int
virtual_chip_y

The y-coordinate of the virtual chip where this vertex is to be placed

Return type:int
class pacman.model.graphs.machine.MachineVertex(label=None, constraints=None)[source]

Bases: pacman.model.graphs.common.constrained_object.ConstrainedObject, pacman.model.graphs.abstract_vertex.AbstractVertex

A machine graph vertex

Parameters:
Raises:

pacman.exceptions.PacmanInvalidParameterException

  • If one of the constraints is not valid

label

The label of the vertex

Return type:str
resources_required

The resources required by the vertex

Return type:pacman.model.resources.ResourceContainer
class pacman.model.graphs.machine.SimpleMachineVertex(resources, label=None, constraints=None)[source]

Bases: pacman.model.graphs.machine.machine_vertex.MachineVertex

A MachineVertex that stores its own resources

resources_required

The resources required by the vertex

Return type:pacman.model.resources.ResourceContainer