I would like to model a time-space network in the context of a carsharing provider that is defined by S (stations) x (0,... t,..., Tmax) with different arcs that connect a node i at time t to a node j at time t' with t'>t. Each arc is associated with different values (for example profit).
Do you have any ideas on how to implement these arcs?
So far my idea was to define different tuples but I had problems integrating the time-component. Do you know if it's possible to solve such a problem with tuples at all?
I guess what you have is a graph that defines how the stations are connected:
If I understand correctly then this graph needs to be duplicated for every period in a time interval which is defined as
You can define a new tuple that defines an arc with origin and destination as well as starting and end time:
In case you also need the nodes of the duplicated graphs then first define the nodes:
and then the arcs:
The cost/profit for an arc
a
probably depends either on the distance of the nodes (which would bedistance(a.origin.node, a.destination.node)
) or the time delta (which would bea.destination.time - a.origin.time
).