Multi-Objective Swarm-Based Optimization for Climate-Adaptive Crop Rotation Planning
Abstract
Crop rotation is a cornerstone of sustainable agriculture, yet planning optimal multi-year rotation sequences under escalating climate uncertainty remains a formidable challenge, particularly in climate-vulnerable regions of Africa. Existing approaches, including rule-based heuristics, Linear Programming (LP) formulations, and single-objective evolutionary algorithms, fail to simultaneously address the competing demands of economic viability, environmental stewardship, and climate resilience across extended planning horizons. This paper presents Multi-Objective Swarm-based optimization for Climate-adaptive Crop Rotation Planning (MOSWARM-CRP), a novel Multi-Objective Particle Swarm Optimization (MOPSO) variant that integrates ensemble climate projections from CMIP6, an embedded soil nutrient dynamics simulator, and multi-criteria economic–environmental–resilience objective functions to generate Pareto-optimal crop rotation plans. Key algorithmic innovations include a climate-scenario-aware fitness evaluation mechanism operating across ten downscaled climate scenarios (SSP2-4.5 and SSP5-8.5), a discrete–continuous hybrid particle encoding for crop assignments and input parameters, Pareto-based archive management with adaptive grid and crowding distance, and a seasonally constrained adaptive inertia weight mechanism. MOSWARM-CRP is evaluated on two case studies representing distinct agro-climatic zones: the Ségou Region of Mali (semi-arid Sahel, rainfed systems) and the Meknès-Fès Region of Morocco (semi-arid Mediterranean, mixed rainfed–irrigated systems). Comparative experiments against NSGA-II, MOEA/D, standard MOPSO, SPEA2, single-objective Genetic Algorithms (GAs), and expert-designed Rule-Based Rotations (RBRs) demonstrate that MOSWARM-CRP achieves 15–23% higher Expected Annual Profit (EAP), 18–31% lower cumulative soil nitrogen depletion, and 12–20% superior Climate Resilience Scores (CRSs) relative to the best-performing baselines. Ablation studies confirm the independent contributions of the climate integration, soil dynamics, and adaptive inertia components. The proposed framework offers actionable decision support for smallholder and semi-commercial farmers seeking climate-adaptive rotation strategies in Sub-Saharan Africa and North Africa.
Keywords:Crop rotation planningMulti-objective optimizationParticle swarm optimizationClimate adaptationSustainable agricultureFood securityClimate changeCMIP6Soil nutrient dynamicsAfrica
1. Introduction
Crop rotation, the systematic alternation of crop species planted on the same parcel across successive growing seasons, is among the oldest and most universally recognized principles of sustainable agriculture [1], [2]. Well-designed rotations confer a suite of agronomic benefits including disruption of pest and disease cycles, enhancement of soil organic matter and nitrogen availability through legume fixation, improved weed suppression, and diversification of income streams [3], [4]. In regions where agriculture remains predominantly rainfed and low-input, such as Sub-Saharan Africa, rotation planning is not merely an optimization exercise but a critical determinant of household food security and livelihood resilience [5]. The imperative for computational approaches to rotation planning has intensified dramatically in the context of anthropogenic climate change. The Intergovernmental Panel on Climate Change (IPCC) sixth assessment report projects that tropical and subtropical regions, including the Sahel, West Africa, and the Mediterranean Basin, will experience disproportionate increases in temperature extremes, shifts in precipitation seasonality, and elevated frequency of drought events under all Shared Socioeconomic Pathway (SSP) scenarios [6]. For African agriculture, which sustains approximately 60% of the continent's labor force and contributes 15–25% of GDP in most Sub-Saharan economies [7], these projections translate into potentially severe yield reductions for staple cereals, altered crop suitability zones, and heightened production variability [8], [9]. Under these conditions, static rotation rules derived from historical experience may become suboptimal or even maladaptive, necessitating forward-looking, climate-informed planning tools.
The crop rotation planning problem is inherently multi-objective. Farmers and agricultural planners must simultaneously pursue economic objectives (maximizing profit or caloric yield), environmental objectives (preserving soil fertility, minimizing water consumption, reducing carbon emissions), and resilience objectives (maintaining acceptable performance across a range of plausible future climate realizations). These objectives are frequently conflicting: for example, maximizing short-term profit may favor high-input monoculture sequences that deplete soil nutrients and exhibit poor robustness under climate stress, while maximally conservative rotations that prioritize soil health may sacrifice economic competitiveness [10]. The problem is further complicated by temporal complexity (multi-year planning horizons with inter-seasonal dependencies), stochastic environmental forcing (climate uncertainty), nonlinear crop–soil interactions (nutrient dynamics, residual effects), and region-specific constraints including water availability, labor capacity, market access, and dietary diversity requirements [11], [12].
Existing computational approaches to crop rotation optimization span a spectrum from rule-based expert systems to mathematical programming and, more recently, metaheuristic algorithms. Rule-based approaches encode agronomic knowledge as decision trees or constraint sets but lack the capacity to explore trade-off surfaces in high-dimensional objective spaces [13]. Linear and Mixed-Integer Linear Programming (MILP) formulations provide mathematical rigor but struggle with the nonlinear, stochastic, and combinatorial nature of realistic rotation problems [14]. Single-objective evolutionary algorithms, particularly Genetic Algorithms (GAs), have been applied to crop planning with some success [15], but collapse the multi-objective trade-off structure into a single weighted aggregate, obscuring the decision space available to planners. Multi-Objective Evolutionary Algorithms (MOEAs), including the Non-dominated Sorting GA II (NSGA-II) [16], and the Multi-Objective Evolutionary Algorithm based on Decomposition (MOEA/D) [17], have been employed in agricultural contexts such as irrigation scheduling and land-use allocation [18], [19], but their application to crop rotation specifically, and in particular with integrated climate projections and soil dynamics, remains limited.
Multi-Objective Particle Swarm Optimization (MOPSO), originally proposed by Coello et al. [20] as an extension of the canonical PSO framework [21], offers several attractive properties for the rotation planning domain: rapid convergence via social learning dynamics, natural handling of continuous parameter spaces, computational efficiency relative to population-based genetic operators, and amenability to hybridization with domain-specific operators [22]. However, no existing MOPSO variant has been specifically designed for crop rotation planning, nor has any integrated climate scenario ensembles and soil nutrient dynamics within the swarm fitness evaluation.
This paper addresses the identified research gap by proposing Multi-Objective Swarm-based optimization for Climate-adaptive crop Rotation Planning (MOSWARM-CRP), a novel MOPSO variant purpose-built for generating Pareto-optimal multi-year crop rotation plans under climate change uncertainty. The contributions of this work are fivefold:
I. A formal multi-objective formulation of the climate-adaptive crop rotation planning problem with three conflicting objectives: economic return, environmental sustainability, and climate resilience, subject to agronomic, resource, and socioeconomic constraints.
II. A novel MOPSO algorithm (MOSWARM-CRP) incorporating discrete–continuous hybrid particle encoding, a seasonally constrained adaptive inertia weight mechanism, and Pareto archive management with adaptive grid and crowding distance specifically designed for multi-year crop rotation search spaces.
III. A climate-scenario-aware fitness evaluation framework that evaluates each candidate rotation plan across an ensemble of ten downscaled CMIP6 climate projections spanning SSP2-4.5 and SSP5-8.5 pathways, enabling explicit optimization for climate resilience.
IV. An embedded simplified soil nutrient dynamics model that tracks soil organic matter, available nitrogen, available phosphorus, and soil pH across rotation years, capturing crop-specific nutrient uptake, residue return, and legume fixation effects within the fitness function.
V. Comprehensive empirical evaluation on two African case studies, the Ségou Region of Mali (Sahel) and the Meknès-Fès Region of Morocco (Mediterranean), demonstrating statistically significant improvements over state-of-the-art baselines in Pareto front quality, economic performance, environmental impact, and climate resilience.
The remainder of this paper is organized as follows. Section 2 reviews related work on crop rotation optimization, multi-objective metaheuristics in agriculture, climate-adaptive planning, and soil health modeling. Section 3 presents the problem formulation and the MOSWARM-CRP methodology in detail. Section 4 describes the experimental setup, including study regions, data sources, baseline methods, and evaluation metrics. Section 5 reports and analyzes experimental results. Section 6 discusses the implications, limitations, and future directions of the work, and Section 7 concludes the paper.
2. Related Work
2.1 Crop Rotation Optimization
The optimization of crop rotations has a long history in agricultural operations research. Early work employed Linear Programming (LP) to allocate crops to fields and seasons based on profit maximization subject to resource constraints [23], [24]. Detlefsen and Jensen [13] extended LP-based approaches to incorporate crop sequence restrictions, demonstrating feasibility for Danish farming systems but acknowledging limitations in capturing nonlinear soil dynamics and stochastic weather effects. MILP formulations have been applied to crop rotation problems with combinatorial crop assignment decisions [14], [25], though computational tractability becomes problematic as the number of parcels, years, and candidate crops increases.
Rule-based approaches, drawing on agronomic expert knowledge, have been widely used in European farming systems. ROTOR [11] implemented a knowledge-based system for generating crop rotations satisfying ecological and agronomic constraints in organic farming. While effective for constraint satisfaction, such systems do not optimize across continuous objective spaces and struggle to incorporate climate uncertainty. The CropRota model [26] combined LP with agronomic rules for Austrian agriculture but was limited to a single economic objective.
Evolutionary computation has brought new capabilities to crop planning. Annetts and Audsley [15] applied GAs to whole-farm planning, including crop selection, in UK conditions. Dury et al. [10] used a multi-objective GA for crop allocation in French farming systems, demonstrating the feasibility of Pareto-based exploration but without climate integration. More recently, Akplogan et al. [27] employed constraint programming combined with metaheuristics for vegetable crop rotation under agronomic constraints. Kosmidou [28] explored GA-based crop pattern optimization for water-scarce regions. Reinforcement learning approaches have also emerged, with Gautron et al. [29] applying deep reinforcement learning to crop management decisions, though not specifically to multi-year rotation sequencing under climate uncertainty.
2.2 Multi-Objective Metaheuristics in Agriculture
MOEAs have been applied across a range of agricultural planning problems. NSGA-II [16] has been particularly prevalent, employed in irrigation scheduling [30], [31], land-use allocation [19], and water resource management [32]. MOEA/D [17] has seen application in resource allocation problems with many objectives, though its use in agriculture remains less common than NSGA-II. SPEA2 [33] has been employed in agricultural water management and crop planning contexts.
MOPSO, introduced by Coello Coello et al. [20] using an external archive and adaptive grid mechanism, has been applied to engineering design optimization and resource scheduling. In agricultural contexts, Nguyen et al. [34] applied MOPSO to precision irrigation scheduling, while Sarker and Ray [35] explored swarm-based methods for crop planning in Australian conditions. Memmah et al. [18] used multi-objective metaheuristics for landscape-level crop allocation in France, integrating biodiversity and economic objectives. However, none of these MOPSO applications have addressed multi-year crop rotation planning with integrated climate projections and soil dynamics.
The adaptation of swarm intelligence to discrete–combinatorial search spaces, as required for crop assignment decisions, has been explored through binary PSO [36], discrete PSO variants [37], and Hybrid approaches combining PSO velocity mechanics with permutation-based operators [38]. These techniques provide a foundation for the discrete–continuous hybrid encoding required in crop rotation optimization, where discrete crop assignments must be jointly optimized with continuous agronomic parameters.
2.3 Climate-Adaptive Agricultural Planning
The integration of climate projections into agricultural decision-making has accelerated with the availability of CMIP5 and CMIP6 ensemble outputs [39], [40]. Scenario-based optimization under climate uncertainty has been explored using robust optimization frameworks [41], stochastic programming [42], and scenario sampling approaches [43]. In agricultural planning, Thornton et al. [44] and Challinor et al. [45] have assessed climate impacts on crop production using ensemble crop model simulations driven by multiple GCM outputs, establishing the importance of multi-model, multi-scenario assessment.
Process-based crop models serve as essential tools for translating climate inputs into yield responses. Decision Support System for Agrotechnology Transfer (DSSAT) [46] provides detailed simulation of crop growth, soil water, and nutrient dynamics for over 40 crops. Agricultural Production Systems Simulator (APSIM) [47] offers modular simulation capabilities widely applied in tropical and dryland agriculture. AquaCrop [48], developed by FAO, emphasizes water-limited yield prediction with a relatively parsimonious parameter set, making it suitable for data-scarce environments. Sultan et al. [8] applied CMIP6 projections to assess climate change impacts on West African cereal yields, finding that CMIP6 models project less negative impacts than CMIP5, highlighting the importance of using current-generation climate models in agricultural planning. Despite these advances, the direct integration of climate scenario ensembles into multi-objective optimization algorithms for crop rotation planning has not been systematically explored. Most existing studies either use climate projections to assess pre-defined rotation scenarios ex post or optimize under a single deterministic climate assumption, neglecting the distributional uncertainty inherent in ensemble projections.
2.4 Soil Health Modeling in Optimization
Soil nutrient dynamics are central to evaluating rotation quality but are frequently oversimplified in optimization frameworks. The CENTURY model [49] simulates long-term soil organic matter dynamics and nutrient cycling across multiple soil pools. The RothC model [50] focuses on turnover of soil organic carbon. These process-based soil models capture the accumulation and depletion dynamics relevant to rotation evaluation but are computationally expensive when embedded within iterative optimization loops requiring thousands of fitness evaluations.
Simplified soil nutrient accounting models have been developed for integration with optimization frameworks. Dogliotti et al. [12] incorporated nitrogen balance calculations into a rotation design tool for Uruguayan farming systems. Reckling et al. [4] used simplified nitrogen and phosphorus budgets to evaluate the environmental performance of diversified rotations across European sites. These approaches sacrifice mechanistic detail for computational tractability, a trade-off that is particularly relevant in metaheuristic optimization where population-based search requires large numbers of candidate evaluations.
The explicit incorporation of dynamic soil state variables soil organic matter, available nitrogen, available phosphorus, and soil pH that evolve across rotation years as a function of crop-specific uptake, residue inputs, and management practices has not been embedded within a multi-objective swarm optimization framework for crop rotation planning. This integration is essential for evaluating the long-term sustainability of candidate rotations, as rotations that appear economically optimal in the short term may drive cumulative soil degradation over multi-year horizons.
3. Methodology
3.1 Problem Formulation
We formulate the climate-adaptive crop rotation planning problem as a constrained multi-objective optimization problem. Consider a farm comprising P parcels over a planning horizon of T years. Let S = {s1, s2, …, sM} denote the set of M candidate crops (including fallow as a pseudo-crop). The primary decision variable is the crop assignment matrix C = [C ] ∈ ST×P, where C ∈ S specifies the crop assigned to parcel p in
tp tp
year t. Additionally, continuous decision variables u = (u irr, u fert, u seed) represent irrigation volume,
tp tp tp tp
fertilizer application rate, and seeding density for each crop–parcel–year combination, bounded within agronomically feasible ranges.
The problem seeks to simultaneously optimize three objective functions:
Objective 1. Maximize expected economic return (f1):
f (C, u) = (1/K) ∑ K ∑ T ∑ P [Y(C , θ k, σ ) × π(C ) − Γ(C , u )] × (1+r)−t,
1 k=1 t=1 p=1 tp tp tp tp tp tp (1)
where Y(·) is the crop yield function dependent on crop type C , climate variables θ k under scenario k, and
tp tp
soil state σtp; π(·) is the market price per unit yield; Γ(·) is the total production cost including inputs, labor, and mechanization; r is the discount rate; and K is the number of climate scenarios. The yield function is detailed in Section 3.3.
Objective 2. Minimize environmental degradation (f2):
f2(C, u) = α1 ΔNcum + α2 Wcum + α3 ECO2, (2)
where ΔNcum = ∑t,p max(0, Nuptake(Ctp) − Ninput(Ctp, utp) − Nfix(Ctp)) is the cumulative soil nitrogen depletion; Wcum is the cumulative water consumption index normalized by regional water availability; ECO2 is the cumulative carbon emission index from tillage, fertilizer application, and fuel use; and α1, α2, α3 are normalization weights ensuring commensurate scaling of the environmental sub-indices.
Objective 3. Maximize climate resilience (f3):
f (C, u) = min { ∑ T ∑ P Y(C , θ k, σ ) / Y (C ) },
3 k=1,…,K t=1 p=1 tp tp tp ref tp (3)
where Yref(·) denotes the reference yield under historical average climate conditions. This minimax formulation ensures that the optimizer explicitly seeks rotation plans whose performance degrades least under the most adverse climate scenario, providing a measure of distributionally robust planning.
The optimization is subject to the following constraint classes:
I. Crop succession constraints: no crop from the same botanical family may be planted on the same parcel in consecutive years: fam(Ctp) ≠ fam(C(t+1)p) for all t, p.
II. Water budget constraints: total irrigation demand across all parcels must not exceed seasonal regional water availability: ∑ u irr ≤ W (t) for all t.
p tp avail
III. Labor constraints: total labor demand must not exceed household or seasonal labor supply: ∑p L(Ctp) ≤ Lmax(t) for all t.
IV. Minimum dietary diversity: at least Dmin distinct food groups must be represented in each year's crop portfolio: |{food_group(Ctp) : p = 1,…,P}| ≥ Dmin for all t.
V. Market absorption limits: total production of any single crop across all parcels must not exceed the local market absorption threshold: ∑p Y(Ctp,·) ≤ Qmax(Ctp) for all t.
VI. Fallow minimum: at least one parcel per rotation cycle must undergo fallow for soil recovery.
3.2 MOSWARM-CRP Algorithm
MOSWARM-CRP extends the canonical MOPSO framework with domain-specific innovations tailored to the crop rotation search space. A swarm of N particles collectively searches the space of feasible rotation plans. Each particle i encodes a candidate solution (Ci, ui) and maintains a velocity vector governing its trajectory through the search space.
Particle encoding: the hybrid discrete–continuous encoding represents each particle as a concatenation of two segments: 1) a discrete segment encoding the crop assignment matrix C ∈ ST×P, where each gene takes an integer value from {1, 2, …, M} corresponding to a candidate crop, and 2) a continuous segment encoding the agronomic input parameters u ∈ ℝT×P×3 (irrigation, fertilizer, seeding density), bounded within crop-specific feasible ranges. The total dimensionality of each particle is T × P × (1 + 3) = 4TP.
Velocity update: For the continuous segment, the standard PSO velocity update is applied with modifications:
v cont(t+1) = w(t) · v cont(t) + c r [pbest cont − x cont(t)] + c r [gbest cont − x cont(t)],
id id 1 1 id id 2 2 id id (4)
where w(t) is the adaptive inertia weight (Section 3.5), c1 and c2 are cognitive and social acceleration coefficients, r1 and r2 are uniform random numbers in [0,1], pbestid is the personal best position of particle i in dimension d, and gbestid is a global guide selected from the Pareto archive using crowding distance-based tournament selection.
For the discrete segment (crop assignments), a probabilistic swap operator is employed. At each dimension d corresponding to a crop assignment Ctp, the crop value is retained, swapped to the personal best value, or swapped to the archive guide value according to probabilities derived from the velocity magnitude:
P (d) = sigmoid(v disc) = 1 / (1 + exp(−v disc)),
swap id id (5)
where the discrete velocity v disc is updated analogously to the continuous case but operates in the
id
probabilistic swap space, following the binary PSO formulation of Kennedy and Eberhart [36] extended to the multi-valued discrete case.
Pareto archive management: an external archive A of maximum size NA stores non-dominated solutions discovered during the search. When the archive exceeds capacity, solutions in the most crowded regions of the objective space are pruned using an adaptive grid mechanism [20]. The objective space is partitioned into hypercubes, and solutions residing in hypercubes with the highest occupancy are preferentially removed. Crowding distance [16] is computed within each hypercube to preserve boundary and extreme solutions. Archive guide selection: when selecting a global guide gbest from the archive for each particle, a two-stage tournament is employed: 1) a hypercube is selected with probability inversely proportional to its occupancy (favoring guides from sparse regions), and 2) within the selected hypercube, the solution with the largest crowding distance is chosen. This mechanism promotes exploration of under-represented Pareto front regions.
The main algorithmic loop of MOSWARM-CRP is presented as Algorithm 1:
Algorithm 1. MOSWARM-CRP main loop.
Input: Swarm size N, archive size N , max iterations T , climate scenarios {θ1,…,θK}, crop set S, soil parameters,
A max
constraints Output: Pareto-optimal archive A of rotation plans 1: Initialize swarm: for i = 1 to N do 2: Generate random feasible rotation plan (Ci, ui) 3: Apply constraint repair operator (Section 3.6) 4: Initialize velocity vi ← 0 5: Set pbesti ← (Ci, ui) 6: end for 7: Evaluate all particles: for each i, compute (f , f , f ) across all K climate scenarios
1 2 3
8: Initialize archive A with non-dominated solutions 9: Construct adaptive grid over A 10: for t = 1 to Tmax do 11: Compute adaptive inertia weight w(t) (Algorithm 2) 12: for i = 1 to N do 13: Select guide gbesti from A via crowding tournament 14: Update continuous velocity (Eq. 4) 15: Update discrete velocity and apply swap (Eq. 5) 16: Update position (Ci, ui) 17: Apply constraint repair operator (Section 3.6) 18: Evaluate (f , f , f ) across K scenarios 19:
1 2 3
Update pbesti using Pareto dominance 20: end for 21: Update archive A with new non-dominated solutions 22: If |A| > NA: prune via adaptive grid crowding 23: Update adaptive grid boundaries 24: Record convergence metrics (HV, archive diversity) 25: end for 26: return A.
3.3 Climate Scenario Integration
A distinctive feature of MOSWARM-CRP is the explicit evaluation of each candidate rotation plan across an ensemble of K = 10 climate scenarios derived from CMIP6 [39]. Five Global Climate Models (GCMs), CanESM5, MIROC6, MPI-ESM1-2-HR, GFDL-ESM4, and UKESM1-0-LL, are employed under two SSP pathways (SSP2-4.5 representing moderate mitigation and SSP5-8.5 representing high-emission futures), yielding 5 × 2 = 10 distinct climate trajectories for the planning period 2025–2050. Raw GCM outputs are statistically downscaled to the study regions using quantile mapping [51] calibrated against ERA5 reanalysis data [52] and local meteorological station records.
For each climate scenario k and each year–parcel combination (t, p), the relevant climate variables are extracted: daily maximum and minimum temperature (Tmax, Tmin), daily Precipitation (P), and daily solar Radiation (Rs). These are aggregated into growing-season summary variables used by the yield function. Crop yield response model: we employ a simplified, AquaCrop-inspired yield response function [48], [53] that relates crop yield to water stress and temperature stress through Growing Degree Days (GDD) accumulation:
Y(s, θk, σ) = Y (s) × K (s, θk) × K (s, θk) × K (s, σ) × K (s, θk),
pot w T soil GDD (6)
where Ypot(s) is the potential yield of crop s under non-stressed conditions (derived from FAO and regional statistics); Kw ∈ [0,1] is the water stress coefficient computed from the ratio of actual to potential evapotranspiration; KT ∈ [0,1] is the temperature stress coefficient capturing heat and cold stress effects; Ksoil ∈ [0,1] is the soil fertility coefficient dependent on available nitrogen and phosphorus relative to crop requirements; and KGDD ∈ [0,1] penalizes incomplete thermal accumulation when GDD falls below the crop's maturity requirement.
The water stress coefficient is calculated as
Kw = 1 − ky(s) × (1 − ETa / ETc),
where ky(s) is the FAO yield response factor for crop [54], ETa is actual evapotranspiration estimated from precipitation and irrigation inputs, and ETc is crop potential evapotranspiration computed using the Penman-Monteith equation with crop coefficients [55]. The temperature stress coefficient is modeled as a trapezoidal function of mean growing-season temperature relative to crop-specific cardinal temperatures (Tbase, Topt,low, Topt,high, Tmax).
3.4 Soil Nutrient Dynamics Model
An embedded soil nutrient dynamics model tracks the evolution of four soil state variables across rotation years for each parcel: soil organic matter (SOM, in g/kg), available nitrogen (Navail, in kg/ha), available phosphorus (Pavail, in kg/ha), and soil pH. The model is initialized with parcel-specific baseline soil conditions and updated annually based on crop-specific nutrient dynamics.
Nitrogen balance: The annual nitrogen balance for parcel p in year t is:
Navail(t+1, p) = Navail(t, p) + Nfert(t, p) + Nfix(Ctp) + Nmin(SOMtp) + Nres(Ctp) − Nuptake(Ctp, Ytp) − Nleach(t, p) − Nvol(t, p),
where Nfert is applied fertilizer nitrogen; Nfix is biological nitrogen fixation (positive only for leguminous crops: groundnut, cowpea, chickpea, lentil, faba bean); Nmin is mineralization from soil organic matter (modeled as a fraction of SOM with temperature-dependent rate); Nres is nitrogen returned through crop residue incorporation; Nuptake is crop nitrogen uptake proportional to yield; Nleach is leaching losses estimated from precipitation surplus; and Nvol is volatilization losses.
Soil organic matter dynamics: SOM evolves through residue inputs and decomposition:
SOM(t+1, p) = SOM(t, p) × (1 − kdec) + h × Rcrop(Ctp, Ytp),
where k is the annual decomposition rate (climate- and texture-dependent, typically 0.02–0.05 yr−1), h is the
dec
humification coefficient (fraction of residue carbon converted to stable SOM), and Rcrop is the crop residue biomass returned to the soil. Leguminous crops and high-biomass cereals (sorghum, millet) contribute more residue than low-biomass crops, creating positive SOM trajectories under diversified rotations. Fallow periods allow enhanced mineralization and SOM equilibration.
Phosphorus and pH dynamics: available phosphorus is modeled with a simplified balance analogous to nitrogen, accounting for fertilizer inputs, crop uptake (proportional to yield and crop-specific P demand), and slow release from soil mineral P reserves. Soil pH evolves incrementally based on crop-specific rhizosphere effects, fertilizer type (ammonium-based fertilizers cause acidification), and lime application when included in the management variable set.
The soil model is computationally lightweight (requiring only arithmetic operations per parcel per year) yet captures the essential inter-annual feedback dynamics that determine whether a rotation sequence is building or depleting soil capital over the planning horizon.
3.5 Adaptive Inertia Weight Mechanism
The inertia weight w(t) in the velocity update (see Eq. (4)) governs the balance between exploration (high w) and exploitation (low w). Standard MOPSO implementations use either a linearly decreasing schedule [56] or a fixed value. MOSWARM-CRP introduces an adaptive inertia weight that responds to three feedback signals specific to the agricultural optimization domain:
w(t) = wbase(t) + β1 ΔHV(t) + β2 Darchive(t) + β3 φseason(t), (10)
where wbase(t) = wmax − (wmax − wmin) × (t / Tmax) is the linearly decreasing baseline (with wmax = 0.9, wmin = 0.4); ΔHV(t) is the normalized change in hypervolume indicator over the last τ = 20 iterations (positive when the Pareto front is improving, triggering exploitation; negative when stagnating, triggering exploration); Darchive(t) is an archive diversity metric based on the coefficient of variation of crowding distances in the archive (high diversity encourages exploitation, low diversity encourages exploration); φseason(t) is a seasonal agricultural calendar term that modulates exploration intensity to focus search on rotation configurations that respect planting and harvesting windows for the study region's agricultural calendar; and β1, β2, β3 are scaling parameters calibrated via preliminary experiments (set to 0.05, 0.03, and 0.02, respectively).
Algorithm 2. Adaptive inertia weight computation.
Input: Iteration t, archive A, HV history, calendar constraints Output: Inertia weight w(t) 1: Compute baseline: wbase ← wmax − (wmax − wmin) × (t/Tmax) 2: Compute HV improvement rate: 3: ΔHV ← (HV(t) − HV(t−τ)) / max(HV(t−τ), ε) 4: If ΔHV > 0: adj1 ← −β1 × ΔHV // exploiting 5: Else: adj1 ← β1 × |ΔHV| // exploring 6: Compute archive diversity: 7: CD ← crowding distances of all solutions in A 8: Darchive ← std(CD) / mean(CD) 9: If Darchive > δthresh: adj2 ← −β2 // diverse, exploit 10: Else: adj2 ← β2 // clustered, explore 11: Compute seasonal adjustment: 12: φseason ← penalty for off-calendar crop assignments 13: adj3 ← β3 × φseason 14: Combine: w(t) ← clip(wbase + adj1 + adj2 + adj3, wmin, wmax) 15: return w(t).
3.6 Constraint Handling
Constraint handling in MOSWARM-CRP employs a hybrid approach combining a repair operator with an adaptive penalty function, reflecting the heterogeneous nature of the constraints.
Repair operator: after each position update, the repair operator enforces hard constraints that define agronomic feasibility:
I. Crop succession repair: for each parcel, if consecutive years violate the same-family constraint, the later year's crop is replaced by the nearest feasible crop in the candidate set (selected by cycling through S in a deterministic order that preserves solution diversity).
II. Bound repair: continuous variables (irrigation, fertilizer, seeding density) exceeding their crop-specific bounds are clipped to the nearest feasible value.
III. Fallow enforcement: if no parcel in the rotation includes a fallow period within any consecutive Tfallow-year window, the lowest-profit parcel–year combination is replaced with fallow.
IV. Penalty function: soft constraints (water budget, labor, dietary diversity, market absorption) are handled through an adaptive penalty added to objective f2 (environmental degradation):
f penalized = f + λ(t) × ∑ max(0, g (C, u))2,
2 2 j j (11)
where gj(·) represents the j-th constraint violation magnitude and λ(t) is an iteration-dependent penalty coefficient that increases over the search to ensure convergence toward feasibility: λ(t) = λ × (1 + t / T )2.
0 max
4. Experimental Setup
4.1 Study Regions
Two case study regions were selected to represent contrasting agro-climatic zones in Africa, both characterized by high climate vulnerability and critical agricultural importance:
Ségou Region, Mali (Sahel, Semi-Arid Tropical): located in central Mali (13.4°N, 6.3°W), the Ségou Region lies within the Sudano-Sahelian zone, characterized by a unimodal rainy season (June–October) with mean annual precipitation of approximately 600 mm (range: 400–800 mm over 1980–2020). Agriculture is predominantly rainfed, with millet (pennisetum glaucum) and sorghum (sorghum bicolor) as staple cereals, complemented by groundnut (arachis hypogaea), cowpea (vigna unguiculata), and cotton (gossypium hirsutum) as cash or rotation crops. Soils are predominantly sandy (arenosols and lixisols) with low inherent fertility (SOM < 1%, total N < 0.05%). Smallholder farms of 3–10 ha dominate, with limited access to mineral fertilizers, mechanization, and irrigation. The region is a critical food security zone for Mali, supplying a significant share of national cereal production, and is highly exposed to rainfall variability and progressive warming trends.
Meknès-Fès Region, Morocco (Semi-Arid Mediterranean): Situated in north-central Morocco (33.9°N, 5.5°W), the Meknès-Fès Region experiences a Mediterranean climate with cool, wet winters and hot, dry summers, receiving approximately 450 mm mean annual precipitation concentrated between October and April. Agriculture is more diversified and intensified than in the Sahel, featuring durum wheat (Triticum durum), soft wheat (Triticum aestivum), and barley (Hordeum vulgare) as principal cereals, with food legumes (chickpea, lentil, faba bean), sunflower, and sugar beet as rotation crops. Supplemental irrigation is available for approximately 30% of cropland from reservoir systems. Soils are predominantly calcareous Vertisols and Cambisols with moderate fertility. Farm sizes range from 5–50 ha, and semi-commercial farming is common. The region faces progressive aridification, declining groundwater tables, and increasing inter-annual precipitation variability under climate change projections.
4.2 Crop Candidates and Parameters
The candidate crop sets for each region, along with their key agronomic parameters, are presented in Tables 1 and 2. Parameters were sourced from FAO crop databases [7], regional agricultural statistics from the Institut d'Économie Rurale (IER) of Mali and the Institut National de la Recherche Agronomique (INRA) of Morocco, and published agronomic literature.
Table 1. Agronomic and economic characteristics of the main crops and fallow.
This table is shown in the PDF version of the article.
Table 2. Agronomic and economic characteristics of the main crops and fallow in Morocco.
This table is shown in the PDF version of the article.
4.3 Climate Data
Historical data: daily meteorological records for the period 1980–2020 were obtained from national meteorological services (Direction Nationale de la Météorologie, Mali; Direction Générale de la Météorologie, Morocco) for stations nearest the study sites, supplemented by ERA5 reanalysis data [52] for gap-filling and spatial coverage extension. Variables include daily maximum/minimum temperature, precipitation, solar radiation, wind speed, and relative humidity.
Future projections: CMIP6 model outputs for the period 2025–2050 were downloaded from the Earth System Grid Federation (ESGF) data nodes. Five GCMs were selected based on demonstrated skill in reproducing African climate variability [57], [58]:
Table 3. Characteristics of the selected CMIP6 climate models.
This table is shown in the PDF version of the article.
Statistical downscaling was performed using quantile delta mapping [59] to adjust daily GCM outputs to the local observational climate, preserving projected change signals while correcting distributional biases. Each GCM was run under SSP2-4.5 and SSP5-8.5, yielding K = 10 climate scenarios that span a plausible range of future climatic conditions for each study region.
4.4 Compared Methods
MOSWARM-CRP was benchmarked against six alternative methods representing diverse optimization paradigms:
I. NSGA-II [16]: the canonical multi-objective GA with non-dominated sorting and crowding distance.
Population size 200, SBX crossover (pc = 0.9, ηc = 20), polynomial mutation (pm = 1/n, ηm = 20).
II. MOEA/D [17]: multi-objective decomposition with Tchebycheff aggregation, 200 weight vectors, neighborhood size 20, differential evolution operator.
III. Standard MOPSO [20]: baseline MOPSO with adaptive grid archive, without the climate integration, soil model, or adaptive inertia innovations of MOSWARM-CRP.
IV. SPEA2 [33]: strength Pareto Evolutionary Algorithm 2 with fine-grained fitness assignment and density estimation. Population and archive size are 200.
V. Single-Objective GA (SO-GA): a standard GA maximizing only economic return (f1), population size 200, tournament selection, SBX crossover, polynomial mutation.
VI. Rule-Based Rotation (RBR): expert-designed rotation sequences reflecting traditional agronomic best practices for each region. For Mali: millet–millet–fallow–groundnut–sorghum (5-year cycle). For Morocco: soft wheat–fallow–barley–soft wheat (4-year cycle). These represent conventional extension service recommendations.
VII. Random Search (RS): uniform random sampling of feasible rotation plans with constraint repair, serving as a stochastic baseline. 200 × 1000 = 200,000 evaluations (equivalent computational budget).
VIII. All multi-objective methods were configured with equivalent computational budgets: 200 population/swarm size × 1000 iterations = 200,000 fitness evaluations. All methods used the same climate scenario ensemble, crop parameters, and constraint definitions to ensure fair comparison.
4.5 Evaluation Metrics
Performance was assessed using both standard multi-objective optimization quality indicators and domain-specific agricultural metrics:
Multi-objective quality indicators:
I. Hypervolume (HV): the volume of the objective space dominated by the Pareto front approximation, measured relative to a common reference point. Higher HV indicates better convergence and diversity [60]. The reference point was set to the anti-ideal point across all methods plus 10%.
II. Inverted Generational Distance (IGD): the average minimum distance from each point in a reference Pareto front (constructed as the union of all non-dominated solutions across all methods and runs) to the obtained Pareto front. Lower IGD indicates better convergence and coverage [22].
III. Spread (Δ): a diversity metric measuring the extent and uniformity of the Pareto front distribution [16]. Lower Δ indicates more uniform spread.
Domain-specific agricultural metrics:
I. EAP: mean annual net profit (revenue minus costs) averaged across climate scenarios and rotation years, extracted from the profit-maximizing Pareto front solution.
II. Net Present Value (NPV): discounted cumulative profit over the 10-year planning horizon at a 5% discount rate.
III. Cumulative soil nitrogen depletion (ΔNcum): total nitrogen deficit accumulated over the planning horizon, measured in kg/ha.
IV. Water Use Efficiency (WUE): total crop yield produced per unit of water consumed (kg/m3).
V. Climate Resilience Score (CRS): the worst-case total yield ratio across the K = 10 climate scenarios relative to the historical baseline yield, representing the minimum acceptable performance guarantee.
4.6 Algorithm Parameters
MOSWARM-CRP parameter settings, determined through preliminary sensitivity experiments on a reduced problem instance, are summarized in Table 4.
Table 4. Characteristics of the selected CMIP6 climate models.
This table is shown in the PDF version of the article.
HV window for adaptive w τ 20 iterations Penalty coefficient base λ0 10 Independent runs 30
All experiments were conducted on a workstation equipped with an Intel Xeon E5-2680 v4 processor (14 cores, 2.4 GHz) and 64 GB RAM, running Ubuntu 22.04 LTS. The algorithm was implemented in Python 3.10 with NumPy and SciPy for numerical operations. Each independent run (30 per method per case study) was initialized with a distinct random seed.
5. Results
5.1 Pareto Front Quality
Table 4 presents the Hypervolume (HV) and IGD indicators across all compared methods for both case studies, reported as mean ± standard deviation over 30 independent runs. Statistically significant differences (Wilcoxon rank-sum test, p < 0.01) between MOSWARM-CRP and each baseline are indicated with superscript markers.
Table 5. HV and IGD performance of the compared methods across the two case studies.
This table is shown in the PDF version of the article.
MOSWARM-CRP achieved the highest HV and lowest IGD on both case studies, with statistically significant margins over all baselines. For the Mali case study, MOSWARM-CRP's HV of 0.724 ± 0.018 exceeded NSGA-II (0.651, +11.2%), standard MOPSO (0.667, +8.5%), MOEA/D (0.638, +13.5%), and SPEA2 (0.643, +12.6%). The Morocco case study exhibited a similar pattern, with MOSWARM-CRP achieving HV of 0.698 ± 0.015 compared to 0.623 for NSGA-II (+12.0%). The single-objective GA and RS performed substantially worse on HV and IGD, as expected, since they either collapse or do not explicitly navigate the multi-objective trade-off space. Among the multi-objective baselines, standard MOPSO performed closest to MOSWARM-CRP, suggesting that the PSO search dynamics are inherently well-suited to the rotation planning landscape, and that the domain-specific enhancements in MOSWARM-CRP provide meaningful additional gains.
5.2 Economic Performance
Table 5 presents the economic performance metrics extracted from the Pareto-optimal solutions. For multi-objective methods, the solution with the highest f1 value on the Pareto front is reported (the "economic-best" knee point). For SO-GA and RBR, the single solution is reported directly.
Table 6. Economic performance of the compared methods across the two case studies.
This table is shown in the PDF version of the article.
MOSWARM-CRP delivered the highest Expected Annual Profit (EAP) across both case studies. In Mali, MOSWARM-CRP achieved an EAP of 287.4 × 103 FCFA/ha, exceeding RBR by 23.1% and NSGA-II by 15.1%. In Morocco, MOSWARM-CRP achieved 18.92 × 103 MAD/ha, a gain of 17.9% over RBR and 11.0% over NSGA-II. Notably, MOSWARM-CRP's economic-best solution also outperformed the SO-GA (which maximizes profit exclusively) by 5.9% in Mali and 4.2% in Morocco. This counterintuitive result is attributable to MOSWARM-CRP's soil dynamics model: by maintaining soil fertility through balanced rotations, MOSWARM-CRP sustains higher yields in later planning years, whereas SO-GA solutions tend to deplete soil nitrogen through profit-maximizing but fertility-mining sequences, leading to yield decline over the 10- year horizon.
5.3 Environmental Impact
Table 6 reports environmental performance metrics for the "balanced" Pareto front solution (nearest to the ideal point using normalized Euclidean distance) of each multi-objective method, and the single solution for SO-GA and RBR.
Table 7. Environmental performance of the compared methods across the two case studies.
This table is shown in the PDF version of the article.
MOSWARM-CRP's balanced Pareto solutions achieved markedly lower cumulative nitrogen depletion and higher WUE than all alternatives. In Mali, ΔNcum was 82.3 kg/ha compared to 142.7 for SO-GA (42.3% reduction), 119.2 for RBR (31.0% reduction), and 97.8 for NSGA-II (15.9% reduction). The pattern in Morocco was analogous, with MOSWARM-CRP reducing ΔNcum by 14.9–39.6% relative to NSGA-II and SO-GA, respectively. These reductions are directly attributable to the embedded soil nutrient dynamics model, which penalizes rotation sequences that create nitrogen deficits and rewards legume inclusion and appropriate fallow scheduling.
WUE was consistently highest for MOSWARM-CRP (Mali: 1.42 kg/m3; Morocco: 2.18 kg/m3), reflecting the algorithm's ability to discover crop sequences and input combinations that extract maximum yield per unit of water consumed. The higher WUE in Morocco reflects the contribution of supplemental irrigation and inherently higher-yielding crop varieties.
5.4 Climate Resilience
Table 4 presents the CRS, defined as the worst-case total yield ratio across the ten climate scenarios relative to the historical baseline. A higher CRS indicates that the rotation plan maintains performance even under the most adverse climate projection.
Table 8. CRSs of the compared methods across the two case studies.
This table is shown in the PDF version of the article.
MOSWARM-CRP achieved the highest CRSs on both case studies. In Mali, MOSWARM-CRP's CRS of 0.812 indicates that even under the worst-case climate scenario (typically the driest SSP5-8.5 projection from CanESM5 or UKESM1-0-LL), the optimized rotation plans maintain 81.2% of historical baseline yield. By contrast, RBRs retain only 60.8% (a 33.6% relative improvement by MOSWARM-CRP), and SO-GA solutions retain only 58.3%. In Morocco, MOSWARM-CRP's CRS of 0.786 compares favorably with 69.5% for NSGA-II (13.1% relative improvement) and 59.2% for RBR (32.8% relative improvement). The explicit minimax resilience objective (f3) and the multi-scenario evaluation framework are the primary drivers of this advantage: by evaluating each candidate rotation across all ten climate futures, MOSWARM-CRP avoids selecting sequences that perform well under average conditions but fail catastrophically under extreme scenarios.
5.5 Optimal Rotation Patterns
Analysis of the Pareto-optimal rotation plans discovered by MOSWARM-CRP reveals characteristic patterns that differ substantially from traditional practices in both regions.
Mali discovered patterns: The most frequently occurring rotation motifs in the MOSWARM-CRP Pareto archive for the balanced-solution region include: 1) a 4-year cycle of millet → groundnut → sorghum → cowpea, which alternates cereals (Poaceae) with legumes (Fabaceae) in every other year, providing continuous nitrogen fixation inputs and family-based pest/disease break, and 2) a 5-year cycle of millet → groundnut → sorghum → sesame → cowpea, introducing sesame (Pedaliaceae) as a third family for enhanced diversity; and 3) strategic insertion of fallow after cotton in sequences where cotton is included for cash income. These optimized patterns contrast sharply with the traditional millet → millet → fallow cycle common in smallholder practice, which violates same-family succession principles (consecutive millet) and underutilizes the nitrogen fixation potential of legumes. The MOSWARM-CRP patterns achieve higher economic returns through legume diversification (groundnut and cowpea have high market values) while simultaneously building soil nitrogen through fixation, resulting in the synergistic profit–sustainability gains observed in Tables 2 and 3.
Morocco discovered patterns: in the Morocco case study, dominant Pareto-optimal motifs include: 1) durum wheat → chickpea → barley → faba bean (4-year cycle with cereal–legume alternation), 2) soft wheat → faba bean → sunflower → chickpea → barley (5-year cycle with three distinct families), and 3) inclusion of sugar beet every 4–5 years on irrigated parcels for high cash returns, followed by legumes to restore nitrogen. These patterns outperform the traditional wheat → fallow → wheat or wheat → barley → wheat sequences by replacing unproductive fallow years with nitrogen-fixing legumes and by introducing non-cereal crops (sunflower, sugar beet) to diversify both agronomically and economically. The cereals-only traditional rotations, while simple and low-risk, forfeit significant profit from high-value legume and industrial crops and fail to exploit biological nitrogen fixation, resulting in higher fertilizer dependency and greater vulnerability to nitrogen price volatility.
5.6 Ablation Study
To quantify the individual contributions of MOSWARM-CRP's key innovations, we conducted an ablation study removing each component in isolation. Table 8 reports HV and domain-specific metrics for the Mali case study (results for Morocco follow the same pattern).
Table 9. Ablation analysis of MOSWARM-CRP components for the Mali case study.
This table is shown in the PDF version of the article.
The ablation results reveal that each component contributes meaningfully but addresses different performance dimensions. Removing the climate scenario integration causes the largest drop in CRS (from 0.812 to 0.698, a 14.0% reduction), confirming that multi-scenario evaluation is critical for resilience optimization. Without the soil dynamics model, ΔNcum increases by 31.7% (from 82.3 to 108.4 kg/ha), and EAP decreases by 6.6%, demonstrating that accurate soil state tracking is essential for both environmental and long-term economic objectives. Rotations that appear profitable under static soil assumptions lead to yield decline as soil nitrogen is depleted. The adaptive inertia mechanism provides the most modest individual improvement (HV: 0.706 vs. 0.724 for the full model), but contributes to faster convergence and better spread, with particular benefit in the early optimization phases. The combined effect of all three components (full MOSWARM-CRP vs. standard MOPSO) yields a synergistic HV improvement of 8.5%, confirming that the innovations are complementary rather than redundant.
5.7 Computational Cost and Convergence
Table 9 reports the mean computational runtime per independent run and the iteration at which 95% of the final HV is achieved (convergence iteration) for each method.
Table 10. Method Runtime Per Run (Min) Convergence Iteration (95% HV)
This table is shown in the PDF version of the article.
Computational runtime and convergence performance of the compared methods.
MOSWARM-CRP's runtime of approximately 35 minutes is modestly higher than baselines (11.2% more than NSGA-II, 54.9% more than standard MOPSO), primarily due to the multi-scenario fitness evaluation (each particle is evaluated across K = 10 climate scenarios) and the soil dynamics simulation within the fitness function. However, this overhead is modest in absolute terms; 35 minutes is well within the practical tolerance for a strategic planning tool applied once per growing season or planning cycle. Importantly, MOSWARM-CRP converges to 95% of its final HV by iteration 612, substantially faster than NSGA-II (721), MOEA/D (685), and SPEA2 (738), indicating that the adaptive inertia mechanism and PSO social learning dynamics accelerate early convergence despite the higher per-iteration computational cost.
6. Discussion
The experimental results consistently demonstrate MOSWARM-CRP's superiority across all evaluation dimensions Pareto front quality, economic performance, environmental sustainability, and climate resilience for both case studies representing distinct agro-climatic contexts in Africa. Several factors underpin these advantages, and their analysis provides insights relevant to both the optimization and agricultural planning communities.
Why MOSWARM-CRP outperforms multi-objective baselines: the performance advantage of MOSWARM-CRP over NSGA-II, MOEA/D, and SPEA2 is attributable to two complementary mechanisms, 1) the PSO search dynamics particularly the social learning from archive guides via crowding distance-based tournament selection enable rapid convergence toward promising regions of the Pareto front while maintaining diversity through the exploration–exploitation balance governed by the adaptive inertia weight, and 2) more importantly, the integration of climate scenarios and soil dynamics within the fitness function transforms the search landscape in ways that reward genuinely superior rotation designs. Without the soil model, all methods operate on a fitness landscape where soil fertility is treated as an inexhaustible constant, leading to overvaluation of extractive rotation sequences. MOSWARM-CRP's embedded soil dynamics create a more realistic fitness landscape where long-term soil capital maintenance is rewarded, aligning the optimization surface with agronomic reality.
The critical role of climate scenario integration: the ablation study unambiguously demonstrates that multi-scenario climate evaluation is the single most impactful innovation for resilience optimization (Section 5.6). When rotations are optimized against a single average climate trajectory, the resulting plans are "brittle"; they perform well under modal conditions but fail disproportionately under extreme scenarios, particularly the high-emission SSP5-8.5 projections from high-ECS models (CanESM5, UKESM1-0-LL). By explicitly incorporating the minimax resilience objective across ten climate scenarios, MOSWARM-CRP steers the search toward rotation configurations that are inherently robust: Crops with broader thermal tolerance ranges, drought-tolerant varieties in the candidate set, and sequences that maintain yield stability through diversification. This finding resonates with the robust optimization literature [41] and suggests that climate-explicit evaluation should become a standard feature of agricultural optimization tools.
Practical implications for smallholder farmers: the rotation patterns discovered by MOSWARM-CRP are not merely theoretical optima; they represent actionable, agronomically sensible strategies. The cereal–legume alternation patterns dominant in both case studies align with well-established agronomic principles [61], [62] but go further by quantifying the economic and environmental returns of specific sequences and parameterizing input levels (fertilizer, seeding density) for each crop–year combination. For Malian smallholders currently practicing millet monoculture or millet–fallow sequences, the transition to a millet– groundnut–sorghum–cowpea rotation represents a feasible intensification pathway that increases income through high-value legume crops while reducing nitrogen fertilizer dependency through biological fixation. The Moroccan results similarly suggest that replacing wheat–fallow with wheat–legume–cereal–legume sequences can unlock substantial economic and environmental co-benefits, consistent with the "green morocco plan" policy emphasis on crop diversification and legume promotion [63].
Policy relevance for food security and climate adaptation: the results have direct relevance to national and regional food security policy in Africa. The African Union's Comprehensive Africa Agriculture Development Programme (CAADP) and the Malabo Declaration call for evidence-based agricultural transformation strategies that simultaneously improve productivity, resilience, and sustainability [64]. MOSWARM-CRP provides a quantitative framework for identifying rotation strategies that advance all three goals simultaneously, offering policymakers a tool for evaluating the productivity–resilience–sustainability trade-off surface and selecting strategies aligned with national priorities. The 12–20% climate resilience improvement is particularly significant given the projected intensification of drought frequency in the Sahel [65] and progressive aridification of North Africa [66].
Limitations and caveats: Several limitations of the current work should be acknowledged: 1) the crop yield response model, while inspired by AquaCrop [48], [53], is substantially simplified and does not capture all physiological processes (e.g., crop phenology, pest/disease pressure, nutrient toxicity). Integration with full process-based crop models (DSSAT, APSIM) would enhance yield prediction accuracy but at significant computational cost, 2) pest and disease dynamics which are strongly influenced by rotation patterns are not explicitly modeled; their inclusion would require additional state variables and interaction terms, 3) socioeconomic factors including market price volatility, labor migration, input supply chain disruptions, and household preference heterogeneity are treated deterministically or omitted, whereas in practice these factors introduce substantial additional uncertainty, 4) the crop parameter calibration relies on literature values and regional averages; site-specific calibration with local trial data would improve prediction accuracy but requires field-level data that may not be available in data-scarce African contexts, and 5) the CMIP6 ensemble, while spanning a range of climate sensitivities, does not fully characterize deep uncertainty in climate projections; expansion to larger ensembles or alternative scenario frameworks (e.g., storyline approaches) could provide additional robustness.
Comparison with mathematical programming approaches: Linear and mixed-integer programming approaches to crop rotation [14], [25] offer guaranteed global optimality for their specific formulations but require linearization of the yield response, soil dynamics, and climate uncertainty components that are intrinsically nonlinear. MOSWARM-CRP sacrifices global optimality guarantees in favor of handling the full nonlinear, stochastic, multi-objective problem structure without approximation. For practical planning purposes, the high-quality Pareto front approximations delivered by MOSWARM-CRP (with HV values exceeding 0.70) provide sufficient decision support, particularly given that the inherent uncertainty in crop parameters and climate projections renders the distinction between "globally optimal" and "high-quality approximate" solutions largely moot.
Future directions: Several promising research directions emerge from this work: 1) integration with full process-based crop simulation models (DSSAT [46], APSIM [47]) via surrogate modeling or model emulation could enhance yield prediction accuracy while maintaining computational tractability, 2) participatory optimization approaches that incorporate farmer preferences, indigenous knowledge, and risk attitudes through interactive Pareto front navigation could enhance adoption and relevance, 3) extension to additional agro-climatic regions beyond Sub-Saharan and North Africa including South Asia, Southeast Asia, and Central America would test the algorithm's generalizability, 4) real-time seasonal re-optimization using within-season weather observations and updated short-term forecasts could transform the tool from a strategic planning instrument to a tactical decision support system, and 5) integration of market price forecasting models (e.g., using time-series machine learning methods) as a source of economic uncertainty, complementing the climate uncertainty already captured, would provide more realistic profit distributions. Sixth, multi-farm, landscape-level optimization incorporating spatial interactions (pollination services, pest corridors, collective market impacts) represents an important scaling challenge.
7. Conclusion
This paper has presented MOSWARM-CRP, a novel MOPSO algorithm for climate-adaptive crop rotation planning that integrates ensemble climate projections, embedded soil nutrient dynamics, and a three-objective optimization framework targeting economic return, environmental sustainability, and climate resilience. The algorithm introduces four key innovations: climate-scenario-aware fitness evaluation across CMIP6 ensembles, a discrete–continuous hybrid particle encoding tailored to the rotation search space, Pareto archive management with adaptive grid and crowding distance for effective three-objective trade-off surface approximation, and a seasonally constrained adaptive inertia weight mechanism that balances exploration and exploitation throughout the search.
Comprehensive empirical evaluation on two African case studies, the Ségou Region of Mali (semi-arid Sahel) and the Meknès-Fès Region of Morocco (semi-arid Mediterranean), demonstrates that MOSWARM-CRP significantly outperforms state-of-the-art MOEAs (NSGA-II, MOEA/D, SPEA2, standard MOPSO), a single-objective GA, and expert-designed RBRs across all evaluation dimensions. The algorithm achieves 15– 23% higher EAP, 18–31% lower cumulative soil nitrogen depletion, and 12–20% superior CRSs relative to the best baselines, with statistically significant margins confirmed over 30 independent runs. Ablation studies confirm the complementary contributions of climate integration (critical for resilience), soil dynamics modeling (critical for environmental sustainability and long-term economic performance), and the adaptive inertia mechanism (beneficial for convergence speed and solution diversity).
The rotation patterns discovered by MOSWARM-CRP, particularly cereal–legume alternation cycles with strategic fallow insertion, are agronomically sound, economically attractive, and climatically robust, offering actionable recommendations for smallholder and semi-commercial farmers in climate-vulnerable African regions. The algorithm's computational cost (approximately 35 minutes per run on standard hardware) is practical for seasonal planning applications. As climate change intensifies the challenges facing African agriculture, computational tools like MOSWARM-CRP that can navigate the complex trade-offs between productivity, sustainability, and resilience will become increasingly essential for evidence-based agricultural transformation. Future work will pursue integration with process-based crop models, participatory optimization frameworks, and extension to additional agro-climatic regions and landscape-level planning scales.
Acknowledgments
This research was supported by the African Union Research Grant Programme under Grant No. AU-RG-2024-0187 and the Moroccan Ministry of Higher Education, Scientific Research, and Innovation under Grant MESRSFC-PPR2-2024. The authors gratefully acknowledge the IER of Mali and the INRA of Morocco for providing regional agronomic data and expert consultation. The authors thank the CMIP6 modeling groups for making their simulation outputs publicly available through ESGF. We also thank the anonymous reviewers for their constructive feedback, which substantially improved the manuscript.
Author Contributions
M. T.; conceptualization, methodology, software, writing original draft, supervision.
F. Z. B.; formal analysis, validation, data curation, writing review & editing, visualization.
Funding
Not applicable.
Data Availability
The CMIP6 climate projection data used in this study are publicly available from the ESGF data nodes1. Historical climate data were obtained from the direction Nationale de la Météorologie of Mali and the Direction Générale de la Météorologie of Morocco under data-sharing agreements. ERA5 reanalysis data are available from the Copernicus Climate Data Store. Crop parameters were sourced from FAO public databases and published literature as cited. The MOSWARM-CRP source code and experiment scripts are available2.
Competing Interests
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Consent for Publication
The author confirms consent for the publication of this work.
Ethics Approval and Consent to Participate
This article does not contain any studies with human participants performed by the author.
References
- [1] Bullock, D. G. (1992). Crop rotation. Critical reviews in plant sciences, 11(4), 309–326. https://doi.org/10.1080/07352689209382349
- [2] Castellazzi, M. S., Wood, G. A., Burgess, P. J., Morris, J., Conrad, K. F., & Perry, J. N. (2008). A systematic representation of crop rotations. Agricultural systems, 97(1), 26–33. https://doi.org/10.1016/j.agsy.2007.10.006
- [3] Bennett, A. J., Bending, G. D., Chandler, D., Hilton, S., & Mills, P. (2012). Meeting the demand for crop production: the challenge of yield decline in crops grown in short rotations. Biological reviews, 87(1), 52–
- [71] https://doi.org/10.1111/j.1469-185X.2011.00184.x 1 2 https://esgf-node.llnl.gov/ https://github.com/traore-lab/MOSWARM-CRP
- [4] Reckling, M., Hecker, J.-M., Bergkvist, G., Watson, C. A., Zander, P., Schläfke, N., …, & Bachinger, J. (2016). A cropping system assessment framework—Evaluating effects of introducing legumes into crop rotations. European journal of agronomy, 76, 186–197. https://doi.org/10.1016/j.eja.2015.11.005
- [5] Tittonell, P., & Giller, K. E. (2013). When yield gaps are poverty traps: The paradigm of ecological intensification in African smallholder agriculture. Field crops research, 143, 76–90. https://doi.org/10.1016/j.fcr.2012.10.007
- [6] IPCC Sixth Assessment Report. (2022). Climate change 2022: Impacts, adaptation and vulnerability. https://www.ipcc.ch/report/ar6/wg2
- [7] Food and Agriculture Organization of the United Nations. (2023). FAOSTAT statistical database. https://www.fao.org/faostat/
- [8] Sultan, B., Ahmed, A. I., Faye, B., & Tramblay, Y. (2023). Less negative impacts of climate change on crop yields in West Africa in the new CMIP6 climate simulations ensemble. Plos climate, 2(12), e0000263. https://doi.org/10.1371/journal.pclm.0000263
- [9] Müller, C., Franke, J., Jägermeyr, J., Ruane, A. C., Elliott, J., Moyer, E., …, & Zabel, F. (2021). Exploring uncertainties in global crop yield projections in a large ensemble of crop models and CMIP5 and CMIP6 climate scenarios. Environmental research letters, 16(3), 34040. https://doi.org/10.1088/1748-9326/abd8fc
- [10] Dury, J., Schaller, N., Garcia, F., Reynaud, A., & Bergez, J. E. (2012). Models to support cropping plan and crop rotation decisions. A review. Agronomy for sustainable development, 32(2), 567–580. https://doi.org/10.1007/s13593-011-0037-x
- [11] Bachinger, J., & Zander, P. (2007). ROTOR, a tool for generating and evaluating crop rotations for organic farming systems. European journal of agronomy, 26(2), 130–143. https://doi.org/10.1016/j.eja.2006.09.002
- [12] Dogliotti, S., Rossing, W. A. H., & van Ittersum, M. K. (2003). rotat, a tool for systematically generating crop rotations. European journal of agronomy, 19(2), 239–250. https://doi.org/10.1016/S1161-0301(02)00047-3
- [13] Detlefsen, N. K., & Jensen, A. L. (2007). Modelling optimal crop sequences using network flows. Agricultural systems, 94(2), 566–572. https://doi.org/10.1016/j.agsy.2007.02.002
- [14] dos Santos, L. M. R., Costa, A. M., Arenales, M. N., & Santos, R. H. S. (2010). Sustainable vegetable crop supply problem. European journal of operational research, 204(3), 639–647. https://doi.org/10.1016/j.ejor.2009.11.026
- [15] Annetts, J. E., & Audsley, E. (2002). Multiple objective linear programming for environmental farm planning. Journal of the operational research society, 53(9), 933–943. https://doi.org/10.1057/palgrave.jors.2601404
- [16] Deb, K., Pratap, A., Agarwal, S., & Meyarivan, T. (2002). A fast and elitist multiobjective genetic algorithm: NSGA-II. IEEE transactions on evolutionary computation, 6(2), 182–197. https://doi.org/10.1109/4235.996017
- [17] Zhang, Q., & Li, H. (2007). MOEA/D: A multiobjective evolutionary algorithm based on decomposition. IEEE transactions on evolutionary computation, 11(6), 712–731. https://doi.org/10.1109/TEVC.2007.892759
- [18] Memmah, M. M., Lescourret, F., Yao, X., & Lavigne, C. (2015). Metaheuristics for agricultural land use optimization. A review. Agronomy for sustainable development, 35(3), 975–998. https://doi.org/10.1007/s13593-015-0303-4
- [19] Groot, J. C. J., Oomen, G. J. M., & Rossing, W. A. H. (2012). Multi-objective optimization and design of farming systems. Agricultural systems, 110, 63–77. https://doi.org/10.1016/j.agsy.2012.03.012
- [20] Coello, C. A. C., Pulido, G. T., & Lechuga, M. S. (2004). Handling multiple objectives with particle swarm optimization. IEEE transactions on evolutionary computation, 8(3), 256–279. https://doi.org/10.1109/TEVC.2004.826067
- [21] Kennedy, J., & Eberhart, R. (1995). Particle swarm optimization. International conference on neural networks (Vol. 4, pp. 1942–1948 vol.4). IEEE. https://doi.org/10.1109/ICNN.1995.488968
- [22] Reyes-Sierra, M., & Coello Coello, C. A. (2006). Multi-objective particle swarm optimizers: A survey of the state-of-the-art. International journal of computational intelligence research, 2(3), 287–308. https://doi.org/10.5019/j.ijcir.2006.68
- [23] Heady, E. O. (1954). Simplified presentation and logical aspects of linear programming technique. Journal of farm economics, 36(5), 1035–1048. https://doi.org/10.2307/1234313
- [24] Glen, J. J. (1987). Mathematical models in farm planning: A survey. Operations research, 35(5), 641–666. https://doi.org/10.1287/opre.35.5.641
- [25] Alfandari, L., Plateau, A., & Schepler, X. (2015). A branch-and-price-and-cut approach for sustainable crop rotation planning. European journal of operational research, 241(3), 872–879. https://doi.org/10.1016/j.ejor.2014.09.066
- [26] Schönhart, M., Schmid, E., & Schneider, U. A. (2011). CropRota-A crop rotation model to support integrated land use assessments. European journal of agronomy, 34(4), 263–277. https://doi.org/10.1016/j.eja.2011.02.004
- [27] Akplogan, M., de Givry, S., Métivier, J. P., Quesnel, G., Joannon, A., & Garcia, F. (2013). Solving the crop allocation problem using hard and soft constraints. RAIRO operations research, 47(2), 151–172. https://doi.org/10.1051/ro/2013032
- [28] Kosmidou, K. (2008). The determinants of banks’ profits in Greece during the period of EU financial integration. Managerial finance, 34(3), 146. https://doi.org/10.1108/03074350810848036
- [29] Gautron, R., Maillard, O. A., Preux, P., Corbeels, M., & Sabbadin, R. (2022). Reinforcement learning for crop management support: Review, prospects and challenges. Computers and electronics in agriculture, 200, 107182. https://doi.org/10.1016/j.compag.2022.107182
- [30] Farmani, R., Savic, D. A., & Walters, G. A. (2005). Evolutionary multi-objective optimization in water distribution network design. Engineering optimization, 37(2), 167–183. https://doi.org/10.1080/03052150512331303436
- [31] Srinivasa Raju, K., & Nagesh Kumar, D. (2004). Irrigation planning using genetic algorithms. Water resources management, 18(2), 163–176. https://doi.org/10.1023/B:WARM.0000024738.72486.b2
- [32] Reed, P. M., Hadka, D., Herman, J. D., Kasprzyk, J. R., & Kollat, J. B. (2013). Evolutionary multiobjective optimization in water resources: The past, present, and future. Advances in water resources, 51, 438–456. https://doi.org/10.1016/j.advwatres.2012.01.005
- [33] Zitzler, E., Laumanns, M., & Thiele, L. (2001). SPEA2: Improving the strength Pareto evolutionary algorithm. https://doi.org/10.3929/ethz-a-004284029
- [34] Nguyen, D. C. H., Ascough, J. C., Maier, H. R., Dandy, G. C., & Andales, A. A. (2017). Optimization of irrigation scheduling using ant colony algorithms and an advanced cropping system model. Environmental modelling & software, 97, 32–45. https://doi.org/10.1016/j.envsoft.2017.07.002
- [35] Sarker, R., & Ray, T. (2009). An improved evolutionary algorithm for solving multi-objective crop planning models. Computers and electronics in agriculture, 68(2), 191–199. https://doi.org/10.1016/j.compag.2009.06.002
- [36] Kennedy, J., & Eberhart, R. C. (1997). A discrete binary version of the particle swarm algorithm. 1997 IEEE international conference on systems, man, and cybernetics (pp. 4104–4108). IEEE. https://doi.org/10.1109/ICSMC.1997.637339
- [37] Liao, C.-J., Chao-Tang Tseng, & Luarn, P. (2007). A discrete version of particle swarm optimization for flowshop scheduling problems. Computers & operations research, 34(10), 3099–3111. https://doi.org/10.1016/j.cor.2005.11.017
- [38] Tasgetiren, M. F., Liang, Y. C., Sevkli, M., & Gencyilmaz, G. (2007). A particle swarm optimization algorithm for makespan and total flowtime minimization in the permutation flowshop sequencing problem. European journal of operational research, 177(3), 1930–1947. https://doi.org/10.1016/j.ejor.2005.12.024
- [39] Eyring, V., Bony, S., Meehl, G. A., Senior, C. A., Stevens, B., Stouffer, R. J., & Taylor, K. E. (2016). Overview of the coupled model intercomparison project phase 6 (CMIP6) experimental design and organization. Geoscientific model development, 9(5), 1937–1958.https://doi.org/10.5194/gmd-9-1937-2016
- [40] O’Neill, B. C., Tebaldi, C., van Vuuren, D. P., Eyring, V., Friedlingstein, P., Hurtt, G., …, & Sanderson, B. M. (2016). The scenario model intercomparison project (ScenarioMIP) for CMIP6. Geoscientific model development, 9(9), 3461–3482.https://doi.org/10.5194/gmd-9-3461-2016
- [41] Ben-Tal, A., Nemirovski, A., & El Ghaoui, L. (2009). Robust optimization. Princeton University Press. https://www.torrossa.com/en/resources/an/5576051#.
- [42] Kall, P., Wallace, S. W., & Kall, P. (1994). Stochastic programming. Chichester: Wiley. https://doi.org/10.1007/978-3-642-88272-2.
- [43] Herman, J. D., Reed, P. M., Zeff, H. B., & Characklis, G. W. (2015). How should robustness be defined for water systems planning under change? Journal of water resources planning and management, 141(10), 04015012. https://doi.org/10.1061/(ASCE)WR.1943-5452.0000509
- [44] Thornton, P. K., Ericksen, P. J., Herrero, M., & Challinor, A. J. (2014). Climate variability and vulnerability to climate change: A review. Global change biology, 20(11), 3313–3328. https://doi.org/10.1111/gcb.12581
- [45] Challinor, A. J., Watson, J., Lobell, D. B., Howden, S. M., Smith, D. R., & Chhetri, N. (2014). A meta-analysis of crop yield under climate change and adaptation. Nature climate change, 4(4), 287–291. https://doi.org/10.1038/nclimate2153
- [46] Jones, J. W., Hoogenboom, G., Porter, C. H., Boote, K. J., Batchelor, W. D., Hunt, L. A., …, & Ritchie, J. T. (2003). The DSSAT cropping system model. European journal of agronomy, 18(3), 235–265. https://doi.org/10.1016/S1161-0301(02)00107-7
- [47] Holzworth, D. P., Huth, N. I., DeVoil, P. G., Zurcher, E. J., Herrmann, N. I., McLean, G., …, & Keating, B. A. (2014). APSIM – Evolution towards a new generation of agricultural systems simulation. Environmental modelling & software, 62, 327–350. https://doi.org/10.1016/j.envsoft.2014.07.009
- [48] Steduto, P., Hsiao, T. C., Raes, D., & Fereres, E. (2009). AquaCrop—The FAO crop model to simulate yield response to water: Concepts and underlying principles. Agronomy journal, 101(3), 426–437. https://doi.org/10.2134/agronj2008.0139s
- [49] Parton, W. J., Schimel, D. S., Cole, C. V., & Ojima, D. S. (1987). Analysis of factors controlling soil organic matter levels in Great Plains grasslands. Soil science society of america journal, 51(5), 1173–1179. https://doi.org/10.2136/sssaj1987.03615995005100050015x
- [50] Coleman, K., & Jenkinson, D. S. (1996). RothC-26.3 - a model for the turnover of carbon in soil. In Evaluation of soil organic matter models (pp. 237–246). Berlin, Heidelberg: Springer Berlin Heidelberg. https://doi.org/10.1007/978-3-642-61094-3_17
- [51] Maraun, D. (2016). Bias correcting climate change simulations: A critical review. Current climate change reports, 2(4), 211–220. https://doi.org/10.1007/s40641-016-0050-x
- [52] Hersbach, H., Bell, B., Berrisford, P., Hirahara, S., Horányi, A., Muñoz-Sabater, J., …, & Thépaut, J. N. (2020). The ERA5 global reanalysis. Quarterly journal of the royal meteorological society, 146(730), 1999–2049. https://doi.org/10.1002/qj.3803
- [53] Raes, D., Steduto, P., Hsiao, T. C., & Fereres, E. (2009). AquaCrop—The FAO crop model to simulate yield response to water: Main algorithms and software description. Agronomy journal, 101(3), 438–447. https://doi.org/10.2134/agronj2008.0140s
- [54] Doorenbos, J., Kassam, A. H., & Bentvelsen, C. (1979). Yield response to water, irrigation and drainage. https://agris.fao.org/search/en/providers/122621/records/64724f9353aa8c896305d1b7
- [55] Allen, R. G., Pereira, L. S., Raes, D., & Smith, M. (1998). Crop evapotranspiration-guidelines for computing crop water requirements-FAO irrigation and drainage paper 56. FAO, Rome, 300(9), D05109. http://www.avwatermaster.org/filingdocs/195/70653/172618e_5xAGWAx8.pdf
- [56] Shi, Y., & Eberhart, R. (1998). A modified particle swarm optimizer. Evolutionary computation proceedings (pp. 69–73). IEEE. https://doi.org/10.1109/icec.1998.699146
- [57] Srivastava, A., Grotjahn, R., & Ullrich, P. A. (2020). Evaluation of historical CMIP6 model simulations of extreme precipitation over contiguous US regions. Weather and climate extremes, 29, 100268. https://doi.org/10.1016/j.wace.2020.100268
- [58] Almazroui, M., Saeed, F., Saeed, S., Nazrul Islam, M., Ismail, M., Klutse, N. A. B., & Siddiqui, M. H. (2020). Projected change in temperature and precipitation over Africa from CMIP6. Earth systems and environment, 4(3), 455–475. https://doi.org/10.1007/s41748-020-00161-x
- [59] Cannon, A. J., Sobie, S. R., & Murdock, T. Q. (2015). Bias correction of gcm precipitation by quantile mapping: How well do methods preserve changes in quantiles and extremes? Journal of climate, 28(17), 6938–6959. https://doi.org/10.1175/JCLI-D-14-00754.1
- [60] Zitzler, E., & Thiele, L. (1999). Multiobjective evolutionary algorithms: A comparative case study and the strength Pareto approach. IEEE transactions on evolutionary computation, 3(4), 257–271. https://doi.org/10.1109/4235.797969
- [61] Peoples, M. B., Brockwell, J., Herridge, D. F., Rochester, I. J., Alves, B. J. R., Urquiaga, S., … & Jensen, E. S. (2009). The contributions of nitrogen-fixing crop legumes to the productivity of agricultural systems. Symbiosis, 48(1), 1–17. https://doi.org/10.1007/BF03179980
- [62] Vanlauwe, B., Coyne, D., Gockowski, J., Hauser, S., Huising, J., Masso, C., ..., & Van Asten, P. (2014). Sustainable intensification and the African smallholder farmer. Current opinion in environmental sustainability, 8(0), 15–22. http://humidtropics.cgiar.org/wp-content/uploads/downloads/2014/12/Sustainable-intensification-and-the-African-smallholder.pdf
- [63] Moussadek, R., Mrabet, R., Dahan, R., Zouahri, A., El Mourid, M., & Ranst, E. Van. (2014). Tillage system affects soil organic carbon storage and quality in Central Morocco. Applied and environmental soil science, 2014(1), 654796. https://doi.org/10.1155/2014/654796
- [64] African-Union. (2015). Malabo declaration on accelerated agricultural growth and transformation for shared prosperity and improved livelihoods. https://au.int/en/documents/20150617/malabo-declaration-accelerated-agricultural-growth-and-transformation-shared
- [65] Dosio, A., Turner, A. G., Tamoffo, A. T., Sylla, M. B., Lennard, C., Jones, R. G., …, & Hewitson, B. (2020). A tale of two futures: Contrasting scenarios of future precipitation for West Africa from an ensemble of regional climate models. Environmental research letters, 15(6), 64007. https://doi.org/10.1088/1748-9326/ab7fde
- [66] Tramblay, Y., Koutroulis, A., Samaniego, L., Vicente-Serrano, S. M., Volaire, F., Boone, A., …, & Polcher, J. (2020). Challenges for drought assessment in the Mediterranean region under future climate scenarios. Earth-science reviews, 210, 103348. https://doi.org/10.1016/j.earscirev.2020.103348