"It's not hard to see."

Meeting Xu Zhiyuan's somewhat surprised and questioning gaze, Han Chuan smiled gently and began to explain.

"Because compared to a regular hierarchical structure, a hierarchical structure based on a public transportation system cannot bypass transfer hubs."

"You just mentioned using coordination parameters to handle cross-variables, which works in the traffic flow problem."

"Because the traffic flow problem only has a one-to-one coupling between the cross-variables, the first-level region A and the second-level region B share a road. With a one-to-one coupling, coordinating parameters is sufficient."

"But more complex multi-level bus-subway-pedestrian routes are difficult to implement."

As he spoke, he pointed to the diagram of the public transportation system network on the screen.

"A transfer hub often corresponds to multiple lines. It may not only be the backbone level, but also the branch level, or even connect to the feeder level."

"Take Xizhimen and Dongzhimen stations as examples. They not only have huge traffic volumes, but also connect multiple routes with different levels and structures."

"In a layered framework, a node that is shared by multiple layers is called a cross variable."

"Ordinary coordination parameters have difficulty handling such complex sharing relationships. When you iterate using coordination parameters, you will receive update signals from dozens of lines at the same time. These signals conflict with each other, and coordination parameters have difficulty processing them simultaneously."

"So even if you separate the data of different lines to a certain extent through a hierarchical structure, traditional methods still have difficulty or even cannot handle this problem when it comes to transfer hubs."

After listening to Han Chuan's explanation, Xu Zhiyuan stared at the network diagram on the screen and pondered: "If we don't use coordination parameters, what methods can be used to resolve this kind of many-to-many coupled data?"

Indeed, as Han Chuan said, problems arose when building the model and code: the amount of data was too large to be processed by coordinating parameters when calculating these transfer hubs.

Han Chuan thought for a moment, then took a blank sheet of paper from the table and drew a corresponding layer on it.

However, compared to the multi-layered structure that Xu Zhiyuan created on the computer, the layers he drew had an additional new structure.

He handed over the paper and said, "I think we can group these cross-variables, namely transfer hubs, into a single, independent level for processing."

"This level is not responsible for any specific bus route optimization. It only does one thing: summarize the usage demand of all levels for the same transfer hub, and then allocate it uniformly through an algorithm."

"In this way, the entire transportation system can run two different algorithms in parallel."

"When the backbone layer, branch layer, and connection layer you set up are solving their own route optimization problems, they will all use transfer hubs. But they cannot decide how to use the hubs themselves."

"They report their needs to the sharing layer, which then aggregates the needs of all layers and allocates them uniformly under the constraint of hub capacity. After allocation, each layer adjusts its own route plan based on the allocation results."

"If new requirements arise after the adjustment, report it to the shared layer again for another round of allocation."

"Iterate repeatedly until the routing schemes of all layers and the hub allocation scheme of the shared layer are consistent with each other."

After hearing Han Chuan's explanation, Xu Zhiyuan looked over in surprise, frowned, and asked, "Isn't the amount of calculation still very large?"

Han Chuan shook his head and said, "No."

"Because the shared layer does not process the raw line data, but rather a summary of the requirements submitted by each layer."

"The amount of data aggregated for the requirements is relatively small because for a transfer hub, no matter how many lines it connects, there is only one variable in the shared layer: the total transfer flow of the hub."

"When you used coordination parameters, every line passing through Xizhimen had to be paired and coordinated with all other lines passing through Xizhimen."

As he spoke, he picked up his pen and rewrote an equation on the edge of the manuscript paper.

"Assuming there are n routes passing through Xizhimen, the number of coordination parameters is O(n²)."

"So in the shared layer, each of these n lines submits a demand value to Xizhimen, and the shared layer only needs to process one variable."

"In other words, the complexity of the hub capacity allocation at Xizhimen has been reduced from O(n²) to O(n)."

"More importantly, this O(n) process has an analytical solution, namely [L(x, λ) = i=1∑n(x−di)2+λ(x−C)]"

"Where d_i is the demand value submitted by the i-th line, x is the total flow allocated to the hub by the sharing layer, C is the hub capacity limit, and λ is the Lagrange multiplier. Take the derivative with respect to x and set the derivative to zero..."

Xu Zhiyuan stared at the matrix expression and remained silent for a few seconds.

Then he pulled over Han Chuan's manuscript paper, compared it with the formulas on it, and began to modify his own MATLAB code.

The code on the screen scrolled smoothly line by line. In less than half an hour, Xu Zhiyuan pasted the code into the main program, then opened the site data file in the question attachment, configured the input parameters, and pressed the run button.

The results didn't immediately appear on the screen; in the MATLAB command window, the cursor was flashing, indicating that iteration was running.

After waiting for about two seconds, the result came out!

Two seconds!

Looking at the results on the screen, Xu Zhiyuan subconsciously thought that there was a bug in the program.

Isn't this speed a bit too fast?

He scrolled through the iteration logs carefully, reading them from beginning to end.

In the first iteration, the shared layer received demand data from 120 lines across the three layers, which was then aggregated into a capacity allocation scheme for 37 hubs.

In the second iteration, the change in demand decreased by 70% compared to the first iteration.

In the third round, the price will be reduced by another 50%.

By the fifth round, the route plans for each layer and the hub allocation plan for the shared layer were basically consistent, and the deviation had been reduced to less than one-thousandth of the initial value.

"hiss!"

"How is this possible!?"

"Five rounds of convergence, with each round taking less than a second to compute!"

"This isn't a supercomputer?!"

Looking at the results on the screen, Xu Zhiyuan's Adam's apple bobbed.

He participated in this modeling competition. Seventeen teams won the national first prize for this problem, and the team that took the shortest time from modeling to calculating the result still spent a full six hours.

Even considering only the speed of model calculation, it takes at least half an hour.

Now, he uses his laptop to perform calculations and completes the route planning in just two seconds.

Although the amount of data used for testing is far less than the database used in formal modeling competitions, don't forget that the equipment used to run the model is also far less advanced than the computers used for modeling.

Two seconds!

If this speed were used in the 07 modeling competition, describing it as a complete stomp would be an understatement.

To be honest, products of this level are no longer simply about competitive modeling; they have the potential for commercialization!

Tap the screen to use advanced tools Tip: You can use left and right keyboard keys to browse between chapters.

You'll Also Like