1. Introduction
In the dual context of the “dual carbon” goals and the global energy transition, the oil and gas industry is accelerating its shift toward low-carbon and intelligent development [
1,
2,
3]. Establishing a “source-grid-load-storage” integrated green energy supply system has become a critical measure for reducing oil and gas production costs and improving environmental benefits [
4,
5,
6,
7]. Pump stations, as the core energy-consuming units of long-distance crude oil pipelines, account for enormous annual electricity consumption, representing over half of the total energy consumption of pump stations [
8]. However, as renewable energy sources such as photovoltaic and wind power are integrated into pump station microgrids on a large scale, their output exhibits strong randomness and volatility, which severely conflicts with the traditional “constant operating condition” pump station dispatch mode. This mismatch leads to a dual dilemma: green electricity surplus during daytime that cannot be accommodated, and heavy reliance on high-cost, high-carbon grid electricity during nighttime when green electricity is scarce, resulting in both green electricity waste and carbon emissions [
9,
10].
Pump station dispatch constitutes a typical strongly constrained, high-dimensional discrete optimization problem. Although dynamic programming can describe the physical process, the discretization of continuous variables introduces accuracy loss, thereby limiting its applicability [
11]. Mixed-integer linear programming (MILP), by accurately characterizing the coupling between equipment start–stop states (0/1 variables) and flow/pressure (continuous variables), has emerged as a more practically realistic modeling approach [
12].
In recent years, research on renewable energy integration in energy systems has grown considerably, with some studies formulating MILP models and designing algorithms for these multi-energy hybrid systems to address the solution challenges posed by green electricity volatility. Initially, exact algorithms were employed to solve these MILP models [
13], and these exact algorithms were integrated into commercial solvers such as CPLEX and Gurobi. Although commercial solvers like CPLEX and Gurobi can obtain exact solutions to MILP problems based on these exact algorithms, their computational time often becomes unacceptable when handling real-time dispatch problems with high dimensionality and strong constraints.
To overcome the limitations of exact algorithms, various metaheuristic algorithms have been introduced for solving these MILP problems. Roslöf et al. [
14] formulated an MILP model for large-scale industrial scheduling in multi-product, multi-stage batch plants and employed a heuristic iterative approach capable of obtaining feasible solutions within a short time. Genetic algorithms and their variants/hybrids have been widely applied to complex scheduling problems [
15,
16,
17]. Ramezanian et al. [
15] adopted a genetic algorithm to solve the non-permutation flow shop scheduling problem with availability constraints (FSSPAC). Küçükkoç et al. [
16] proposed a hybrid metaheuristic integrating ant colony optimization and genetic algorithm for assembly line balancing and scheduling. Meng et al. [
17] developed a dual-population cooperative genetic algorithm for solving the flexible job shop scheduling problem with AGVs (FJSP-AGV), where master–slave population cooperation maintains diversity and accelerates convergence. Particle swarm optimization (PSO) and its improved variants exhibit fast initial convergence in pump-storage dispatch incorporating renewable energy, yet are prone to becoming trapped in local optima [
18,
19]. Ji et al. [
18] designed an improved discrete particle swarm optimization algorithm for unit scheduling of pumped-storage hydropower stations, which converges rapidly in pump unit scenarios with renewable energy but tends to fall into local optima in later iterations. Patwal et al. [
19] developed a crossover PSO algorithm for multi-objective generation dispatch in solar-integrated pump-storage hydrothermal systems, further enhancing multi-objective performance.
The artificial bee colony (ABC) algorithm and its hybrid variants effectively overcome the drawbacks of slow convergence and premature convergence inherent in standard ABC, often incorporating local search to enhance performance [
20,
21,
22]. Reference [
20] proposed a novel hybrid binary artificial bee colony algorithm that introduces a binary string difference measurement mechanism, an intelligent scout bee phase, and a swap-based local search, successfully addressing the slow convergence and premature convergence deficiencies of standard ABC in the unit commitment problem (UCP); however, its deep exploitation capability for more complex pump station process constraints remains somewhat insufficient. Ladj et al. [
22] combined the artificial bee colony algorithm with neighborhood search to address scheduling problems in permutation flow shop production systems.
Variable neighborhood search (VNS) is a commonly used neighborhood search method. VNS is frequently combined with other heuristic algorithms to achieve complementary advantages, such as hybridization with genetic algorithm (GA) to form GA-VNS for solving dynamic facility layout problems [
23], or integration with tabu search (TS) to construct a VNS/TS hybrid algorithm for vehicle routing problems with drones [
24]. These hybrid approaches significantly improve global exploration capability and local refinement efficiency, achieving superior solution quality and computational performance in practical complex optimization scenarios. Wang et al. [
21] designed a combined artificial bee colony and variable neighborhood search algorithm for large-scale forest fire emergency dispatch problems; however, the deep exploitation and problem-oriented adaptability of its neighborhood structures still have room for improvement. It is worth noting that while existing studies [
20,
21,
22] have explored the ABC-VNS hybrid framework, none of them have addressed the specific scenario of crude oil pumping station scheduling with green energy integration nor have they balanced the core challenge of green electricity consumption, pump unit operational constraints, and economic costs through problem-oriented algorithm design.
Despite the above advances, existing MILP models and metaheuristic algorithms suffer from two critical gaps when applied to green energy-integrated long-distance crude oil pumping stations. First, current MILP models omit several essential process constraints specific to crude oil transportation.These include (i) the pipeline’s maximum allowable continuous shutdown time (shutdown tolerance, typically several hours for waxy crude to avoid freezing or wax deposition); (ii) the minimum continuous operation/shutdown times of pumps (e.g., 4–8 h to prevent mechanical fatigue and maintain process stability); (iii) the mandatory restart heating energy required to compensate for temperature drop during shutdown, which depends on crude oil properties and ambient conditions; and (iv) the dynamic flow safety margins that vary with pipeline inventory. Without these constraints, a theoretically optimal schedule may be infeasible or unsafe in real operation. Second, existing metaheuristics—including standard ABC, PSO, and GA—lack problem-specific search operators for this scenario. They treat the scheduling problem as a generic binary optimization task, ignoring the temporal structure of time-of-use electricity prices and the diurnal pattern of renewable energy output. Consequently, they often converge prematurely to local optima (especially under the strong penalty terms required to enforce the above constraints) and fail to perform effective load shifting—e.g., concentrating pump operation during nighttime off-peak hours or midday green power peaks while avoiding peak tariff periods. Moreover, the scout bee phase in standard ABC typically reinitializes solutions randomly, discarding accumulated high-quality patterns rather than refining them.
Therefore, to address the practical issues of insufficient green electricity accommodation and high purchased-power costs in long-distance crude oil transmission systems, this study takes such systems as the research object and constructs an MILP model with the dual objectives of maximizing green electricity accommodation and minimizing purchased-power costs. The model comprehensively encompasses stringent constraints, including pump station equipment start-up and shutdown, power ramping, minimum up/down times, pipeline flow safety, and transmission interruption tolerance. To efficiently solve this high-dimensional, strongly constrained problem, a hybrid artificial bee colony algorithm integrating a memory mechanism and variable neighborhood search (HABC-VNS) is designed. The algorithm employs binary matrix encoding and a discrete uniform crossover operator to ensure population diversity, introduces a memory-guided strategy to accelerate global convergence, designs three problem-oriented neighborhood structures—bit flipping, electricity price-guided start–stop adjustment, and block shifting—for in-depth exploitation, and embeds a mild perturbation mechanism in the scout bee phase to enhance the capability of escaping local optima. Simulation results demonstrate that, in scenarios involving four pumps and eight stations, HABC-VNS achieves significant advantages over standard ABC, PSO, and GA in terms of both total cost and green electricity accommodation rate, confirming that the proposed model and algorithm can effectively achieve a dynamic balance between high-proportion green electricity accommodation and safe, economical system operation, thereby providing a feasible technical solution for renewable energy integration and intelligent dispatch in high-energy-consumption industries such as long-distance crude oil transportation.
In summary, this paper provides a feasible technical solution for renewable energy integration and intelligent dispatch in high-energy-consumption industries such as long-distance crude oil transportation. The remainder of this paper is organized as follows:
Section 2 describes the MILP model in detail;
Section 3 describes the HABC-VNS algorithm;
Section 4 presents simulation results and comparisons.
2. Materials and Methods
2.1. Model Development Approach
Currently, long-distance crude oil transmission systems predominantly operate in a “continuous steady-state” mode, in which multi-stage pump stations operate 24 h a day at relatively constant pressure and flow rates. The core principle of this mode is “production-driven energy dispatch,” where equipment operation strictly follows upstream oil supply and downstream demand to ensure safe and continuous long-distance pipeline transportation. This rigid operational mode conflicts with the intermittent nature of green electricity, leading to ineffective green electricity accommodation and heavy reliance on high-cost grid electricity during nighttime.
To address this issue, we propose a “power-driven production” dispatch strategy that adjusts pipeline operations in response to power system conditions, such as green electricity availability and procured electricity costs. The physical foundation of this strategy lies in two inherent characteristics of long-distance pipelines: substantial linepack buffer capacity (enabling crude oil storage for several to dozens of hours) and a rigid but operationally exploitable tolerance for transmission interruptions (permitting safe, temporary shutdowns under specific crude oil properties and ambient temperature conditions).
By formulating a mixed-integer programming model to optimize the start-up, shutdown, and power regulation of multi-stage pump stations, we transform these physical characteristics into dispatch flexibility. This enables proactive alignment between electrical load and renewable energy generation.
The core of the proposed framework intelligently schedules dispatchable equipment based on real-time green power output and time-of-use electricity prices. By leveraging the aforementioned physical buffers as operational flexibility, the strategy achieves high renewable energy integration while rigorously maintaining process safety.
A schematic diagram of the scenario is shown in
Figure 1.
The optimization model adopts a hierarchical objective structure, prioritizing the maximization of local green power consumption as the primary goal and the minimization of grid-purchased electricity as the secondary goal. The scheduling horizon is discretized into 24 hourly intervals. Based on three decision criteria—green power output levels, time-of-use (TOU) price attributes (valley vs. non-valley periods), and system safety operational boundaries—the operational modes of dispatchable equipment are dynamically determined as follows:
Green Peak Mode: When green power output resides in the high-range interval, all dispatchable units are activated to maximize renewable energy integration;
Blue Valley Mode: When green power output is moderate and coincides with valley-price periods, equipment operates at reduced speed to balance renewable utilization with the economic advantage of off-peak electricity;
Red Shutdown Mode: During peak-price periods or under scarce green power conditions, the output of selected pump stations is throttled, or short-term shutdown is implemented by leveraging the pipeline’s allowable suspension tolerance.
2.2. Major Power-Consuming Equipment in the System and Modeling
To achieve granular dispatch, the primary power-consuming units within the system must be classified according to their process functions and operational flexibility. A typical long-distance crude oil pipeline system comprises three categories of critical electrical equipment.
Modeling of Core Power-Consuming Equipment . This category primarily includes multi-stage pump stations arranged in series, with multiple pumps operating in parallel at each station. The operating power (a continuous decision variable in kW, typically ranging from 50 to 200) directly determines the flow rate in the managed pipeline segment and typically features variable speed regulation capabilities. In the model, these units are constrained by a series of physical parameters: their power output must remain within the technical operating bounds ; the power variation between consecutive time intervals is limited by ramping up/down rates (in kW/h, typically 10–20% of the rated power per hour) to prevent mechanical stress; the transitions of their on/off status (a binary decision variable) must satisfy minimum uptime and minimum downtime constraints (in hours, typically 4–8 h) to ensure equipment longevity and process stability. The conversion of electrical energy into effective hydraulic work is characterized by the electro-hydraulic efficiency (typically 0.85–0.92), which directly links equipment power to pipeline flow and is incorporated into the objective function to promote energy-efficient dispatch.
Modeling of Basic Process and Safety Equipment. The basic process equipment (e.g., station lighting and instrumentation) constitutes essential or quasi-essential loads required to maintain continuous process operations, exhibiting limited dispatch flexibility. In the model, their operational status is typically treated as constant (i.e., ), and their aggregate power demand is consolidated as the station base load , serving as a baseline for the system’s power balance. The safety-critical equipment (primarily heating furnaces) operates as condition-triggered loads to compensate for thermal losses during transportation and prevent crude oil gelation. Its operation is activated by a pipeline restart action (a binary decision variable). The corresponding heating power (a continuous decision variable in kW) must satisfy a lower bound derived from energy conservation principles. This calculation depends on the following parameters: the temperature drop incurred during shutdown that must be compensated, (in °C), the pipeline volume , crude oil thermophysical properties (density and specific heat capacity ), and the heating furnace efficiency (typically 0.85–0.95).
Modeling of Pipeline Systems and Energy Supply. The gathering and transmission pipeline system Φ serves as the critical physical coupling medium between power dispatch and hydraulic transport safety. The pipeline flow rate (continuous variable) must strictly operate within a dynamic safety corridor bounded by the minimum anti-gelation flow and the maximum pressure-limited flow . The pipeline shutdown status is denoted by the binary variable , with its consecutive shutdown duration strictly bounded by the operational “shutdown tolerance” . This tolerance constitutes a fundamental safety constraint for feasible dispatch scheduling. Furthermore, the pipeline pressure variation rate is constrained by to mitigate hydraulic transients and prevent pressure surges. The energy supply system integrates renewable generation (wind and photovoltaic) with the external utility grid. The model employs the forecasted green power output and the time-of-use (TOU) electricity price as exogenous inputs. It determines the optimal grid-purchased power and potential renewable curtailment as responsive control actions. The grid-purchased power is capped by the system interconnection limit GridMax (e.g., transformer capacity). To enforce a renewable-priority dispatch strategy, a mandatory green power consumption ratio constraint g (e.g., ) is imposed, stipulating that the daily actual renewable energy utilization must account for no less than g of the total system electricity demand.
For a system comprising
N dispatchable pump units over a scheduling horizon of
h with a discretization step of
h, the binary combinatorial search space scales exponentially as
, corresponding to
binary decision variables. When augmented with continuous variables and a comprehensive set of coupled physical and operational constraints, the resulting mixed-integer optimization problem becomes highly dimensional and computationally challenging. A complete list of model parameters and their physical interpretations is provided in
Table 1.
2.3. Objective Function
The model is a multi-objective mixed-integer linear programming (MILP) problem with the dual objectives of minimizing the cost of purchased electricity and maximizing the proportion of green electricity consumption:
To facilitate the solution, we use the weighted sum method to transform it into a single-objective form:
where
is a weighting coefficient used to balance economic efficiency and the green power integration objective (the larger
is, the higher the priority given to ensuring the green power proportion);
is the grid power at time step
t,
is the actual green power absorbed, and
h.
2.4. Core Constraint System
The constraint system deeply integrates power balance, the physical characteristics of multi-stage pumping stations, the dynamic inventory of long-distance pipelines, and process safety, serving as the guarantee for the safe implementation of the “production determined by power supply” strategy.
1. Power Balance and Green Power Integration Constraints:
(1) Power balance constraint: Ensure that power supply and demand are balanced in each time slot.
(2) Green Power Integration Ratio Constraint: Ensures that the green power integration ratio over the entire period is no less than the target value
l.
(3) Grid power purchase constraint: Limit grid power purchase to no more than the grid’s maximum capacity.
2. Pump Station Technical Constraints:
(4) Pump Output Limit Constraints: Ensure that pump output remains between the technical minimum and maximum, and is zero when the pump is shut down.
(5) Pump group ramping rate constraint: The change in power of a single pump between adjacent time steps must not exceed the ramping rate.
(6) Start–stop logic constraint: Define the relationship between start–stop logic variables and state changes.
(7) Minimum Continuous Operation Time Constraint: Enforces the minimum continuous operation time constraint for the pump group.
(8) Minimum continuous shutdown time constraint: Enforces the minimum continuous shutdown time constraint for the pump group.
3. Process Safety Constraints for Long-Distance Pipelines:
(9) Power-Flow Conversion Constraint: Establish a quantitative relationship between pump set power and outlet flow rate.
where
.
(10) Flow Continuity Constraint: Ensures continuity of pipeline flow between stations.
(11) Pipeline flow safety constraint: Ensures that the flow rate of each pipeline segment remains within the dynamic safety range.
(12) Maximum continuous outage duration constraint: Use the outage tolerance to strictly limit the maximum continuous outage duration of the pipeline.
(13) Restart heating energy constraint: Ensure sufficient compensatory heating energy is provided when the pipeline is restarted.
2.5. HABC-VNS Algorithm
This algorithm is based on the standard ABC framework, a swarm intelligence algorithm proposed by Karaboga in 2005. It is a stochastic optimization algorithm that simulates the foraging behavior of bee colonies [
25]. An artificial bee colony consists of three basic components: forager bees, observer bees, and scout bees. These three components perform distinct tasks, with the core mechanism utilizing the formula
to search for new solutions and the formula
to select a solution, where
is a randomly selected neighbor,
is a newly generated candidate solution, and
is the fitness of the solution, i.e., its quality.
This algorithm is specifically designed to address high-dimensional, strongly constrained discrete optimization problems in the context of green power scheduling for long-distance crude oil pumping stations. In terms of solution space dimensions, the system comprises N pumps and a 24 h scheduling cycle with 1 h time steps, resulting in a solution space as large as
, while also facing challenges such as multiple strongly constrained couplings. To address these two core challenges, this algorithm constructs a comprehensive solution framework based on three design principles: “constraint-aware discrete encoding,” “memory-guided intelligent evolution,” and “multiscale neighborhood collaborative search.”
Figure 2 is the flowchart of the algorithm.
2.6. Constraint-Aware Discrete Encoding Mechanisms
Given that the core decision variables of the model are binary 0/1 variables representing whether a device is on or off, and that the scheduling plan must satisfy complex temporal constraints, this algorithm employs a binary matrix encoding method to represent each scheduling plan as an matrix , where N is the number of pumps and is the number of scheduling time slots. This encoding method is inherently suited to equipment start/stop decisions and offers the following advantages:
Explicit representation of the solution space: The vast solution space (of size ) is explicitly represented in matrix form, facilitating neighborhood operations and constraint checking.
Integrated Constraint Design: Building upon the encoding, the green power absorption rate constraint (g), minimum start–stop time constraints (), pipeline safety constraints, and other strong constraints are transformed into penalty terms within the fitness function using the penalty function method, ensuring that the algorithm gradually converges to the feasible region during the search process.
Heuristic Repair Mechanism: To address issues such as violations of the minimum continuous operation time that may arise from binary encoding, a dedicated repair function is designed to rapidly restore the feasibility of the solution after neighborhood operations.
2.7. Memory-Guided Intelligent Evolution Strategy
To address the issue of the standard ABC algorithm easily getting stuck in local optima during later stages, this algorithm introduces a biomimetic memory-guided mechanism:
Accumulation of Historical Experience: During the iterative process, the algorithm continuously maintains a memory matrix M to store the optimal scheduling schemes discovered in each iteration. As iterations progress, the memory matrix is constantly updated to always retain the current optimal solution.
Accelerated Global Convergence: During the worker bee phase, the algorithm selects the next generation of individuals using a discrete uniform crossover operator and employs a fitness function to select high-quality individuals, significantly improving the speed of global convergence.
2.8. Multi-Scale Neighborhood Collaborative Search Architecture
To address the optimization needs of scheduling problems at different scales, this algorithm designs three complementary neighborhood structures, forming a comprehensive search framework:
Bit-Flipping Neighborhood (): By randomly flipping the state of a single pump at a specific time, this neighborhood enables fine-tuning of the solution. This neighborhood operation has a small adjustment range and is suitable for local refinement optimization in the later stages of the algorithm, avoiding disruption of the high-quality scheduling patterns that have already been established.
Price-Driven Start–Stop Adjustment Neighborhood (): By identifying peak and off-peak periods, this neighborhood shuts down certain pumps during peak hours and starts others during off-peak hours to reduce costs. This operation directly lowers electricity costs during high-price periods while leveraging the economic advantages of low-price periods.
Block-shifting neighborhood (): Addressing the minimum continuous operation time constraint, this neighborhood performs time axis shifting operations on the basis of complete operational blocks. Since the operational units inherently satisfy the minimum operation time constraint, this significantly reduces the computational overhead of constraint checking while enabling structural adjustments to the scheduling plan.
The three neighborhood structures are executed in a fixed order (), forming a complete search chain that progresses from local fine-tuning to global restructuring.
During the scout bee phase, when the number of consecutive unimproved iterations for a given solution exceeds a threshold, a mild perturbation mechanism (randomly flipping approximately 10% of the decision bits) is employed instead of a complete random reset. This approach preserves the population’s exploration capability while avoiding the disruption of accumulated high-quality scheduling patterns.
2.9. Implementation Details
1. Discrete coding and the discrete uniform cross operator: For a scheduling scenario containing
N pumps, a scheduling period
T of 24 h, and a time step
of 1 h, the scheduling matrix is defined as follows:
where
represents each distinct scheduling scheme
, and
denotes that the
N-th pump is turned on at time
T (and turned off otherwise).
A discrete uniform crossover operator is defined as:
where
is an element in the mask matrix MASK with the same dimension as the scheduling matrix. Its value follows a Bernoulli distribution with parameter 0.5 (i.e., 50% for 0 and 50% for 1), and the mask matrix MASK is regenerated for each discrete uniform crossover operation.
Meanwhile, a stall counter is defined to represent the number of discrete uniform crossover operations, along with a maximum stall threshold limit. The fitness function of the candidate solution after discrete uniform crossover is calculated. If , the new solution is accepted as and the stall counter is reset to . Otherwise, the original solution is retained and the stall counter is incremented as . If exceeds the maximum stall threshold limit, the perturbation mechanism described below will be applied to it.
2. Fitness function: Since the MILP model contains a large number of strong constraints (such as minimum start–stop time and maximum pipeline transmission time
), it is extremely difficult to generate feasible solutions directly. This paper employs the dynamic penalty method [
26] to transform the constrained optimization problem into an unconstrained optimization problem. The fitness function in this method converts the quality of candidate solutions into quantifiable values. In this model, the fitness function
quantifies the quality of a solution based on the total cost and the degree of constraint violation, defined as follows:
Here,
K denotes the total number of constraints, and
represents the total actual operating cost of each scheduling plan, obtained via the following formula
represents the degree of violation of the
kth constraint (e.g., the green power consumption ratio constraint can be defined as
);
is the corresponding penalty coefficient. To ensure that the algorithm converges rapidly to the feasible region, given that the objective scale in the current scenario is approximately
yuan, selecting a penalty coefficient two orders of magnitude higher ensures that the penalty term resulting from any constraint violation dominates the fitness value, thereby rapidly eliminating infeasible solutions early in the population evolution. Second, this setting aligns with common practices in some heuristic algorithms for solving strongly constrained scheduling problems [
12,
23]; therefore, the penalty coefficient
for all constraints is uniformly set
.
3. Heuristic repair function: To quickly repair infeasible solutions that may arise from neighborhood operations, this paper designs a heuristic repair function that repairs critical constraints in order of priority:
Minimum On/Off Time Repair: Scan the operating sequence of each pump. If the continuous operating time is , extend the sequence backward or forward until the requirement is met; if the continuous idle time is , extend the idle period or directly start the pump.
Green Power Absorption Rate Repair: Calculate the current green power absorption rate r. If , randomly activate eligible idle pumps during periods of sufficient green power; if , randomly deactivate eligible running pumps during periods of scarce green power.
Pipeline Flow Safety Correction: For each pipeline k and time slot t, if the flow rate , select a pump from the associated pumps to start; if , shut down some of the running pumps.
Power Ramp Constraint Adjustment: Check the power change between adjacent time slots; if it exceeds the ramp rate R, limit the change to R and adjust the corresponding operating state.
Pipeline Shutdown Duration Correction: Check the continuous shutdown duration for each pipeline; if it exceeds , insert an operational period at the midpoint of the shutdown duration and trigger restart heating.
The repair function is called after each neighborhood operation, employing a selective repair strategy: based on the type of neighborhood operation, only the constraints most likely to be violated are repaired, ensuring the algorithm efficiently generates feasible solutions.
4. VNS Neighborhood Structure and Perturbation Mechanisms: For clarity, the following simplified example illustrates the operations of the three types of neighborhoods. Suppose we have a scheduling matrix with 4 pumps and 8 time slots (rows = pumps, columns = time slots, 1 = running, 0 = stopped), where time slots 4 and 5 are marked in green to indicate peak green power generation periods:
Assuming the peak-hour rate (time slots 3–4) is 1.0 yuan/kWh, the off-peak rate (time slots 7–8) is 0.5 yuan/kWh, and the rate for all other time slots is 0.75 yuan/kWh, and assuming green power is used exclusively during peak output periods, the cost of purchased electricity (simplified calculation) is approximately: 3 (peak segment) + 5.25 (flat segment) + 1.5 (trough segment) = 9.75 yuan.
(1) Bit Flip Neighborhood (N1) Randomly select a small number of positions in the matrix to flip their states (0 ↔ 1); this method has the smallest impact and is suitable for later fine-tuning. Without disrupting optimal patterns, it precisely increases the load during periods of ample green power or off-peak hours, achieving minor cost adjustments or improved green power absorption. Example: During flat-rate period 5 (price 0.75), flip the 5th bit of Pump 1 from 0 to 1:
The cost becomes: 3 (peak segment) + 5.25 (flat segment) + 1.5 (trough segment) = 9.75 yuan (fine-tuning during green power output peaks keeps costs unchanged while increasing green power absorption rates; this demonstrates the fine-tuning capability, which is typically used later to precisely reduce inefficient operating costs).
(2) Price-Guided Start–Stop Adjustment (N2) Identify peak and off-peak periods; shut down certain pumps during peak periods and start certain pumps during off-peak periods. By directly responding to price signals, this approach achieves “peak shaving and off-peak utilization,” significantly reducing the cost of purchased electricity during high-price periods while leveraging the economic advantages of off-peak periods to improve search efficiency. Example: During peak periods (time slots 3–4), Pumps 1 and 3 are shut down; during off-peak periods (time slots 7–8), Pumps 1 and 4 are activated:
The cost becomes: 1 (peak segment) + 5.25 (flat segment) + 2 (trough segment) = 8.25 yuan (a reduction of 1 yuan from the original cost).
(3) Block Move (N3) Identify complete “operating blocks” that satisfy the minimum continuous operating time, and shift them as a whole along the time axis; implement the block move scheduling scheme to transfer the load from peak electricity periods to off-peak or green electricity peak periods as a whole. This naturally satisfies the minimum start–stop time constraint and is particularly suitable for large-scale load migration in the medium term, achieving global optimization of cost and green electricity consumption.
Example: Shift the operation block for Pump 1 (time slots 1–4) two time slots to the right (to time slots 3–6, while still satisfying the minimum continuous operation time). The red box indicates the target operation block:
The cost becomes: 3 (peak segment) + 4.5 (flat segment) + 1.5 (trough segment) = 9 yuan (since shifting the operational time blocks to periods of high green power output significantly reduces costs). After executing the three neighborhoods sequentially, the heuristic repair function is immediately invoked for each to ensure the new solution is feasible. This multi-scale collaborative approach enables the algorithm to rapidly construct feasible, high-quality solutions early on while continuously refining them later, thereby achieving higher green power absorption rates and lower total costs under strong constraints.
When the number of consecutive unimproved iterations for a food source exceeds the threshold
, a local flip perturbation is applied to the current solution to generate a new candidate solution (flipping the on/off state of the local time pump):
The perturbation operation is specifically defined as:
In (19), is an independent uniform random variable, and the perturbation intensity parameter is p (i.e., approximately of the decision bits in the random flip matrix). After the perturbation is complete, the stall count is reset to 0.
4. Conclusions
This paper addresses the issues of insufficient green power integration and high operating costs in long-distance crude oil transmission systems. A mixed-integer linear programming (MILP) model was constructed with the dual objectives of maximizing green power integration and minimizing the cost of purchased electricity. The model comprehensively incorporates stringent operational constraints, including equipment start-up and shutdown logic, minimum continuous operation and downtime requirements, pipeline shutdown tolerance, and flow safety margins.
To solve this high-dimensional, strongly constrained discrete optimization problem, a hybrid artificial bee colony algorithm integrating a memory-guided mechanism and variable neighborhood search (HABC-VNS) was proposed. Through innovations such as binary matrix encoding, discrete uniform crossover, three problem-oriented neighborhood structures (bit flipping, price-guided start–stop adjustment, and block shifting), heuristic repair mechanisms, and mild perturbation strategies, the algorithm significantly improves both solution efficiency and robustness.
Simulation results across different scales demonstrate the effectiveness of the proposed approach. In Experiment (1), the HABC-VNS algorithm achieved the lowest average total cost of 33,000 yuan and the highest average green power absorption rate of 61.6% over 50 independent runs. In the larger-scale Experiment (2) with eight pumps, it maintained superior performance with an average cost of 43,000 yuan and a green power absorption rate of 59.6%, substantially outperforming standard ABC, Binary PSO, and GA in both economic and environmental metrics. Furthermore, in a realistic eight-pump 24-h scenario, HABC-VNS obtained a total cost of 70,386 CNY in only 0.9 s, compared to 72,850 CNY and 8.5 s required by the commercial MILP solver (CBC), highlighting its excellent solution quality and computational efficiency.
However, the current model relies on relatively accurate forecasts of green power output and does not fully consider the stochastic uncertainty of PV and wind power generation. Additionally, the experiments were conducted only in simulated scenarios of limited scale. The real-time performance of the algorithm in ultra-large-scale systems or under extreme weather conditions still requires further validation.
Future research could introduce stochastic or robust optimization frameworks to better handle renewable energy uncertainties, incorporate deep learning models for ultra-short-term renewable energy forecasting, and explore multi-objective evolutionary algorithms combined with distributed computing techniques. These enhancements would further improve the algorithm’s applicability in large-scale, multi-station coordinated scheduling scenarios, providing more universal and robust technical support for the deep integration of renewable energy and intelligent operation in energy-intensive industries.