Skip to main content

Multi-Compartment Truck Planning

Multi-compartment vehicles are specialized trucks designed with separate, isolated sections that allow for the simultaneous transport of distinct product types. Unlike standard single-body trucks, these vehicles can carry goods that usually require segregation due to temperature requirements, chemical compatibility, or contamination risks.

Multi-Compartment Truck Diagram

Industries & Use Cases

  1. Fuel & Oil Distribution:
    • Scenario: A tanker truck delivering different grades of fuel (e.g., Diesel, Unleaded 95, Premium 98) to gas stations.
    • Constraint: A compartment filled with Diesel cannot simply be topped up with Petrol. Mixing causes contamination.
  2. Food & Grocery (The "Multi-Temp" Problem):
    • Scenario: Delivering Frozen (-18°C), Chilled (4°C), and Ambient (20°C) goods in a single run to supermarkets or convenience stores.
    • Constraint: Frozen goods must remain in the insulated frozen compartment. You cannot use empty ambient space for excess frozen goods without flexible bulkheads.
  3. Agriculture & Animal Feed:
    • Scenario: Delivering different types of feed (medicated vs. non-medicated) to different silos on farms.
    • Constraint: Cross-contamination can lead to health and legal issues.

Why Manual Planning is Difficult

Planning for mono-product fleets is a "Bin Packing" problem. Planning for multi-compartment fleets is essentially multiple simultaneous Bin Packing problems constrained by a single route.

  • Coupled Capacities: You might have total weight capacity available, but if your "Frozen" compartment is full, you cannot take another frozen order, even if the "Chilled" compartment is empty.
  • Inventory Balancing: A planner must match the aggregate volume of specific product types to the specific sizes of the compartments.
  • Sequence Constraints: In fuel delivery, discharging a front compartment might affect axle weight distribution or stability, sometimes dictating a specific unloading sequence.

Modeling with the API

Our optimization engine can model these complex constraints using a combination of Labels, Mutually Exclusive Groups, and Dimension-based Capacity (Fake Demand).

1. Dimension-Based Compartments ("Fake Demand")

The most robust way to model fixed compartments is to treat each compartment type as a separate capacity dimension. We often call this "Fake Demand" because we create a logical capacity dimension that doesn't correspond to a physical weight or volume, but rather to a "slot" or "reserved space" type.

Concept: Instead of just weight and volume, we define flexible dimensions like capacity_frozen, capacity_chilled, and capacity_ambient.

Example Model:

  • Vehicle Configuration:
    • The truck has a fixed physical limit (e.g., 20,000 kg total weight).
    • It has fixed volume limits for each section: 10m³ Frozen, 10m³ Chilled.
  • Item Configuration:
    • A frozen pizza order has weight: 5kg, volume: 0.1m³, AND demand_frozen: 0.1m³, demand_chilled: 0.
    • A milk order has weight: 10kg, volume: 0.2m³, AND demand_frozen: 0, demand_chilled: 0.2m³.

For detailed implementation guidance, refer to the Capacity & Demand Documentation.

In this setup, the solver automatically ensures that you never exceed the capacity of the specific frozen compartment, even if the total truck weight allows it.

2. Mutually Exclusive Groups (Product Incompatibility)

Sometimes, you must avoid mixing sensitive product categories on the same truck due to regulation significantly stricter than simple compartment separation.

Use Case: Toxic vs. Food If you cannot transport "Chemical A" and "Food B" on the same truck (even in different compartments) due to safety regulations, you use Mutually Exclusive Labels.

  1. Tag your services:
    • Order A: labels: ["toxic"]
    • Order B: labels: ["food"]
  2. Define Incompatibility:
    • In the solver configuration, define a constraint that toxic and food labels are mutually exclusive for a single route.

For detailed implementation guidance, refer to the Mutually Exclusive Groups Documentation.

3. Vehicle Labels (Truck-Specific Constraints)

In some logistics operations, not every multi-compartment truck is identical. Some might have "food-grade" certified compartments, while others are "industrial-grade" only.

Use Case: Matching Orders to Truck Types You might have a fleet where only specific trucks can carry "Frozen" goods (due to insulation), while others can only carry "Ambient".

  1. Tag your vehicles:
    • Truck 1: labels: ["freezer_equipped"]
    • Truck 2: labels: ["ambient_only"]
  2. Tag your services:
    • Frozen Pizza Order: required_labels: ["freezer_equipped"]

This uses standard Vehicle Labels to ensure compatibility between the order requirements and the vehicle capabilities.

For detailed implementation guidance, refer to the Vehicle Labels Documentation.

By leveraging these distinct API features—custom dimensions for fixed limits, mutually exclusive groups for safety, and labels for equipment matching—you can automate the planning of even the most restrictive multi-compartment fleets.