Tropical algebra, including max-plus, min-plus, and related idempotent semirings, provides a unifying framework in which many optimization problems that are nonlinear in classical algebra become linear. This property makes tropical methods particularly well suited for shortest paths, scheduling, throughput analysis, and discrete event systems. Despite their theoretical maturity and practical relevance, existing tropical algebra implementations primarily target desktop or server environments and remain largely inaccessible on resource-constrained embedded platforms, where such optimization problems are most acute. We present PALMA (Parallel Algebra Library for Max-plus Applications), a lightweight, dependency-free C library that brings tropical linear algebra to ARM-based embedded systems. PALMA implements a generic semiring abstraction with SIMD-accelerated kernels, enabling a single computational framework to support shortest paths, bottleneck paths, reachability, scheduling, and throughput analysis. The library supports five tropical semirings, dense and sparse (CSR) representations, tropical closure, and spectral analysis via maximum cycle mean computation. We evaluate PALMA on a Raspberry Pi 4 and demonstrate peak performance of 2,274 MOPS, speedups of up to 11.9 times over classical Bellman-Ford for single-source shortest paths, and sub-10 microsecond scheduling solves for real-time control workloads. Case studies in UAV control, IoT routing, and manufacturing systems show that tropical algebra enables efficient, predictable, and unified optimization directly on embedded hardware. PALMA is released as open-source software under the MIT license.
翻译:热带代数(包括最大-加、最小-加及相关幂等半环)提供了一个统一框架,使得经典代数中许多非线性优化问题在该框架下转化为线性问题。这一特性使热带方法特别适用于最短路径、调度、吞吐量分析和离散事件系统。尽管热带代数理论成熟且具有实际应用价值,现有实现主要面向桌面或服务器环境,在资源受限的嵌入式平台上仍难以应用,而此类平台的优化需求往往最为迫切。本文提出PALMA(面向最大-加应用的并行代数库),这是一个轻量级、无依赖的C语言库,将热带线性代数引入基于ARM的嵌入式系统。PALMA通过SIMD加速内核实现了通用半环抽象,使单一计算框架能够支持最短路径、瓶颈路径、可达性分析、调度和吞吐量计算。该库支持五种热带半环、稠密与稀疏(CSR)矩阵表示、热带闭包运算,以及通过最大周期均值计算进行谱分析。我们在树莓派4上评估PALMA,其峰值性能达到2,274 MOPS,单源最短路径计算相比经典Bellman-Ford算法加速比最高达11.9倍,实时控制任务的调度求解可在10微秒内完成。通过无人机控制、物联网路由和制造系统的案例研究表明,热带代数能够在嵌入式硬件上实现高效、可预测且统一的优化。PALMA已基于MIT许可证开源发布。