Bobojy00/moonbit_factory_graph/src/graph does not have a README file

    Edge

    impl Show for Edge

    Edge::bandwidth

    fn Edge::bandwidth(self : Edge) -> Double

    Edge::create

    fn Edge::create(id : String, source_id : String, target_id : String, flow_type :
    FlowType
    , bandwidth_units_per_hour? : Double, transport_delay_sec? : Double, distance_meters? : Double, energy_loss_kw? : Double, safety_level? :
    SafetyLevel
    , protocol? :
    ControlProtocol
    , medium? :
    TransferMedium
    , energy_type? :
    EnergyType
    , is_bidirectional? : Bool, is_active? : Bool, redundancy_priority? : Int, description? : String) -> Edge

    Edge::description

    fn Edge::description(self : Edge) -> String

    Edge::distance_meters

    fn Edge::distance_meters(self : Edge) -> Double

    Edge::energy_loss_kw

    fn Edge::energy_loss_kw(self : Edge) -> Double

    Edge::id

    fn Edge::id(self : Edge) -> String

    Edge::is_active

    fn Edge::is_active(self : Edge) -> Bool

    Edge::is_bidirectional

    fn Edge::is_bidirectional(self : Edge) -> Bool

    Edge::redundancy_priority

    fn Edge::redundancy_priority(self : Edge) -> Int

    Edge::set_active

    fn Edge::set_active(self : Edge, active : Bool) -> Unit

    Edge::set_bandwidth

    fn Edge::set_bandwidth(self : Edge, bw : Double) -> Unit

    Edge::source_id

    fn Edge::source_id(self : Edge) -> String

    Edge::target_id

    fn Edge::target_id(self : Edge) -> String

    Edge::to_string

    fn Edge::to_string(self : Edge) -> String

    Edge::transport_delay_sec

    fn Edge::transport_delay_sec(self : Edge) -> Double

    FactoryGraph

    pub struct FactoryGraph {
    nodes : Map[String, Node]
    edges : Map[String, Edge]
    out_edges : Map[String, Array[Edge]]
    in_edges : Map[String, Array[Edge]]
    layer_out_edges : Map[String, Map[String, Array[Edge]]]
    layer_in_edges : Map[String, Map[String, Array[Edge]]]
    zones : Map[String, Array[String]]
    safety_zones : Map[String, Array[String]]
    config :
    FactoryConfig

    } derive(
    Debug
    )

    FactoryGraph::add_edge

    fn FactoryGraph::add_edge(self : FactoryGraph, edge : Edge) -> Unit

    FactoryGraph::add_node

    fn FactoryGraph::add_node(self : FactoryGraph, node : Node) -> Unit

    FactoryGraph::calculate_active_nodes_count

    fn FactoryGraph::calculate_active_nodes_count(self : FactoryGraph) -> Int

    FactoryGraph::calculate_total_power_kw

    fn FactoryGraph::calculate_total_power_kw(self : FactoryGraph) -> Double

    FactoryGraph::clone

    FactoryGraph::edge_count

    fn FactoryGraph::edge_count(self : FactoryGraph) -> Int

    FactoryGraph::get_all_edges

    fn FactoryGraph::get_all_edges(self : FactoryGraph) -> Array[Edge]

    FactoryGraph::get_all_nodes

    fn FactoryGraph::get_all_nodes(self : FactoryGraph) -> Array[Node]

    FactoryGraph::get_all_safety_zones

    fn FactoryGraph::get_all_safety_zones(self : FactoryGraph) -> Array[String]

    FactoryGraph::get_all_zones

    fn FactoryGraph::get_all_zones(self : FactoryGraph) -> Array[String]

    FactoryGraph::get_edge

    fn FactoryGraph::get_edge(self : FactoryGraph, id : String) -> Edge?

    FactoryGraph::get_in_edges

    fn FactoryGraph::get_in_edges(self : FactoryGraph, node_id : String) -> Array[Edge]

    FactoryGraph::get_in_neighbors

    fn FactoryGraph::get_in_neighbors(self : FactoryGraph, node_id : String) -> Array[String]

    FactoryGraph::get_layer_in_edges

    fn FactoryGraph::get_layer_in_edges(self : FactoryGraph, flow_type :
    FlowType
    , node_id : String) -> Array[Edge]

    FactoryGraph::get_layer_in_neighbors

    fn FactoryGraph::get_layer_in_neighbors(self : FactoryGraph, flow_type :
    FlowType
    , node_id : String) -> Array[String]

    FactoryGraph::get_layer_out_edges

    fn FactoryGraph::get_layer_out_edges(self : FactoryGraph, flow_type :
    FlowType
    , node_id : String) -> Array[Edge]

    FactoryGraph::get_layer_out_neighbors

    fn FactoryGraph::get_layer_out_neighbors(self : FactoryGraph, flow_type :
    FlowType
    , node_id : String) -> Array[String]

    FactoryGraph::get_node

    fn FactoryGraph::get_node(self : FactoryGraph, id : String) -> Node?

    FactoryGraph::get_nodes_in_safety_zone

    fn FactoryGraph::get_nodes_in_safety_zone(self : FactoryGraph, safety_zone_id : String) -> Array[Node]

    FactoryGraph::get_nodes_in_zone

    fn FactoryGraph::get_nodes_in_zone(self : FactoryGraph, zone_id : String) -> Array[Node]

    FactoryGraph::get_out_edges

    fn FactoryGraph::get_out_edges(self : FactoryGraph, node_id : String) -> Array[Edge]

    FactoryGraph::get_out_neighbors

    fn FactoryGraph::get_out_neighbors(self : FactoryGraph, node_id : String) -> Array[String]

    FactoryGraph::has_edge

    fn FactoryGraph::has_edge(self : FactoryGraph, id : String) -> Bool

    FactoryGraph::has_node

    fn FactoryGraph::has_node(self : FactoryGraph, id : String) -> Bool

    FactoryGraph::node_count

    fn FactoryGraph::node_count(self : FactoryGraph) -> Int

    FactoryGraph::set_config

    FactoryGraphBuilder

    pub struct FactoryGraphBuilder {
    graph : FactoryGraph
    edge_counter : Int
    } derive(
    Debug
    )

    FactoryGraphBuilder::add_buffer

    fn FactoryGraphBuilder::add_buffer(self : FactoryGraphBuilder, id : String, name : String, zone? : String, subzone? : String, capacity? : Double, initial_wip? : Double, safety_zone_id? : String) -> FactoryGraphBuilder

    FactoryGraphBuilder::add_conveyor

    fn FactoryGraphBuilder::add_conveyor(self : FactoryGraphBuilder, id : String, name : String, zone? : String, subzone? : String, nominal_power_kw? : Double, capacity? : Double, safety_zone_id? : String) -> FactoryGraphBuilder

    FactoryGraphBuilder::add_inspection

    fn FactoryGraphBuilder::add_inspection(self : FactoryGraphBuilder, id : String, name : String, zone? : String, subzone? : String, cycle_time_sec? : Double, nominal_power_kw? : Double, safety_zone_id? : String) -> FactoryGraphBuilder

    FactoryGraphBuilder::add_machine

    fn FactoryGraphBuilder::add_machine(self : FactoryGraphBuilder, id : String, name : String, zone? : String, subzone? : String, cycle_time_sec? : Double, nominal_power_kw? : Double, mtbf_hours? : Double, mttr_hours? : Double, safety_zone_id? : String) -> FactoryGraphBuilder

    FactoryGraphBuilder::add_plc

    fn FactoryGraphBuilder::add_plc(self : FactoryGraphBuilder, id : String, name : String, zone? : String, subzone? : String, safety_zone_id? : String) -> FactoryGraphBuilder

    FactoryGraphBuilder::add_power_source

    fn FactoryGraphBuilder::add_power_source(self : FactoryGraphBuilder, id : String, name : String, zone? : String, subzone? : String, capacity_kw? : Double, safety_zone_id? : String) -> FactoryGraphBuilder

    FactoryGraphBuilder::add_robot

    fn FactoryGraphBuilder::add_robot(self : FactoryGraphBuilder, id : String, name : String, zone? : String, subzone? : String, cycle_time_sec? : Double, nominal_power_kw? : Double, safety_zone_id? : String) -> FactoryGraphBuilder

    FactoryGraphBuilder::add_safety_gate

    fn FactoryGraphBuilder::add_safety_gate(self : FactoryGraphBuilder, id : String, name : String, zone? : String, subzone? : String, safety_zone_id? : String) -> FactoryGraphBuilder

    FactoryGraphBuilder::add_sensor

    fn FactoryGraphBuilder::add_sensor(self : FactoryGraphBuilder, id : String, name : String, zone? : String, subzone? : String, nominal_power_kw? : Double, safety_zone_id? : String) -> FactoryGraphBuilder

    FactoryGraphBuilder::add_workstation

    fn FactoryGraphBuilder::add_workstation(self : FactoryGraphBuilder, id : String, name : String, zone? : String, subzone? : String, cycle_time_sec? : Double, nominal_power_kw? : Double, mtbf_hours? : Double, mttr_hours? : Double, safety_zone_id? : String) -> FactoryGraphBuilder

    FactoryGraphBuilder::build

    FactoryGraphBuilder::connect_control

    fn FactoryGraphBuilder::connect_control(self : FactoryGraphBuilder, plc_id : String, target_id : String, protocol? :
    ControlProtocol
    , latency_ms? : Double) -> FactoryGraphBuilder

    FactoryGraphBuilder::connect_energy

    fn FactoryGraphBuilder::connect_energy(self : FactoryGraphBuilder, power_source_id : String, target_id : String, energy_type? :
    EnergyType
    , loss_kw? : Double) -> FactoryGraphBuilder

    FactoryGraphBuilder::connect_line

    fn FactoryGraphBuilder::connect_line(self : FactoryGraphBuilder, station_ids : Array[String], bandwidth? : Double, delay? : Double) -> FactoryGraphBuilder

    FactoryGraphBuilder::connect_material

    fn FactoryGraphBuilder::connect_material(self : FactoryGraphBuilder, src : String, dst : String, bandwidth? : Double, delay? : Double, distance? : Double, medium? :
    TransferMedium
    , redundancy_priority? : Int) -> FactoryGraphBuilder

    FactoryGraphBuilder::connect_plc_network

    fn FactoryGraphBuilder::connect_plc_network(self : FactoryGraphBuilder, plc_id : String, target_ids : Array[String], protocol? :
    ControlProtocol
    ) -> FactoryGraphBuilder

    FactoryGraphBuilder::connect_power_bus

    fn FactoryGraphBuilder::connect_power_bus(self : FactoryGraphBuilder, source_id : String, target_ids : Array[String], energy_type? :
    EnergyType
    ) -> FactoryGraphBuilder

    FactoryGraphBuilder::connect_safety

    fn FactoryGraphBuilder::connect_safety(self : FactoryGraphBuilder, safety_source_id : String, target_id : String, level? :
    SafetyLevel
    ) -> FactoryGraphBuilder

    FactoryGraphBuilder::connect_safety_domain

    fn FactoryGraphBuilder::connect_safety_domain(self : FactoryGraphBuilder, safety_gate_id : String, target_ids : Array[String], level? :
    SafetyLevel
    ) -> FactoryGraphBuilder

    FactoryGraphBuilder::connect_telemetry

    fn FactoryGraphBuilder::connect_telemetry(self : FactoryGraphBuilder, sensor_id : String, collector_id : String, protocol? :
    ControlProtocol
    ) -> FactoryGraphBuilder

    FactoryGraphBuilder::new

    fn FactoryGraphBuilder::new(plant_name? : String, location? : String, takt_time_target_sec? : Double) -> FactoryGraphBuilder

    FlowLayerHealth

    pub(all) struct FlowLayerHealth {
    flow_type :
    FlowType

    active_edge_count : Int
    inactive_edge_count : Int
    total_bandwidth_units_per_hour : Double
    max_bandwidth_units_per_hour : Double
    } derive(Eq,
    Debug
    )

    A compact view of one physical or logical flow layer.

    GraphHealthReport

    pub(all) struct GraphHealthReport {
    total_node_count : Int
    active_node_count : Int
    inactive_node_count : Int
    total_edge_count : Int
    active_edge_count : Int
    inactive_edge_count : Int
    orphan_node_ids : Array[String]
    layer_health : Array[FlowLayerHealth]
    } derive(Eq,
    Debug
    )

    Structural and operational health indicators for a factory topology.

    Node

    impl Show for Node

    Node::availability

    fn Node::availability(self : Node) -> Double

    Node::capacity

    fn Node::capacity(self : Node) -> Double

    Node::create

    fn Node::create(id : String, name : String, node_type :
    NodeType
    , zone? : String, subzone? : String, cycle_time_sec? : Double, nominal_power_kw? : Double, mtbf_hours? : Double, mttr_hours? : Double, capacity? : Double, initial_wip? : Double, max_wip? : Double, is_bottleneck_candidate? : Bool, status? :
    OperatingStatus
    , safety_zone_id? : String, description? : String) -> Node

    Node::cycle_time_sec

    fn Node::cycle_time_sec(self : Node) -> Double

    Node::description

    fn Node::description(self : Node) -> String

    Node::hourly_throughput_limit

    fn Node::hourly_throughput_limit(self : Node) -> Double

    Node::id

    fn Node::id(self : Node) -> String

    Node::initial_wip

    fn Node::initial_wip(self : Node) -> Double

    Node::is_bottleneck_candidate

    fn Node::is_bottleneck_candidate(self : Node) -> Bool

    Node::is_operational

    fn Node::is_operational(self : Node) -> Bool

    Node::max_wip

    fn Node::max_wip(self : Node) -> Double

    Node::mtbf_hours

    fn Node::mtbf_hours(self : Node) -> Double

    Node::mttr_hours

    fn Node::mttr_hours(self : Node) -> Double

    Node::name

    fn Node::name(self : Node) -> String

    Node::nominal_power_kw

    fn Node::nominal_power_kw(self : Node) -> Double

    Node::safety_zone_id

    fn Node::safety_zone_id(self : Node) -> String

    Node::set_status

    Node::subzone

    fn Node::subzone(self : Node) -> String

    Node::to_string

    fn Node::to_string(self : Node) -> String

    Node::zone

    fn Node::zone(self : Node) -> String

    inspect_graph_health

    fn inspect_graph_health(graph : FactoryGraph) -> GraphHealthReport

    Inspect topology completeness and per-layer operational capacity.

    Orphan nodes have no incoming or outgoing edge in any layer. Inactive edges remain visible in the report so callers can distinguish a planned maintenance path from a missing connection.