Closed ctchervenkov closed 6 years ago
why is it important to have dummy freight facilities in zones? if there is no freight then there is no frieght. or this a computational thing for routing etc?
Ok, let me rephrase the problem as it might not have been clear. First, after assigning the facilities that currently exist in the population to the nearest zones, there are some of the zones that land up without any facility assigned to them. Second, the daily average freight trips per OD pair are expressed as floats. To convert this float to an integer number of trips, what was previously being done (and what I have continued doing) is :
integer_trips = floor(float_trips) remainder = float_trips - integer_trips p = random.nextDouble() if (p < remainder) { integer_trips++ }
So you take the integer number of trips and then you potentially add an extra trip, which is more likely the closer the remainder is to 1.
As there are sometimes non-negative float values for OD pairs between zones without any assigned facilities, we sometimes have a freight trip between two zones where there are no facilities assigned. I currently am ignoring them, because they represent only a couple of trips somewhere in Graubünden.
I think thats fine if the number of trips is very small
I wrote this issue more in the spirit of a documentation and to keep people updated with my thoughts (and in case of any objections of course)
For freight transportation, we have data that tells us the average number of daily trips performed by different types of freight vehicles for each OD pair. Then, for each origin or destination, we need to select an actual facility to drive from and to. Prior to that, we need to assign facilities eligible for freight transport to each of these zones, of which we know the centroid coordinates.
In the previous implementation, all facilities within a 1 km radius of each centroid were assigned to it, which meant that some facilities were never assigned to a zone. There was also likely some spatial bias in where freight was traveling. Now, instead, each facility is assigned to the nearest centroid, so all facilities are ultimately assigned a zone and can potentially be selected for an OD pair. Is this better?
Whatever the method for assigning freight facilities to zones, some zones might still potentially have no facilities assigned to them. Should we continue to create dummy freight facilities located at the centroid of these zones, as was previously the case, or should we simply ignored these OD pairs, as they are likely pairs which anyway have very few trips between them?