<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[CloudTrucks Engineering - Medium]]></title>
        <description><![CDATA[A journey into how we are building the intersection between trucking and technology - Medium]]></description>
        <link>https://medium.com/cloudtrucks-engineering?source=rss----2835cf1109ba---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>CloudTrucks Engineering - Medium</title>
            <link>https://medium.com/cloudtrucks-engineering?source=rss----2835cf1109ba---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 08:30:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/cloudtrucks-engineering" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[P-Rex: Personalized Load Recommendation System]]></title>
            <link>https://medium.com/cloudtrucks-engineering/p-rex-personalized-load-recommendation-system-322d3792d55d?source=rss----2835cf1109ba---4</link>
            <guid isPermaLink="false">https://medium.com/p/322d3792d55d</guid>
            <category><![CDATA[trucking]]></category>
            <category><![CDATA[recommendation-system]]></category>
            <category><![CDATA[mls]]></category>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[personalization]]></category>
            <dc:creator><![CDATA[CloudTrucks]]></dc:creator>
            <pubDate>Tue, 25 Jun 2024 23:55:05 GMT</pubDate>
            <atom:updated>2024-06-26T00:37:00.713Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>The first core value at CloudTrucks is to put drivers first. One way to serve drivers is by providing personalized load recommendations upon search — similar to how Netflix recommends shows or how YouTube suggests videos based on user preferences. We aim to achieve the same for our drivers, while acknowledging the differences between trucking load boards and TV shows.</p><p>From a data and engineering perspective, we focused on selecting the best machine learning (ML) algorithms and infrastructure to serve drivers, considering the nature of the data. From a product perspective, we prioritized frequent updates with incremental improvements based on user feedback, rather than infrequent major updates.</p><p>Meet Fred the P-Rex, our Personalized Load Recommendation System’s friendly dinosaur. Join us on Fred’s journey, from a notebook to a recommender with high user engagement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qwlXaHhTzoXqYITFRx9oCQ.jpeg" /><figcaption>Fig. 1: Fred the P-Rex, who is the mascot of the P-Rex project (as well as a personal holiday crochet project of our data scientist)!</figcaption></figure><h3>How We Built Fred: Development Process</h3><p>Our core assumption for P-Rex was that a driver’s preferences for booking loads, such as trip distance or pickup location, do not change significantly over time because a driver’s preference for being at home at night or their home address doesn’t change often. Thus, a driver’s past booking behavior is a good predictor of future actions. We validated this through a booking similarity analysis, which gave us the confidence to proceed to the next step.</p><p>While collaborative filtering is widely used (as highlighted by<a href="https://link.springer.com/chapter/10.1007/978-3-540-68880-8_32"> Netflix’s notable research</a>) to build recommendation systems, it proved unsuitable for our case because once a driver books a load, it becomes unavailable to others, unlike movies which can be recommended to multiple users. Consequently, we opted for the<a href="https://xgboost.readthedocs.io/en/stable/python/python_intro.html"> XGBoost</a> Classification model, using the probability of accurately predicting a true label (in our case, booking a load) from a classification model to rank scores. XGBoost uses decision trees to effectively capture feature interactions. It manages multicollinearity by selectively dropping redundant features and keeping the most significant ones, facilitating easier determination of reliable feature importance. Optimized for scaling large datasets through parallelization, XGBoost also efficiently handles missing values, making it well-suited for P-Rex.</p><p>We created an initial model prototype using a small subset of the data. Working with high-quality, small data samples enables rapid development and testing of different models in the initial phase of model development. This phase also allowed for experimenting with various feature engineering techniques.</p><p>For feature engineering, we started with features that reflect drivers’ preferences and remain consistent over time. We normalize each user’s data for ML by comparing their current values to their past preferences. For example, a driver’s pickup locations tend to be fairly consistent. Additionally, we create new features by calculating ratios, which enhances our model’s accuracy. Alongside these personalized features, we incorporated features that capture general preferences of any user — for instance, all drivers prefer to generate more revenue and have fewer deadhead miles.</p><p>While developing P-Rex, we experimented with numerous parameters and model hyper-parameters, such as the look-back window for the training period, different feature sets, and regularization parameters in XGBoost. We evaluated the Area Under the Curve (AUC) for various parameter sets and selected those that yielded the best results. We also emphasized model interpretability and utilized the<a href="https://shap.readthedocs.io/en/latest/"> SHAP</a> (SHapley Additive exPlanations) package. In addition to checking the SHAP values of user-specific (i.e., personalized) features to understand user behavior and inform subsequent actions, we also reviewed the SHAP values of revenue related features to ensure they have the expected impact as a sanity check for the model.</p><h3>Feeding Fred: Preparing the Data</h3><p>While feature selection and engineering are at the core of what makes ML models great, the structure of your data sets is crucial for model performance. Some common pitfalls to avoid include:</p><ul><li>Ensuring that data used for training reflects the state as it would be for real-time inference</li><li>Accurately reflecting historical states when using historical aggregates during training, computing them the same way as for live inference</li><li>Ensuring consistent application of feature engineering between training and inference</li></ul><p>To address these issues, remember that all features are ultimately derived from how entities (in our case, “drivers” and “loads”) interact over time. We separate our feature sources into information that is relevant “now” for a given driver and load, and information regarding historical preferences and behavior.</p><h4>Timely Data</h4><p>We combine the information known about the driver and the load at the time of prediction to develop features relevant to driver/load compatibility, such as the driver’s current distance from the pickup point. When the model is deployed, you simply extract this information at the time of inference. However, during training, you must capture the state of these entities as they would have been for a live prediction. The ETL process must capture the entities’ state across multiple points in time to avoid<a href="https://en.wikipedia.org/wiki/Leakage_(machine_learning)"> target leakage</a>.</p><h4>Historical Driver Preference</h4><p>To estimate a driver’s compatibility with a load, it’s helpful to look at the driver’s past behavior. Some drivers prefer local routes, while others prefer long hauls. Computing such features requires long-running aggregates, and their definitions need to be standardized. Failing to do so can lead to several issues:</p><ul><li>Computation of expensive aggregations offline that are not easily reproducible in production</li><li>Inconsistent definitions between offline and real-time applications</li><li>Incorrectly associating feature values with their observed time, leading to major performance discrepancies between training and prediction — this relates to label leakage</li></ul><p>To address these issues, use a properly designed feature store where:</p><ul><li>The same process generates values for both offline and real-time applications</li><li>The process loads the most recent feature values to a low-latency serving store</li></ul><h3>Unleashing Fred: Deployment and Monitoring</h3><p>Deploying ML models to production in a scalable, performant way requires several key components:</p><ul><li>A convenient workflow for machine learning engineers and data scientists, with model life cycle management from training to monitoring live performance</li><li>Solid integration of the feature store for both offline and online applications</li><li>Monitoring and scalability of the model in production</li></ul><p>Since we are on GCP (Google Cloud Platform) and our data scientists were already using <a href="https://cloud.google.com/vertex-ai/docs/start/introduction-unified-platform">Vertex.ai</a> Jupyter notebooks, using the <a href="https://cloud.google.com/vertex-ai/docs/start/introduction-unified-platform">Vertex.ai</a> tool stack was a natural starting point for us. We deployed our first version of P-Rex that way but soon encountered some bottlenecks:</p><ul><li>Deploying custom code along with your model artifact isn’t straightforward. The general inference interface expects all feature engineering to be done before sending the prediction over the wire to the hosted model, requiring us to:</li><li>Replicate feature engineering in both the training job and the real-time inference code</li><li>Make the client application aware of the ML specifics of the model</li><li>Make changes in several places whenever we want to modify feature engineering</li><li>The feature store service and the model service are decoupled. The feature store is called differently for training and inference. Moreover, the client application needs to make a separate call to the feature store client and perform feature engineering before calling the model service. This is a poor abstraction</li></ul><p>While our goal is not a comparative evaluation of different MLOps products, we switched to<a href="https://www.qwak.com/"> Qwak</a> in subsequent iterations. Their model abstractions allow us to define the model, feature engineering, and inference behavior in a single place. This eliminates code or logic replication between applications. Moreover, their feature store client is deployed to the same cluster as the model for low-latency serving, and the integration is seamless. The application client only needs to call the model with a payload composed of understandable entities, not vectors and matrices of numerical values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AxeaVUrPqQdmlZzoaoMSZw.png" /><figcaption>Fig. 2: Architectural diagram of personalized load recommendation system. The key to any successful real-time ML service is to centralize the feature data generation and the feature engineering to be identical in offline training and real-time inference.</figcaption></figure><h3>Ensuring Fred’s Growth: Continuous Improvement</h3><p>To ensure Fred’s continuous improvement and growth with each new iteration, we focus on three key areas. First, we collect feedback from drivers through surveys and their direct interactions with the Ops team. Second, based on this feedback and brainstorming sessions with team members beyond the engineering team, such as Product, Design and Ops teams, we develop additional features to enhance our model’s intelligence. Finally, we maintain a process of continuous retraining and deployment. We have automated weekly deployments, triggering them based on the AUC threshold. We also monitor model performance and interpretability by checking the drift of AUCs for both test and future holdout datasets, as well as feature importance. Training data quality is monitored by checking the null fraction of features.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v6WFm2l9tBCKkIKpmps-NQ.png" /><figcaption>Fig. 3: P-Rex model’s performance over time, using AUC as the metric. The AUC scores for both the test data (blue line) and the future holdout data (orange line) are plotted against deployment dates. Despite some fluctuations, both lines generally stay above 0.85, indicating strong model performance. The use of test and future holdout data ensures robustness, showing the model performs well on current and future unseen data. Continuous monitoring and evaluation help maintain and improve the model’s accuracy over time.</figcaption></figure><h3>What Fred Could Do: Performance &amp; Application</h3><h4>Search Ranking</h4><p>Our first use case for P-Rex is to improve search relevance ranking for each driver when they search for work. Drivers search for loads similarly to how one may look for a flight. Traditionally, we defaulted to sorting the results with parameters such as rate per mile as a simple heuristic for desirability, with the ability for the driver to re-sort by other fields and further filter. Our hypothesis was that using P-Rex, we could achieve a default sorting that better reflects the user’s preferences. Our experiment indicated that using this approach increased the booking rate by 12% over the control group.</p><h4>Push Recommendations (Push-Rex)</h4><p>While many of us find constant app notifications annoying, our hypothesis was that our drivers would find it useful if we automatically sent them relevant options for their next job. By talking to the customers, we learned that as they are busy driving, proactively sending them relevant recommendations will help them. When ranking recommendations, we already know what the user is searching for. However, when considering pushes, we need to determine which loads work with our drivers’ schedules and preferred geographies before ranking them. We also want to ensure that the options pay above the market benchmark for the lane before recommending them.</p><p>We find that our drivers find this feature very useful, with consistently over 11% of push notifications being clicked on. Moreover, the booking rate for the results of push notifications is almost 3x that of organic search.</p><p>In the future, we aim to make this feature even more relevant, as bespoke recommendations help our drivers stay active and earn more money.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=322d3792d55d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudtrucks-engineering/p-rex-personalized-load-recommendation-system-322d3792d55d">P-Rex: Personalized Load Recommendation System</a> was originally published in <a href="https://medium.com/cloudtrucks-engineering">CloudTrucks Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Business Intelligence Backend]]></title>
            <link>https://medium.com/cloudtrucks-engineering/building-a-business-intelligence-backend-666f2086ba46?source=rss----2835cf1109ba---4</link>
            <guid isPermaLink="false">https://medium.com/p/666f2086ba46</guid>
            <category><![CDATA[business-intelligence]]></category>
            <dc:creator><![CDATA[CloudTrucks]]></dc:creator>
            <pubDate>Wed, 26 Apr 2023 20:29:41 GMT</pubDate>
            <atom:updated>2023-04-26T21:01:23.504Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B-QFRHB2lSUMWGK78PiLkA.jpeg" /></figure><p>At CloudTrucks, we aim to provide best in class data science, operations, and technology directly to truck drivers. With our service, single truck owner-operators and small fleets have freedom to run their business as they choose while enjoying the back office benefits of a large carrier — access to a large network of shippers, smooth and predictable cash flows, and safe, efficient routing — all with clear and transparent pricing.</p><p>There are 3.5M drivers in the U.S., and more than 10% of them own and operate their own trucks. 86% of trucking fleets having fewer than six trucks. Clearly, building a lean product that is broadly useful is not easy. This means, behind the scenes, we’re building systems to allow team members with backgrounds at least as diverse as our customers to contribute effectively.</p><p>Our recent <a href="https://www.cloudtrucks.com/blog-post/cloudtrucks-launches-flex-ct-cash-and-business-intelligence">Business Intelligence initiative</a> expressed this lesson well. The challenge was to expose the richness of data insights we enjoy internally (via our data science team) directly to our drivers.</p><p>We wanted to build a system that is both unobtrusive yet powerful enough to serve complex analytics, and able to scale with our customer base, while also requiring minimal engineering upkeep. This last point is especially important since we only have around 10 engineers and data scientists on our team!</p><p>I wanted to write this blog post not only to showcase the excellent work our team has done with relatively few resources, but also to share lessons learned for other companies looking to bootstrap data teams.</p><p>In the following sections, I’ll describe the tech stack we ended up implementing, some decisions that sped up production, and a couple of data principles underpinning the design.</p><h3>Technologies</h3><p>New data technologies are becoming available at a fantastic rate. For this project, the challenge wasn’t in finding services that could perform to spec, it was in choosing which ones to adopt. In the end, our we selected services that easily fit together, reducing development time spent on “the seams”, and also didn’t break the bank.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vp2aVVphoBU0LB_P.png" /><figcaption>Our driver facing business intelligence tech stack is a combination of three services that fit easily together.</figcaption></figure><p>Our driver facing business intelligence tech stack is a combination of three services that fit easily together.‍</p><p>Our driver facing business intelligence tech stack is a combination of three services that fit easily together.</p><p>One surprise, at least to me, was this didn’t mean using the fewest services possible. Splitting our metric registry from the actual metric logic ended up as a core design decision.</p><p>The metric registry catalogues all metrics available in our platform, as well as their granularities. It tells clients what they can query, which dimensions they can segment, and the time frequencies available.</p><p>It’s written in Django to be deeply embedded with the rest of our backend applications. The registry, plus a custom query language, all in a common API layer, simplified integration to the point that our front end team built the driver-facing UI practically autonomously. <a href="https://www.django-rest-framework.org/">Django Rest Framework</a> merits a shout-out here, for turning our serializers into elegant workhorses, and probably deserves a blog post of its own.</p><p>Also, since every registry entry is a Django model instance, we got a no-code interface for next to nothing through Django’s admin site. The result: zero additional engineering effort is required to create new metrics, or edit existing ones.</p><p>Next, all metric definition logic — how metrics are actually computed — is housed in <a href="https://dataform.co/">Dataform</a>. For the uninitiated, Dataform is a toolkit for managing the “T” in ELT using SQL, JSON configurable pipelines, and some Javascript for customization. Why did we choose Dataform instead of any number of competitors?</p><p>A big draw was Dataform’s web app which is a browser IDE plus managed pipeline infrastructure all in one. In one afternoon, I had a pipeline defined and running periodically to our data warehouse, with an isolated dev environment, version control, and data validation. Since then, our small data team has developed on it with minimal friction. The cost is pretty good too (free as of writing this post).</p><p>Finally, since we are a Google Cloud hosted shop, the decision to use BigQuery for our metric store was straightforward. However, here too was an unexpected benefit which sped up dev time. Federated queries made extracting transactional data from our (GC hosted) Postgres dbs almost too easy. Our <em>entire</em> ELT is defined by a number of SQL queries and a few config files in Dataform.</p><h3>Data Principles</h3><p>The flip-side to finding the right technologies is learning how we use them. By aligning ourselves to a couple of data principles, we helped ensure our system will scale well in both complexity, and throughput.</p><p>First, business metrics are hierarchical. At CloudTrucks, trucking fleets are composed of multiple drivers, who each perform many deliveries for many shippers, and each delivery has an invoice with multiple line items, etc.</p><p>This same concept extends to practically any business that manages customer data, and indeed, we were initially motivated by the <a href="https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/41344.pdf">F1 db design</a> built at Google for AdWords, and its use of table schemas clustered by hierarchy to reduce latency.</p><p>From this hierarchy principle, we developed a validation rule for metrics that, when followed, allows us to return the appropriate dimensions for a query via a simple algorithm. The rule removes ambiguity in what aggregation to return for a metric query. Full details are in the Appendix.</p><p>A simple example, imagine we have a revenue metric that is aggregated at both the fleet and driver level: weekly revenue for Acme Trucking is the sum of revenue for the fleet’s drivers, Joe and Sally.</p><p>Our query language should return Joe’s revenue when queried with driver=Joe, Acme Trucking’s revenue when queried with fleet=Acme Trucking, and Sally’s revenue when queried with fleet=Acme Trucking, driver=Sally . This can be solved with a hierarchy of fleet → driver.</p><p>Things get more complex when Joe and Sally can drive each other’s trucks, deliveries are categorized by region, we want to be able to query for all permutations of filters, and we want to distinguish queries for “revenue for all drivers at Acme Trucking” from “total revenue for Acme Trucking.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8R1og5gi0UyTsyA9.png" /><figcaption>A valid hierarchy for querying fleets, drivers, trucks and regions according to our validation rule.</figcaption></figure><p>A valid hierarchy for querying fleets, drivers, trucks and regions according to our validation rule.</p><p>‍A valid hierarchy for querying fleets, drivers, trucks and regions according to our validation rule.</p><p>Our metric validation reduces the code complexity required to support these queries (finding the right aggregation level is equivalent to finding the root in a subtree), on the one hand, and allows heavily pre-aggregated metric tables on the other.</p><p>We capitalize on the latter in our metric table schema. We use a <a href="https://en.wikipedia.org/wiki/Star_schema">star schema</a>, but with full dimensional indices for each level of hierarchy. The result is a data format that is the same for all metrics and levels, and needs no additional joins to dimension tables at query time. Metric queries are fast, simple, and powerful.</p><p>Finally, this whole setup is sharding efficient due to the natural clustering, giving us ample room to grow along with our drivers.</p><h3>And Beyond</h3><p>Building out our driver business intelligence service is one way we have leveraged our decades of in-house expertise across our customer base. Any data we can store and transform in our data warehouse, from performance stats to market forecasts and recommendations, is up for grabs for sharing with CloudTrucks’ fleets.</p><p>We believe emergent technology and analytics are the cornerstones to running a successful trucking business, and we are excited to build them as part of the core product at CloudTrucks.</p><p>Are you interested in enabling the trucking fleets of today and tomorrow? We’re hiring!</p><p>A big thanks to Gabriel Akintayo and Sam Tibbs for their help on this project!</p><h3>Appendix</h3><p>A metric can be aggregated with different dimensions, for example revenue can be aggregated at the driver level, or the fleet level (fleets are composed of multiple drivers). We call any such aggregation level a <em>granularity.</em> The following two rules validate that a metric and its dimensions form a <em>hierarchy:</em></p><ol><li>A granularity can only be a descendent (child, child of a child, …) of another granularity if it contains all of the dimensions of its ancestors. Any granularity that contains the dimensions of another must be a descendent.</li><li>For any granularity, the subtrees formed by all other granularities that have overlapping dimensions (for example, the {driver, fleet} granularity overlaps with the {driver, vehicle} granularity) have their roots (granularities with no ancestors) contained in the original granularity.</li></ol><p>The following, simple algorithm finds the correct granularity to return for a query on a hierarchy:</p><ol><li>Find all granularities that contain the dimension filters of the query.</li><li>Return a root of the ancestry trees formed by the granularities from (1).</li></ol><p>The validation rules guarantee that the algorithm terminates, and, in all but a few cases, has a unique result.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=666f2086ba46" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudtrucks-engineering/building-a-business-intelligence-backend-666f2086ba46">Building a Business Intelligence Backend</a> was originally published in <a href="https://medium.com/cloudtrucks-engineering">CloudTrucks Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CT Hacks: Celebrating Innovation & Teamwork]]></title>
            <link>https://medium.com/cloudtrucks-engineering/ct-hacks-celebrating-innovation-teamwork-b225f4acf985?source=rss----2835cf1109ba---4</link>
            <guid isPermaLink="false">https://medium.com/p/b225f4acf985</guid>
            <dc:creator><![CDATA[Mia]]></dc:creator>
            <pubDate>Mon, 12 Dec 2022 19:24:31 GMT</pubDate>
            <atom:updated>2022-12-12T20:49:33.868Z</atom:updated>
            <content:encoded><![CDATA[<p>At CloudTrucks our core values are “Put Drivers First”, “Bias Towards Action”, “Foster Innovation”, “Stay Curious” and “Be a Team Player”. The second annual hackathon, CT Hacks, was a great example of these values. For two days in October, our scrappy teams put aside non-time-sensitive work to focus on prototyping their brilliant ideas. At the end of the two days, they presented their projects to the panel of judges and the entire company.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qjuZnAsQiGFIuE_-X-wGPQ.jpeg" /></figure><p>Everyone across the company participated, not just our engineering group! Teams formed independently and brought together cross functional expertise. Projects varied from building out developer tools to products that will delighting customers. Teams submitted their project under three tracks for judging:</p><ul><li><strong>Growth</strong> focused on attracting new drivers and scaling our existing products.</li><li><strong>Efficiency</strong> focused on improving processes in the driver experience, or internal operations.</li><li><strong>Freestyle</strong> was anything else! The wide spread of perspectives meant there was no lack of excellent ideas!</li></ul><p>To get a demo within a short amount of time it was important for teams to collaborate effectively — keep everyone on the same page, make decisions quickly, and code away! Most groups brought together a range of skills, from product and design to operations know-how to data and software engineers. The hackathon brought a buzz of excitement and helped people build new connections. These bonds and collaboration carry through into our day to day work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ysEimqLpR4MUzzslicBR3A.jpeg" /><figcaption><em>Team CT Gamification: (f</em>rom left to right) Gulabi is a product manager for growth, Viraj is an engineer on the cash team, Brandon is a data analyst on the data team and Taylan is a frontend engineer for our webapp.</figcaption></figure><p><strong>Congratulations to our winning teams!</strong> 🎉</p><p>Tobenna Arodiogbu (CEO &amp; co-founder), Jin Shieh (CTO &amp; co-founder) and Michele Pendergast (Head of Growth) were our discerning judges. After intense deliberation, the judges awarded winning teams by track and a fan favorite. Winning teams got prizes — and, of course, bragging rights. Here are the winning teams in each category:</p><h3>Growth</h3><p><strong>CT Gamification</strong> aims to retain and attract drivers with a points based program. It awards drivers for reaching milestones — for example, completing the onboarding process and percentage of monthly jobs. For each tier of points, drivers can receive incentives like cash back, partner discounts, etc.</p><h3>Efficiency</h3><p>Drivers sometimes call in needing help with the app. With different driver permissions and product lines, it’s useful for operations members to know exactly what drivers see. <strong>Operation Mode</strong> allows our staff members to navigate the app as a member of the driver’s team without engineering support.</p><h3>Freestyle</h3><p>At CT, we must validate and manage a lot of documents from driver medical cards to proof of delivery. It’s important to automate document validation as we scale. As the name states, <strong>Document Photoshop</strong> accurately identifies documents that have been doctored — comparable to some of the vendor solutions in the market!</p><h3>Fan Favorite</h3><p>It can be hard for potential CT drivers to truly understand all of the benefits of our products before subscribing. <strong>Tiny Carrot</strong> allows them to explore the app while keeping the core of our product available to only subscribers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f35jy8bcMV-CJKPYdIVhrg.jpeg" /><figcaption>Judges: (left to right) Michele Pendergast, Tobenna Arodiogbu and Jin Shieh</figcaption></figure><p>Congrats again to our winning teams! Our judges loved the ideas so much that they have committed to sponsoring the productization of these four projects!</p><p>Thank you to everyone who contributed to the hackathon and making it a fun experience for all. We hope to see you at the next hackathon!</p><p>And if this type of creative, collaborative, and mission-driven culture is one you can see yourself in, please reach out to either Alvin (<a href="/service/mailto:alvin.ye@cloudtrucks.com">alvin.ye@cloudtrucks.com</a>) or Charlene (<a href="http://clouie@cloudtrucks.com/">clouie@cloudtrucks.com</a>)!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b225f4acf985" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudtrucks-engineering/ct-hacks-celebrating-innovation-teamwork-b225f4acf985">CT Hacks: Celebrating Innovation &amp; Teamwork</a> was originally published in <a href="https://medium.com/cloudtrucks-engineering">CloudTrucks Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Schedule Optimizer & HoS Clocks]]></title>
            <link>https://medium.com/cloudtrucks-engineering/schedule-optimizer-hos-clocks-d257735c127f?source=rss----2835cf1109ba---4</link>
            <guid isPermaLink="false">https://medium.com/p/d257735c127f</guid>
            <dc:creator><![CDATA[Max Lewin]]></dc:creator>
            <pubDate>Fri, 14 Oct 2022 04:27:52 GMT</pubDate>
            <atom:updated>2022-10-25T20:09:12.715Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kd7ea-L9K-EbL6l2gB4jdA.jpeg" /></figure><p>At CloudTrucks we’re building a platform for truck drivers to run better businesses. A common difficulty we hear from our users is finding efficient routes that minimize deadhead and maximize profit while keeping them in line with regulations. One of the many tools we provide towards this end is the Schedule Optimizer — a tool that takes, as input, a driver’s desired time and distance to drive and/or revenue to earn, and as output formulates a sequence of loads for them to carry, such that they spend minimal time driving without a load (AKA deadhead). Sounds like an old-fashioned <a href="https://en.wikipedia.org/wiki/Constraint_programming">constraint satisfaction problem</a>, right? However, the driver’s preference constraints are only one part of the picture.</p><p>Truck drivers in the US have to follow a number of stringent regulations around safety. These are defined and enforced by the Federal Motor Carrier Safety Administration (FMCSA). One subset of these regulations relates to Hours of Service (HoS), i.e. the duration of time a driver spends driving their vehicle as part of their job. There are a handful of rules for drivers to follow, most of which are simple enough on their own, but in combination they make the process of planning out a feasible and compliant schedule quite complex, to the point where some drivers will simply forgo trying to plan multi-load schedules and play it by ear, working only one load at a time. This is not optimal for the driver, because it means their work schedule is less efficient than it could be, which in turn means they are earning less than they could be in a given time period.</p><p>But with the power of Python and object-oriented programming we’ve developed a system that can balance both driver preferences and regulatory HoS constraints when formulating a schedule — in this blog post, we’ll focus on how we built the latter. We start by modeling the various regulations via two abstractions, Limits and Rules. Limits are a simple data class defined as such:</p><pre>class Limit:<br>  state: DrivingState<br>  limit: Time</pre><p>DrivingState is used to represent different states defined by the FMCSA, such as “On Duty” - when a driver is on the clock - and “Driving” - when they’re actively driving a load. An interesting wrinkle worth noting is that a driver <em>can</em> be driving their truck while off-duty, to get home or to other accommodations, a practice known as “Personal Conveyance” (but there are also limits to how long they can do so, to avoid gaming the regulations).</p><p>There are 3 types of Rules the FMCSA defines: Limit, Shift, and Cycle. Rules are then composed of a pair of limits (how long they can drive, and how long they must rest), and a name for the rule.</p><pre>class ShiftRule:<br>  name: str<br>  active: Limit<br>  rest: Limit</pre><p>So what do we do with these Rules and Limits? We make clocks to track them! As our schedule optimizer uses a constraint satisfaction algorithm to work towards an (approximately) optimal schedule given our driver’s preferences, it explores potential schedules of loads; a schedule is comprised of a sequence of events with temporal durations, as well as flags indicating if the event is a drive, rest period or another event, among other metadata. For each potential schedule, to validate that it is feasible according to FMCSA regulations, we instantiate a Clock object for each Rule. As we step through the events in a potential schedule, the duration and type of each event are given as input to an advance method that modifies the state of the clock to track the durations relevant to the rule. The implementations vary for each type of Clock, but we’ve included an abridged version of the abstract base class in the appendix below.</p><p>One neat property of these abstractions is that we can use them looking both forward and backward in time — while we’ve been describing them in the context of building out schedules in the future, we’re also able to use the same code to evaluate historical schedules from our drivers ELD (short for electronic logging device, a black box device all US commercial trucks must carry for tracking their regulatory compliance) data, to give them insights into their HoS rules compliance. Wall clocks can’t do that!</p><p>What does this all mean for drivers? For one, our drivers can leverage our schedule optimizer to make schedules for them, with a high degree of confidence that the schedule will be making them about as much revenue as possible given their preferences. Additionally, they can have peace of mind that these schedules will be feasible, both in terms of being physically achievable and in terms of being compliant with regulations. Finally, since CloudTrucks never forces dispatch, drivers are free to generate schedules and not follow them, just to see what a revenue-maximizing, fully feasible schedule looks like, and then incorporate that knowledge into their hand-made schedules if they so desire. If this problem interests you and you want to build more reusable abstractions that help truck drivers run better businesses, check out our <a href="https://www.cloudtrucks.com/careers">hiring page</a>!</p><p>Thanks to everyone who contributed to both the code and this blog post!</p><p>Appendix:</p><pre>class Clock(abc.ABCMeta):<br>    &quot;&quot;&quot;Clocks track, on a rule-by-rule basis, the adherence to each <br>       hour of service regulation</pre><pre>       This class represents the Clock protocol, <br>       which all rules must obey. <br>       It provides a few convenience methods as well.</pre><pre>       Parameters<br>       ----------<br>       rule: Rule<br>         The rule which this clock tracks.<br>    &quot;&quot;&quot;</pre><pre>    rule: Rule</pre><pre>    @abc.abstractproperty<br>    def counter(self) -&gt; Time:<br>        &quot;&quot;&quot;<br>        Counter represents how much time has elapsed which counts <br>        against this clock<br>        &quot;&quot;&quot;<br>        pass</pre><pre>    @abc.abstractmethod<br>    def _active(self, duration: hos_time.Time) -&gt; List[Violation]:<br>        &quot;&quot;&quot;Increment the clock for the active state for this rule&quot;&quot;&quot;<br>        pass</pre><pre>    @abc.abstractmethod<br>    def _rest(self, duration: hos_time.Time) -&gt; List[Violation]:<br>        &quot;&quot;&quot;Increment the rest clock for this rule&quot;&quot;&quot;<br>        pass</pre><pre>    @abc.abstractmethod<br>    def _inactive(self, duration: hos_time.Time) -&gt; List[Violation]:<br>        &quot;&quot;&quot;No clock is incrementing, but no rest is accruing&quot;&quot;&quot;<br>        pass</pre><pre>    @abc.abstractmethod<br>    def time_until_rest(self) -&gt; hos_time.Time:<br>        &quot;&quot;&quot;Hours remaining on this clock until a rest is required&quot;&quot;&quot;<br>        pass</pre><pre>    @abc.abstractmethod<br>    def time_until_reset(self) -&gt; hos_time.Time:<br>        &quot;&quot;&quot;Hours remaining on this clock until a rest is<br>           fulfilled<br>        &quot;&quot;&quot;<br>        pass</pre><pre>    @abc.abstractmethod<br>    def advance(self, state: DrivingState, duration: Time) -&gt;<br>      List[Violation]:<br>        &quot;&quot;&quot;<br>        Advance this clock forward, in a given driving state,<br>        and return a list of violations which occur during this<br>        advancement.</pre><pre>        Parameters<br>        ----------<br>        state: DrivingState<br>          What state is the driver in during this time?<br>        duration: Time<br>          How long does the driver advance?</pre><pre>        Returns<br>        -------<br>        violations: List of Violation<br>           List of violations which occurred while advancing in<br>           this state, possibly empty.<br>        &quot;&quot;&quot;<br>        pass</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d257735c127f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudtrucks-engineering/schedule-optimizer-hos-clocks-d257735c127f">Schedule Optimizer &amp; HoS Clocks</a> was originally published in <a href="https://medium.com/cloudtrucks-engineering">CloudTrucks Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Welcome to Engineering at CloudTrucks!]]></title>
            <link>https://medium.com/cloudtrucks-engineering/welcome-to-engineering-at-cloudtrucks-791ae5493df8?source=rss----2835cf1109ba---4</link>
            <guid isPermaLink="false">https://medium.com/p/791ae5493df8</guid>
            <dc:creator><![CDATA[CloudTrucks]]></dc:creator>
            <pubDate>Fri, 30 Sep 2022 09:27:46 GMT</pubDate>
            <atom:updated>2022-09-30T18:27:10.181Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*10EBKCzDuC_q_DjLmnWasw.png" /></figure><p>Our engineering team is pushing the limits when building the future platform for truckers to run better businesses.</p><p>We highly value autonomy, ownership, and delivering results — in short, whatever it takes to set our customers up for success. We encourage each other to push the envelope, execute quickly, and be resilient to failure. We are dedicated to delivering an above-and-beyond customer experience while respecting and celebrating each other’s personal backgrounds, values, and commitments.</p><p>We take pride in seeing the outsized impact on our product, and have memorable experiences learning and growing alongside a truly exceptional set of peers.</p><p>In this blog, you’ll get a chance to peek behind the curtain at some of the exciting work we’re doing at the intersection of trucking and software engineering. We’ll have both technical posts detailing interesting challenges, such as optimizing schedules for revenue and regulatory compliance, as well as spotlight articles to get to know our engineering team members better.</p><p>As with most engineering blogs, our target audience will mainly be fellow engineers (who we hope will consider joining us — <a href="http://www.cloudtrucks.com/careers">we’re hiring!</a>), but we hope it will also be of interest to technologically inclined truckers, trucking-inclined technologists, and lots of other folks!</p><p>Sincerely,</p><p><a href="https://www.linkedin.com/in/jinshieh?miniProfileUrn=urn%3Ali%3Afs_miniProfile%3AACoAAABuN2sBs5p71SThmhDjmaA6YfG0GHIH3fY&amp;lipi=urn%3Ali%3Apage%3Ad_flagship3_search_srp_all%3BPDGg9xatRESJQhFHJBbgdg%3D%3D">Jin Shieh — CTO &amp; Co-founder</a><br><a href="https://www.linkedin.com/in/georgeezenna?miniProfileUrn=urn%3Ali%3Afs_miniProfile%3AACoAAA2g8L4BdTEBkfWHwnw3ypAYQuYITAjNqyY&amp;lipi=urn%3Ali%3Apage%3Ad_flagship3_search_srp_all%3B61HJ4z6%2FR1ueEcvdwgwvQw%3D%3D">George Ezenna — Co-founder</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=791ae5493df8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cloudtrucks-engineering/welcome-to-engineering-at-cloudtrucks-791ae5493df8">Welcome to Engineering at CloudTrucks!</a> was originally published in <a href="https://medium.com/cloudtrucks-engineering">CloudTrucks Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>