object
time_expanded_network(Dictionary)
Dictionary- Dictionary object used by the constructed flow network.
Builds finite, discrete-time flow networks from explicit departure and storage schedules. Expanded vertices are tagged time(Vertex, Time) terms; schedule arcs retain input order and arc IDs.
logtalk_load(flow_networks(loader))static, context_switching_callsPublic predicates
build/6
Builds a time-expanded flow network. Vertices is a proper list of ground base vertices and Horizon is a non-negative integer. Each travel(From, To, Departure, Duration, Lower, Capacity, Cost) creates one arc from time(From,Departure) to time(To,Departure+Duration). Each store(Vertex, Time, Lower, Capacity, Cost) creates one arc from time(Vertex,Time) to time(Vertex,Time+1). Durations are positive; schedule endpoints and arrivals must be within the horizon. Missing storage entries mean no waiting capacity. The mapping is mapping(TravelEntries, StorageEntries) where entries are travel(ArcId, EntryId, From, To, Departure, Arrival) and store(ArcId, EntryId, Vertex, Time, Arrival); entry IDs are one-based in their respective input lists and arc IDs follow travel input order then storage input order. Expanded vertices are tagged time(Vertex,Time) terms, preserving all time copies including isolated vertices. Supplies and demands at exact times can be passed to the existing minimum-cost flow solver. Evacuation by a deadline can be modeled by adding collection arcs from eligible time copies to a fresh terminal. Storage capacities constrain individual intervals, not a shared per-vertex capacity. Non-zero lower bounds require the supply-based minimum-cost flow solver; maximum-flow APIs require zero lower bounds.
staticbuild(Vertices,Horizon,Travels,Storage,Network,Mapping)build(+list(ground),+integer,+list(compound),+list(compound),--compound,--compound) - one_or_errorVertices, Travels, or Storage is a variable or partial list, or a base vertex or schedule endpoint is non-ground:instantiation_errortype_error(list,Input)Horizon, a departure, a duration, a storage time, a lower bound, a capacity, or a cost is not an integer:type_error(integer,Value)Horizon is negative:domain_error(non_negative_integer,Horizon)domain_error(time_expanded_schedule,Entry)Vertices:existence_error(vertex,Vertex)consistency_error(time_expanded_schedule_and_horizon,Entry,Horizon)domain_error(positive_integer,Duration)domain_error(non_negative_integer,Value)consistency_error(arc_lower_bound_and_capacity,Lower,Capacity)Protected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)