Skip to content
HALOWERK

Ortwerk

depot charge plan

Builds a flow network source → vehicle (energy needed at the grid = battery energy / charging efficiency) → time slot (charger power × overlap with the presence window) → sink (site limit minus base load per slot). Slots are opened in order of increasing price (ties: earlier first) and the maximum flow is augmented with Dinic’s algorithm after each opening; by the greedy theorem for polymatroids this yields the minimum-cost schedule that charges the maximum possible energy. Energies are.

POST https://ort.halowerk.com/v1/depot-charge-plan

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
startstringYesStart of the planning horizon.
horizon_hoursintegerNoPlanning horizon in hours.
slot_minutesintegerNoSlot length.
site_limit_kwnumberYesMaximum power of the depot connection for charging plus base load.
base_load_kwnumberNoConstant other load on the connection.
tariffarrayYesEnergy price steps; each applies from its time until the next step.
charging_efficiency_pctnumberNoGrid-to-battery efficiency; grid energy = battery energy / efficiency.
vehiclesarrayYes
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "start",
    "site_limit_kw",
    "tariff",
    "vehicles"
  ],
  "properties": {
    "start": {
      "type": "string",
      "maxLength": 40,
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,3})?)?(?:Z|[+-]\\d{2}:\\d{2})$",
      "description": "Start of the planning horizon."
    },
    "horizon_hours": {
      "type": "integer",
      "minimum": 1,
      "maximum": 48,
      "default": 24,
      "description": "Planning horizon in hours."
    },
    "slot_minutes": {
      "type": "integer",
      "enum": [
        5,
        10,
        15,
        30,
        60
      ],
      "default": 15,
      "description": "Slot length."
    },
    "site_limit_kw": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 100000,
      "description": "Maximum power of the depot connection for charging plus base load."
    },
    "base_load_kw": {
      "type": "number",
      "minimum": 0,
      "maximum": 100000,
      "default": 0,
      "description": "Constant other load on the connection."
    },
    "tariff": {
      "type": "array",
      "minItems": 1,
      "maxItems": 400,
      "description": "Energy price steps; each applies from its time until the next step.",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "from",
          "price_eur_per_kwh"
        ],
        "properties": {
          "from": {
            "type": "string",
            "maxLength": 40,
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,3})?)?(?:Z|[+-]\\d{2}:\\d{2})$",
            "description": "Time from which the price applies."
          },
          "price_eur_per_kwh": {
            "type": "number",
            "minimum": -10,
            "maximum": 10,
            "description": "Price per kWh at the grid connection."
          }
        }
      }
    },
    "charging_efficiency_pct": {
      "type": "number",
      "minimum": 50,
      "maximum": 100,
      "default": 100,
      "description": "Grid-to-battery efficiency; grid energy = battery energy / efficiency."
    },
    "vehicles": {
      "type": "array",
      "minItems": 1,
      "maxItems": 100,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "arrival",
          "departure",
          "max_charge_kw"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Vehicle reference."
          },
          "arrival": {
            "type": "string",
            "maxLength": 40,
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,3})?)?(?:Z|[+-]\\d{2}:\\d{2})$",
            "description": "Plug-in time."
          },
          "departure": {
            "type": "string",
            "maxLength": 40,
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d{1,3})?)?(?:Z|[+-]\\d{2}:\\d{2})$",
            "description": "Required departure time."
          },
          "max_charge_kw": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 1500,
            "description": "Maximum charging power of vehicle/charger (grid side)."
          },
          "energy_needed_kwh": {
            "type": "number",
            "minimum": 0,
            "maximum": 5000,
            "description": "Energy to put into the battery."
          },
          "battery_kwh": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 5000,
            "description": "Usable battery capacity (with soc_* instead of energy_needed_kwh)."
          },
          "soc_arrival_pct": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "State of charge on arrival."
          },
          "soc_target_pct": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "Required state of charge at departure."
          }
        }
      }
    }
  }
}

Open original schema

Published input example

{
  "start": "2026-10-05T18:00:00Z",
  "horizon_hours": 12,
  "site_limit_kw": 50,
  "tariff": [
    {
      "from": "2026-10-05T18:00:00Z",
      "price_eur_per_kwh": 0.4
    },
    {
      "from": "2026-10-05T22:00:00Z",
      "price_eur_per_kwh": 0.2
    }
  ],
  "vehicles": [
    {
      "id": "E1",
      "arrival": "2026-10-05T18:00:00Z",
      "departure": "2026-10-06T06:00:00Z",
      "max_charge_kw": 11,
      "energy_needed_kwh": 30
    }
  ]
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub →