Dear Pedro (and Everyone),
I hope you are doing well. My name is Mir Raisul Islam. I am working as a Research Assistant at a Economic Research Institute in Germany. I am facing two issues while doing multi-class traffic assignment by using AequilibraE python pacakge.
1. I have three traffic classes OD matrices and for these three traffic classes I created three different graphs of the networks. Some trific classes are not supposed to use some routes/links. That's why the graphs are different in shapes for different traffic classes, but I am getting this error,
ValueError Traceback (most recent call last)
File <timed exec>:36
File c:\\Users\\Raisul\\anaconda3\\envs\\my_env\\Lib\\site-packages\\aequilibrae\\paths\\traffic_assignment.py:432, in TrafficAssignment.execute(self, log_specification)
430 if log_specification:
431 self.log_specification()
--> 432 self.assignment.execute()
File c:\\Users\\Raisul\\anaconda3\\envs\\my_env\\Lib\\site-packages\\aequilibrae\\paths\\linear_approximation.py:388, in LinearApproximation.execute(self)
384 self.__maybe_create_path_file_directories()
386 for c in self.traffic_classes: # type: TrafficClass
387 # cost = c.fixed_cost / c.vot + self.congested_time # now only once
--> 388 cost = c.fixed_cost + self.congested_time
389 aggregate_link_costs(cost, c.graph.compact_cost, c.results.crosswalk)
391 aon = allOrNothing(c.matrix, c.graph, c._aon_results)
ValueError: operands could not be broadcast together with shapes (11202,) (9184,) "
}
I am not sure if it happending because of my using different set of links for each graph.
2. To solve this error, I have used the same set of links for each graphs. But, I just increased the cost of few different links for different graphs of corresponding classes. In this case, there is no error and I get result.
According to the documentation, the results should not depend on the order the classes are put in. Unfortunately, in my case I am getting different results for different order of the classes in the set_classes() function.
Would you please help me to get these two problems better? How can I actually sove these issues?
Thank you so much in advance for your kind help.
Best,
Mir Raisul Islam.