dtos
cosmica.experimental_packet_routing.dtos
__all__
module-attribute
__all__ = ['PacketRoutingResult', 'PacketRoutingSetting']
logger
module-attribute
logger: Logger = getLogger(__name__)
PacketRoutingResult
dataclass
PacketRoutingResult(
*,
all_graphs_after_simulation: list[Graph] = list[
Graph
](),
node_knowledge_known_by_each_node: dict[
Node, NodeKnowledge
] = dict[Node, NodeKnowledge](),
comm_data_demand_list: list[CommDataDemand] = list[
CommDataDemand
](),
comm_data_lsa_list: list[CommDataLSA] = list[
CommDataLSA
]()
)
all_graphs_after_simulation
class-attribute
instance-attribute
all_graphs_after_simulation: list[Graph] = field(
default_factory=list[Graph]
)
comm_data_demand_list
class-attribute
instance-attribute
comm_data_demand_list: list[CommDataDemand] = field(
default_factory=list[CommDataDemand]
)
comm_data_lsa_list
class-attribute
instance-attribute
comm_data_lsa_list: list[CommDataLSA] = field(
default_factory=list[CommDataLSA]
)
node_knowledge_known_by_each_node
class-attribute
instance-attribute
node_knowledge_known_by_each_node: dict[
Node, NodeKnowledge
] = field(default_factory=dict[Node, NodeKnowledge])
load
classmethod
load(
graphs_path: Path | None = None,
node_knowledge_path: Path | None = None,
comm_data_demand_path: Path | None = None,
comm_data_lsa_path: Path | None = None,
) -> Self
指定されたパスからpickleファイルを読み込み.
Source code in src/cosmica/experimental_packet_routing/dtos.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |
save_all_graphs_after_simulation
save_all_graphs_after_simulation(save_path: Path) -> None
Source code in src/cosmica/experimental_packet_routing/dtos.py
44 45 46 47 48 49 50 | |
save_comm_data_demand_list
save_comm_data_demand_list(save_path: Path) -> None
Source code in src/cosmica/experimental_packet_routing/dtos.py
60 61 62 63 64 65 66 | |
save_comm_data_lsa_list
save_comm_data_lsa_list(save_path: Path) -> None
Source code in src/cosmica/experimental_packet_routing/dtos.py
68 69 70 71 72 73 74 | |
save_node_knowledge_known_by_each_node
save_node_knowledge_known_by_each_node(
save_path: Path,
) -> None
Source code in src/cosmica/experimental_packet_routing/dtos.py
52 53 54 55 56 57 58 | |
PacketRoutingSetting
dataclass
PacketRoutingSetting(
*,
time: NDArray[datetime64],
nodes_dict: dict[NodeGID, Node],
demands: list[Demand],
backup_case: BackupCaseType,
hop_limit: int,
packet_size: int
)
hop_limit
instance-attribute
hop_limit: int
packet_size
instance-attribute
packet_size: int
time
instance-attribute
time: NDArray[datetime64]
load
classmethod
load(load_path: Path) -> PacketRoutingSetting
Source code in src/cosmica/experimental_packet_routing/dtos.py
140 141 142 143 144 145 | |
save
save(save_path: Path) -> None
Source code in src/cosmica/experimental_packet_routing/dtos.py
135 136 137 138 | |