“Los Movimientos”: The Routing Problem That Nearly Broke My Spirit
“Los Movimientos”: The Routing Problem That Nearly Broke My Spirit
“Los Movimientos”:那个差点让我崩溃的路径规划难题
Operations Research “Los Movimientos”: The Routing Problem That Nearly Broke My Spirit Using mathematical optimization to solve a pickup-and-delivery problem with time windows. Luis Fernando Pérez Armas Jul 27, 2026 38 min read
运筹学“Los Movimientos”:那个差点让我崩溃的路径规划难题。利用数学优化解决带时间窗的取送货问题。作者:Luis Fernando Pérez Armas,2026年7月27日,阅读时长38分钟。
Figure 1. Hurry up boys, we got more tools to deliver… (Image generated by Gemini, but it could be a real photo)
图1. 快点,伙计们,我们还有更多工具要送……(图片由Gemini生成,但它完全可能是一张真实照片)
Think of a few words that would instantly fill you with dread. Words that make your shoulders tense the moment you hear them. Words that create that strange void in your stomach, like when an elevator drops a little too fast. Got them? For me, those words were: Los Movimientos — “The movements,” in English.
试着想几个会让你瞬间感到恐惧的词。那些让你一听到就肩膀紧绷的词。那些让你胃里产生一种奇怪空虚感的词,就像电梯下坠过快时的感觉。想到了吗?对我来说,这些词就是:Los Movimientos —— 英语意为“The movements”(调度/移动)。
Back when I worked in oil and gas, my colleagues Jesús B, Karina G. and I were responsible for planning and coordinating every movement of tools and personnel required by the drilling operations across eastern Venezuela for a major oilfield services company. And when activity was at its peak, there were a lot of movements. We were supporting around 50 drilling jobs per month.
在我从事石油和天然气行业时,我和同事Jesús B、Karina G.负责为一家大型油田服务公司规划和协调委内瑞拉东部钻井作业所需的所有工具和人员调度。当业务处于高峰期时,调度任务非常繁重。我们每月要支持大约50个钻井项目。
On any given day, roughly a dozen heavy trucks might be dispatched to deliver or collect drilling tools, while another dozen light pickup trucks transported directional-drilling crews between operational bases, hotels, and active drilling rigs. Most movements involved delivering something from the operational base to a rig, or bringing tools and personnel back from the field.
在任何一天,大约会有十几辆重型卡车被派去运送或回收钻井工具,同时还有十几辆轻型皮卡车在作业基地、酒店和活跃的钻井平台之间运送定向钻井人员。大多数调度涉及将物资从作业基地运送到钻井平台,或者将工具和人员从现场带回。
But sometimes we also had lateral movements between rigs: collect a tool from Rig A, deliver it to Rig B, pick up a crew somewhere else, and somehow get everyone where they needed to be before the driving restrictions kicked in. Every afternoon, usually around 4 p.m., the requests started arriving. Not one by one, calmly and politely. They arrived as a flock.
但有时我们还需要在钻井平台之间进行横向调度:从A平台取工具,送到B平台,在别处接上工作人员,并设法在驾驶限制生效前将所有人送到目的地。每天下午,通常在4点左右,需求就开始涌入。不是一个接一个地、冷静而礼貌地到来,而是成群结队地袭来。
Field service managers would send the required tool movements, personnel movements, urgent pickups, rig-to-rig transfers, and last-minute changes. From that pile of requests, I had to construct the route of every truck and every pickup for the following day. And the vehicles did not necessarily begin at the operational base. Their starting locations depended on where they had finished the previous day. A truck might be parked at the base, at a rig, or somewhere else entirely. The same was true for the crews.
现场服务经理会发送所需的工具调度、人员调度、紧急取货、平台间转移以及最后一刻的变更需求。从那一堆请求中,我必须为第二天每一辆卡车和皮卡构建路线。而且车辆并不一定从作业基地出发,它们的起始位置取决于前一天结束工作的地方。一辆卡车可能停在基地、某个钻井平台,或者完全其他的地方。工作人员的情况也是如此。
To make things more entertaining, driving after 8 p.m. was forbidden except under exceptional circumstances. And no, this was not some annoying bureaucratic rule invented to make our lives more difficult. We were constantly reminded that road accidents were among the greatest dangers in oilfield operations. Moving people and heavy equipment across long distances, often on poor roads and after exhausting shifts, was serious business.
为了让事情更有趣,除非有特殊情况,否则晚上8点后禁止驾驶。不,这并不是为了让我们生活更困难而发明的烦人官僚规定。我们不断被提醒,道路交通事故是油田作业中最大的危险之一。在漫长的路途上、在糟糕的道路条件下、在精疲力竭的轮班后运送人员和重型设备,是一项严肃的工作。
So every route had to work. The vehicle needed enough capacity. It had to begin in the correct location. It had to collect each item before delivering it. The crew needed to be picked up before they could be dropped off. The truck had to reach each rig at a reasonable time. And everything had to finish before the evening driving restriction.
因此,每一条路线都必须可行。车辆需要有足够的载重能力。它必须从正确的位置出发。它必须在交付前先收集好每一件物品。工作人员必须先被接上才能被送达。卡车必须在合理的时间到达每个钻井平台。而且一切都必须在晚间驾驶限制之前完成。
Let me tell you: this task was soul-crushing. Planning each truck felt like solving a horrible maze combined with a difficult Sudoku puzzle, except the Sudoku puzzle could call you the next morning and tell you that you had f*cked it up. I could easily spend several hours every afternoon planning the routes. I did it with pen and paper. Well, pen, paper, and an Excel spreadsheet. But Excel was not helping much.
我告诉你:这项任务简直让人心力交瘁。规划每一辆卡车的路线就像是在解一个可怕的迷宫,再加上一个高难度的数独游戏,只不过这个数独游戏第二天早上会打电话告诉你,你把它搞砸了。我每天下午很容易就会花上几个小时来规划路线。我用纸和笔来做。好吧,是纸、笔和一个Excel表格。但Excel并没有多大帮助。
I would eventually finish, look at the plan, and convince myself that everything made sense. Then, the following morning, I would discover that one route was infeasible, that a tool could not arrive on time, that a vehicle had been assigned somewhere else, or that a sequence I had proposed simply did not work. Then everything had to change again. It was deeply demoralizing.
我最终会完成规划,看着计划,说服自己一切都合理。然后,第二天早上,我会发现某条路线不可行,某个工具无法按时到达,某辆车被分配到了别处,或者我提出的某个顺序根本行不通。然后一切又得重新改变。这非常令人沮丧。
Perhaps you have experienced something similar. There is a particular kind of frustration that comes from not knowing how to do your job well and, even worse, having absolutely no idea how to improve. You know there must be a better way. You suspect that someone, somewhere, has already solved a similar problem. But you do not even know what words to type into Google. That was exactly where I was.
也许你也有过类似的经历。有一种特别的挫败感,来自于不知道如何做好自己的工作,更糟糕的是,完全不知道如何改进。你知道一定有更好的方法。你怀疑在某个地方,有人已经解决了类似的问题。但你甚至不知道该在谷歌里输入什么关键词。我当时就处于这种境地。
This was 2015–2016. There was no ChatGPT, no Claude, and no helpful chatbot waiting to explain vehicle-routing models to an exhausted drilling engineer at five in the afternoon. I searched online for things like “transportation planning,” “truck routing,” and “logistics optimization.” What did I find? Mostly advertisements from trucking companies and generic logistics blogs explaining that transportation was important. Thank you. Very helpful.
那是2015-2016年。没有ChatGPT,没有Claude,也没有什么乐于助人的聊天机器人会在下午五点等着向一位精疲力竭的钻井工程师解释车辆路径模型。我在网上搜索了诸如“运输规划”、“卡车路径规划”和“物流优化”之类的词。我发现了什么?大多是货运公司的广告,以及一些泛泛而谈的物流博客,解释说运输很重要。谢谢,非常有帮助。
The only genuinely useful thing Jesús and I found was an article saying that we needed to construct a distance matrix. So we began doing exactly that. Jesús, Karina, we were on the right track. But, analytically speaking, we were also so incredibly far away. It was like going to a doctor knowing that you were sick, but not knowing what disease you had, what kind of specialist you needed, or even how to describe the symptoms. Where do you begin when you do not know the name of the problem?
Jesús和我找到的唯一真正有用的东西是一篇文章,说我们需要构建一个距离矩阵。于是我们开始着手做这件事。Jesús,Karina,我们走在正确的轨道上。但是,从分析的角度来看,我们离目标还差得太远。这就像去看医生,知道自己病了,却不知道得了什么病,需要什么专家,甚至不知道如何描述症状。当你连问题的名字都不知道时,该从哪里开始呢?
The worst part was that, from the outside, none of this looked particularly difficult. Other people would casually assume that planning the movements should be easy. Just assign a few trucks, draw some routes, and send them out. But I have not yet told you the most painful part. We did not have a dedicated fleet. The heavy trucks and pickups came from a shared pool used by several oilfield service segments. My segment was drilling, but other business lines were competing for the same vehicles. If one truck was assigned to us, that was one truck unavailable to another operation. So we were not merely trying to design good routes. We were trying to design them with scarce resources, under time restrictions, with uncertain starting locations, paired pickup-and-delivery requirements, vehi…
最糟糕的是,从外人看来,这一切看起来并不难。其他人会随口认为规划调度应该很容易。只要分配几辆卡车,画几条路线,然后把它们派出去就行了。但我还没告诉你最痛苦的部分。我们没有专门的车队。重型卡车和皮卡车来自几个油田服务部门共用的车队。我所在的部门是钻井部,但其他业务线也在争夺同样的车辆。如果一辆卡车分配给了我们,那就意味着另一项作业就少了一辆车。所以我们不仅仅是在设计好的路线。我们是在资源匮乏、时间受限、起始位置不确定、存在配对取送货要求的情况下,试图设计出这些路线……