Method for detecting and correcting multiple conflicts of berth scheduling based on genetic algorithm

CN122905281APending Publication Date: 2026-10-13THE 20TH RESEARCH INSTITUTE OF CHINA ELECTRONICS TECHNOLOGY GROUP CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611038412.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-13
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

本发明解决了现有遗传调度方法中冲突类型定义不清、修复动作缺乏闭环以及特殊船舶结构合法性难以保障的问题

Benefits of technology

[0083]本发明改进型遗传算法不是泛指传统遗传算法,而是至少包括以下四项改进内容:一是采用合法泊位候选集约束初始化,仅在满足船长、尾跳方向和作业属性的泊位集合中分配资源;二是采用优先级锁定交叉,保持高优先级船舶在染色体中的相对先后顺序;三是采用定向变异,仅对存在冲突标记的低优先级船舶或拥堵区船舶执行泊位替换或时间偏移;四是采用带罚函数的适应度计算,将冲突严重度、等待时间和泊位空置损失同时纳入评价;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122905281A_ABST
    Figure CN122905281A_ABST
Patent Text Reader

Abstract

The application discloses a berth scheduling multiple conflict identification detection and correction method based on a genetic algorithm, belongs to the technical field of intelligent optimization of port berth scheduling, and relates to the following technical scheme: a scheduling processor reads a ship set, a berth set and scheduling period data in advance, and constructs a legal berth candidate set; double-layer chromosomes are generated under the constraint of the legal berth candidate set; an initial scheduling solution is obtained through an improved genetic algorithm; conflict record tables are written according to conflict classification rules; conflicts are sorted according to conflict severity; corresponding repair strategy libraries are called to sequentially complete repair of structural conflicts, time conflicts, resource conflicts, priority conflicts and local congestion conflicts; after each repair, only the affected berth interval is subjected to incremental refresh detection; in the global verification stage, fitness reevaluation and rollback judgment are completed; and finally, an optimal berth scheduling scheme is output. The application solves the problems of unclear conflict type definition, lack of closed-loop repair action and difficulty in guaranteeing the legality of special ship structures in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of port berth scheduling and intelligent optimization technology, specifically to a method for identifying, detecting, and correcting multiple conflicts in berth scheduling based on a genetic algorithm. Background Technology

[0002] In berth scheduling scenarios involving multiple vessels arriving consecutively, the scheduling results are not only affected by vessel arrival times, operation durations, and berth lengths, but also by factors such as tail-hopping berthing direction, high-priority task guarantees, local berth congestion, and temporary resource contraction. These constraints exhibit temporal, spatial, and priority coupling characteristics. When the scheduling algorithm only provides vessel ordering results or only berth allocation results, it is often difficult to guarantee the stable feasibility of the generated solution.

[0003] In existing technologies, one type of method focuses on the joint allocation and robust optimization of berths and quay cranes, while another type focuses on spatiotemporal constraint modeling, scheduling simulation, or generalized conflict optimization. Although the above methods can improve some scheduling performance indicators, they often lack fine-grained conflict identification chains and hierarchical repair chains that address the problem of infeasible individuals easily generated after crossover and mutation in genetic algorithms.

[0004] Specifically, existing methods generally have the following shortcomings: First, structural legality constraints are not implemented upfront during the coding phase, which may result in special vessels such as long vessels and vessels with stern jumps being assigned to illegal berths during the initialization phase; second, the conflict resolution phase only makes a general judgment on whether a conflict exists, without establishing a conflict record table, severity scoring rules, and a mapping relationship between corresponding repair actions; third, the repair phase mostly adopts global rearrangement or single-step extension, which can easily trigger chain conflicts and cause high-priority vessels to have their resources squeezed out by low-priority vessels.

[0005] Therefore, there is a need for a berth scheduling multi-conflict identification, detection and correction method that can be embedded in the genetic algorithm evolution process. This method enables the scheduling processor to quickly identify the affected areas after chromosome generation, crossover, mutation and local adjustment, perform repair according to preset rules, and complete incremental refresh and fitness re-evaluation after repair, thereby continuously outputting feasible and stable berth scheduling schemes. Summary of the Invention

[0006] The purpose of this invention is to provide a method for identifying, detecting, and correcting multiple conflicts in berth scheduling based on a genetic algorithm, belonging to the field of intelligent optimization technology for port berth scheduling. The scheduling processor pre-reads ship set, berth set, and scheduling cycle data to construct a legal berth candidate set; generates a two-layer chromosome under the constraints of the legal berth candidate set; obtains an initial scheduling solution through an improved genetic algorithm; writes the solution into a conflict record table according to conflict classification rules; sorts the conflict records according to conflict severity; calls the corresponding repair strategy library to sequentially complete the repair of structural conflicts, time conflicts, resource conflicts, priority conflicts, and local congestion conflicts; performs incremental refresh detection only on the affected berth intervals after each repair; completes fitness re-evaluation and rollback judgment in the global verification stage; and finally outputs the optimal berth scheduling scheme. This invention solves the problems of unclear conflict type definition, lack of closed-loop repair actions, and difficulty in ensuring the legality of special ship structures in existing genetic scheduling methods.

[0007] To avoid overly generalized scoring and weighting settings, the scheduler configures the severity weight coefficients α1–α4 and fitness weight coefficients w1–w4 as selectable range parameters. The severity weight coefficients α1–α4 satisfy 0 ≤ αk ≤ 1 and Σαk = 1; the fitness weight coefficients w1–w4 satisfy wq > 0 and are calibrated according to port business preferences. The parameter ranges for the severity and fitness weight coefficients ensure that this invention can be reproduced and implemented at different port data scales.

[0008] A method for identifying, detecting, and correcting multiple conflicts in berth scheduling based on genetic algorithms, such as Figure 1 As shown, it includes the following steps:

[0009] Step S1: The scheduling processor reads ship data and berth resource data;

[0010] Step S2: Calculate the candidate set B(v) of legal berths based on ship data and berth resource data.

[0011] Step S3: Construct double-layered chromosome C;

[0012] Based on the two-layer chromosome C, and combined with the legal berth candidate set B(v), an executable initial scheduling solution is generated;

[0013] Step S4, execute the improved genetic algorithm for evolution:

[0014] By using the legal berth candidate set B(v) as a constraint, the candidate scheduling solutions to be detected are obtained;

[0015] Step S5, perform conflict classification and conflict detection:

[0016] The conflicts in the candidate scheduling solutions are classified into categories, reproducible judgment rules are configured for each type of conflict, and each conflict is written into the conflict record table.

[0017] Step S6: For different conflict types in the conflict log table, perform repairs in order of conflict severity.

[0018] Step S7: Perform incremental refresh and global verification;

[0019] Step S8: Perform fitness reassessment and rollback decision.

[0020] Furthermore, in step S1, the vessel data includes the vessel number, estimated arrival time, planned operation duration, vessel length, priority level, stern jump sign, and maximum allowable waiting time;

[0021] The berth resource data includes berth number, terminal number, berth length, supported berthing directions, available service time window, and regional load threshold.

[0022] Furthermore, in step S2, berth b in the legal berth candidate set B(v) should satisfy the following condition:

[0023] The berth length Lb of berth b is greater than or equal to the sum of the ship length Lv and the safety margin ΔL. The berth direction set Dirb contains the ship's allowed berthing direction Dirv. When there is an intersection between the berth time window and the ship's available service time window, the scheduling processor adds berth b to the legal berth candidate set B(v). When the ship v is a stern-jumping ship, only stern-jumping compatible berths are retained.

[0024] The scheduling processor calculates the legal berth candidate set B(v) based on the vessel v.

[0025] The output of step S2 is used to limit the search space for subsequent encoding, crossover, mutation, and forced migration.

[0026] Furthermore, in step S3, the double-layered chromosome C includes the sequence gene Gseq and the resource gene Gres;

[0027] The sequence gene Gseq is used to record the berthing order of ships, and each gene unit in the resource gene Gres contains at least the berth number, planned start time, reserved buffer amount, and repair marker.

[0028] During decoding, the scheduler reads the resource gene Gres ship by ship in the order of the sequential gene Gseq, and combines it with the legal berth candidate set B(v) to generate an executable initial scheduling solution.

[0029] Furthermore, in step S4, the improved genetic algorithm is an improvement on the traditional genetic algorithm, including the following processes:

[0030] First, the legal berth candidate set B(v) constraint is adopted: the scheduler first generates an initial population that satisfies the legal berth candidate set B(v) constraint, and allocates resources only from the berth set that satisfies the ship length, stern jump direction and operation attributes;

[0031] Then, priority locking crossover is used; priority locking crossover is used to maintain the relative order of high-priority vessels from being disrupted by low-priority vessels.

[0032] The high-priority vessels are those whose priority level reaches or exceeds the preset threshold Pthr; the low-priority vessels are those whose priority level is below the preset threshold Pthr; wherein Pthr is set by the scheduling processor according to the port business rules and is a value that is the 2 / 3 quantile of the total number of priority levels.

[0033] Next, targeted mutation is used to remap low-priority vessels with conflict markers to spare berths or to shift the planned start time to a feasible time slot.

[0034] Finally, a fitness calculation with a penalty function is used to simultaneously incorporate conflict severity, waiting time, and berth vacancy loss into the evaluation.

[0035] Furthermore, in step S5, the conflict classification and conflict detection process is as follows:

[0036] Step 5.1: The scheduling processor classifies the conflicts in the candidate scheduling solutions into five categories: time conflicts, berth resource conflicts, structural conflicts, priority conflicts, and local congestion conflicts, and configures reproducible judgment rules for each type of conflict.

[0037] The rule for determining time conflicts is as follows: For two adjacent vessels vi and vj at the same berth b, let si and sj be the planned start times and ei and ej respectively, and let the following formula be satisfied: If they meet the following conditions, then a time conflict is determined:

[0038] si < ej and ei > sj;

[0039] Where si and ei are the planned start and completion times of vessel vi at berth b, respectively; sj and ej are the planned start and completion times of vessel vj, respectively.

[0040] The two adjacent vessels refer to the two adjacent vessels after being sorted according to the planned start time on berth b;

[0041] The berth resource conflict determination rule is as follows: using the wharf w and time slot τ as statistical units, calculate the planned number of occupied berths Nocc(τ,w) and the number of available berths Navail(τ,w). When Nocc(τ,w) > Navail(τ,w), it is determined to be a berth resource conflict.

[0042] The rule for determining structural conflicts is as follows: when the ship length Lv is greater than the difference between the berth length Lb and the safety margin ΔL, or when the ship berthing direction Dirv does not belong to the set of directions that the berth can support, it is determined to be a structural conflict.

[0043] The priority conflict determination rule is as follows: when the waiting time Whigh of a high-priority vessel is greater than the waiting time Wlow of a low-priority vessel at the same berth and exceeds the threshold ΔW, or when a high-priority vessel is assigned to a preset set of inferior berths, it is determined to be a priority conflict.

[0044] The rule for determining local congestion conflicts is as follows: when the continuous operation intensity Load(b,Tw) of the berth section within the sliding window Tw exceeds the load threshold Loadmax(b), it is determined to be a local congestion conflict.

[0045] Step 5.2: Write each conflict into the conflict record table:

[0046] Each conflict record should include at least the conflict number, conflict type, vessel number, berth number, conflict start time, conflict end time, severity score, and recommended remedial action.

[0047] The severity score Sconf is obtained by weighting the time overlap duration (Tov), resource or structural exceedance (Rex), high-priority impact coefficient (Pimp), and potential cascading impact coefficient (Cchain), i.e.:

[0048] Sconf = α1·Tov + α2·Rex + α3·Pimp + α4·Cchain;

[0049] Wherein, α1, α2, α3 and α4 represent the weights of the time overlap duration Tov, the resource or structural overrun degree Rex, the high priority influence coefficient Pimp and the potential chain effect coefficient Cchain, respectively.

[0050] Berth vacancy loss Ib is calculated based on the number of idle slots or the idle duration of berth b within the scheduling cycle:

[0051] Ib = Σ|IdleSlots(b)|;

[0052] Where IdleSlots(b) represents the set of idle time slots for berth b within the scheduling period; |IdleSlots(b)| represents the size (number or duration) of the set of idle time slots.

[0053] The penalty value Ppri for priority default is calculated by combining the waiting threshold exceeding the highest priority and the resource downgrade of the highest priority:

[0054] Ppri=Σmax(0,Whigh-Wthr)+γ·ΣI(b∈Bpoor);

[0055] Where Wthr is the waiting threshold, Bpoor is the set of substandard berths, γ is the positive weighting coefficient, and I(·) is the indicator function, which takes the value 1 when the condition is met and 0 otherwise.

[0056] To facilitate reproducibility, Rex is quantified using the excess ratio: when the excess is structural, Rex = max(0,(Lv+ΔL-Lb) / Lb); when the excess is resource, Rex = max(0,(Nocc(τ,w)-Navail(τ,w)) / Navail(τ,w)); Pimp is quantified by the waiting time of high-priority vessels in default or the number of high-priority vessels affected.

[0057] Pimp=Σmax(0,Whigh-Wthr);

[0058] Step 5.3: After generating the conflict record table, the scheduler sorts each conflict record in the conflict record table from high to low according to the severity score Sconf; when Sconf is equal, it sorts them in order of priority impact Pimp from high to low, time overlap duration Tov from high to low, and conflict start time from early to late.

[0059] Recommended repair actions are selected from a pre-defined repair strategy library based on the conflict type field, and determined using the criteria of minimizing the objective function increment and minimizing disturbance to high-priority vessel scheduling; for ease of implementation, the cascading effect coefficient Cchain is calculated from the number of affected vessels Nship and the number of affected berths Nberth.

[0060] Cchain=β1×Nship+β2×Nberth;

[0061] Among them, β1 and β2 are positive weighting coefficients.

[0062] Furthermore, in step S6, the method for performing repairs in order of conflict severity is as follows:

[0063] The scheduler performs repairs in the order they are repaired, which is designed to prevent repaired structural conflicts from being broken again in subsequent lower-level repairs.

[0064] The repair order is as follows: first repair structural conflicts, then repair time conflicts and berth resource conflicts, then priority conflicts, and finally repair local congestion conflicts.

[0065] For different conflict types in the conflict log table, the scheduler performs the following categorized repair actions:

[0066] When a structural conflict exists in the conflict log table, the scheduling processor re-screens the target berth from the legal berth candidate set B(v) and selects the berth that minimizes the increment of the objective function as the migration result; when the candidate berth set is empty, the scheduling processor marks the ship as unrepairable and applies a high penalty value to the fitness function.

[0067] When a time conflict exists in the conflict log table, the scheduler first performs time shift repair: the scheduler calculates the earliest conflict-free start time of the conflicting vessel at the original berth and determines whether the waiting time after the time shift exceeds the maximum allowable waiting time; if it does not exceed the maximum allowable waiting time, the scheduled start time is updated; if it exceeds the maximum allowable waiting time, the berth replacement repair is called, and the backup berth with the largest possible time gap is searched in the legal berth candidate set B(v);

[0068] When there are berth resource conflicts in the conflict log table, the scheduling processor counts the number of available berths and planned berths within a given time window on a per-berth basis, and performs relocation of excess vessels to nearby berths or postponement of time according to priority from low to high; when relocating to nearby berths, the scheduling processor prioritizes the backup berth with the smallest increase in transportation distance and without introducing new structural conflicts.

[0069] When a priority conflict exists in the conflict log table, the scheduling processor initiates a priority rearrangement repair: the scheduling processor first locks the order and target berth of the high-priority vessel, and then performs partial relocation, partial postponement, or alternative berth relocation for the low-priority vessel; when priority repair would cause a new serious structural conflict or time conflict, the scheduling processor retains the original high-priority plan and searches for alternative positions for the low-priority vessel again.

[0070] When a local congestion conflict exists in the conflict log, the scheduling processor first identifies the idle time gaps within the berth section, and then inserts vessels with shorter operation times and lower priorities into the idle time gaps. If the load threshold is still exceeded after the gap is repaired, the scheduling processor will relocate the low-priority vessels that meet the relocation conditions to berths with lighter loads in the same area to achieve load balancing.

[0071] Furthermore, in step S7, the specific method for performing incremental refresh and global verification is as follows:

[0072] Step 7.1: After each repair is completed, the scheduling processor extracts the affected berth set Baff and the affected time window [ts,te] to form a local refresh area R, and performs conflict re-check only on the local refresh area R to replace global rescan.

[0073] R = { (b, t) | b ∈ Baff and t ∈ [ts−Δt, te+Δt]};

[0074] Where Δt is the refresh margin, used to cover the boundary effects caused by the repair; by only re-detecting the R conflict, the detection complexity is reduced from O(|B|·|T|) to O(|Baff|·|[ts,te]|), thereby improving the iteration speed and real-time performance; t is a time variable, representing the time in the local refresh region; ts is the start time of the affected time window (s = start); te is the end time of the affected time window (e = end); |B| is the size of the berth set B (total number of berths); |T| is the size of the time slot set T (total number of time slots); |B|·|T| is the number of berths × the number of time slots, that is, the total number of "berth-time" units that need to be traversed in the global scan;

[0075] Step 7.1: After crossover and mutation, the scheduler performs a fast repair phase, processing only the subset of ships directly affected by the genetic operation; before fitness evaluation, it performs a global verification phase to eliminate secondary chain conflicts remaining after fast repair.

[0076] If time conflicts, structural conflicts, or berth resource conflicts are still detected during the global verification phase, the scheduler returns to step S6 to continue the repair. When the number of consecutive repairs reaches the preset limit and the conflict still cannot be eliminated, the scheduler imposes a high penalty on the current individual and triggers a rollback judgment to prevent infeasible individuals from entering the next generation.

[0077] Furthermore, in step S8, the specific method for performing fitness re-evaluation and rollback judgment is as follows:

[0078] The scheduler calculates the fitness function F for each repaired individual and optimizes it by minimizing F. The fitness function is in a weighted form.

[0079] F = w1·Σ Wv + w2·Σ Ib + w3·Σ Sconf + w4·Σ Ppri;

[0080] Wherein, ΣWv is the sum of waiting times for all vessels; ΣIb is the sum of vacancy losses for all berths; ΣSconf is the sum of residual conflict severity; and ΣPpri is the sum of priority default penalties.

[0081] If the fitness after repair is higher than that of the parent individual and the number of new serious conflicts increases, the scheduler will roll back to the parent individual and increase the penalty coefficient of the corresponding repair action; if the fitness after repair is not higher than that of the parent individual, the repair result will be retained for the next generation iteration; when the maximum number of iterations is reached or the optimal value of consecutive Gstag generations no longer improves, the optimal berth scheduling scheme will be output; Gstag∈[5, 20], with a value of 10.

[0082] Compared with the prior art, the technical effects of the present invention are as follows:

[0083] The improved genetic algorithm of this invention does not refer to the traditional genetic algorithm in general, but includes at least the following four improvements: First, it uses a legal berth candidate set constraint initialization, allocating resources only from the set of berths that meet the requirements of ship length, stern jump direction, and operational attributes; second, it uses priority-locked crossover to maintain the relative order of high-priority ships in the chromosome; third, it uses directed mutation, performing berth replacement or time offset only on low-priority ships with conflict markers or ships in congested areas; and fourth, it uses fitness calculation with a penalty function, simultaneously incorporating conflict severity, waiting time, and berth vacancy loss into the evaluation.

[0084] This invention brings structural constraints to the encoding stage by using a legal berth candidate set and a two-layer chromosome, unlike methods that only perform general conflict checking after scheduling results are generated. This invention forms an executable repair chain through a conflict record table, severity score, and repair action mapping, unlike methods that only describe the existence of conflicts without defining the repair order. This invention reduces the proportion of infeasible individuals and the overhead of repeated detection through a rapid repair stage, a global verification stage, and an incremental refresh mechanism. This invention improves the scheduling stability of high-priority vessels through priority locking crossover and priority rearrangement repair.

[0085] The scheduler of this invention first performs a fast repair phase after crossover and mutation, and then performs a global verification phase before fitness evaluation; the fast repair phase only processes the ship set directly affected by the current genetic operation; the global verification phase is used to eliminate secondary chain conflicts that still remain after fast repair; the repair structure of the fast repair phase and the global verification phase can significantly reduce the proportion of infeasible individuals. Attached Figure Description

[0086] Figure 1 This is an overall flowchart of the berth scheduling multi-conflict identification, detection and correction method based on genetic algorithm of the present invention. Figure 1 The process shown sequentially illustrates the steps of inputting basic data, generating a set of legal berth candidates, constructing a two-layer chromosome, executing an improved genetic algorithm, establishing a conflict record table, performing repair actions, incremental refreshing and fitness re-evaluation, and outputting the optimal scheduling scheme.

[0087] The construction method of the local refresh region R is the same as that in step S7, that is, it is determined by the affected berth set Baff, the affected time window [ts,te] and the refresh margin Δt. Detailed Implementation

[0088] The following is combined with Figure 1 The embodiments of the present invention will be described in detail below. The following embodiments are used to illustrate the technical solutions of the present invention and do not limit the scope of protection of the present invention.

[0089] In one embodiment, the scheduling cycle is set to 24 hours, with 6 vessels participating in the scheduling and 4 berths. Each vessel includes at least its estimated arrival time, planned operation duration, length, priority level, and stern jump flag. Each berth includes at least its berth length, available service time window, berthing direction, and affiliated terminal identifier. The scheduling processor first constructs a set of legal berth candidates for each of the 6 vessels according to step S2. For example, for long vessels and stern jump vessels, the scheduling processor only retains berths that meet the length margin and stern jump direction requirements.

[0090] Subsequently, the scheduler processor generates an initial two-layer chromosome based on step S3. The sequence gene Gseq records the berthing order of the six ships, and the resource gene Gres records the target berth, planned start time, reserved buffer size, and repair marker for each ship. Since the candidate set of legal berths has been pre-constructed, the number of illegal berth allocations in the initial population is significantly reduced. The scheduler processor then executes the priority-locking crossover and directed mutation in step S4 to generate several candidate scheduling solutions.

[0091] After candidate scheduling solutions are generated, the scheduling processor executes step S5. Assuming vessel 3 and vessel 4 are assigned to the same berth and their time intervals overlap, the scheduling processor writes a time conflict record; assuming vessel 5 is a tail-jump vessel but is assigned to a berth that does not support tail-jump directions, the scheduling processor writes a structural conflict record; assuming vessel 1 is a high-priority vessel but its waiting time is longer than that of vessel 2, the scheduling processor writes a priority conflict record. The scheduling processor sorts the above conflicts according to the severity scoring rules.

[0092] In step S6, the scheduler first handles the structural conflict corresponding to vessel 5. The scheduler selects the backup berth with the smallest objective function increment from the set of legal berth candidates for vessel 5 and updates the planned start time synchronously. Subsequently, the scheduler handles the time conflict between vessel 3 and vessel 4, first attempting to move vessel 4 to the earliest conflict-free time point at its original berth; if the waiting time after the move exceeds a threshold, it then calls upon a backup berth for insertion. Finally, the scheduler performs a local rearrangement of the priority disorder between vessel 1 and vessel 2, maintaining the berthing priority of vessel 1.

[0093] After each repair is completed, the scheduler only re-performs conflict detection on the local refresh area R consisting of the affected berths and the affected time windows, instead of repeatedly scanning all berths and all time windows. If new local congestion conflicts occur within the local refresh area R, the scheduler will further perform gap repair or load balancing migration.

[0094] In step S8, the scheduling processor recalculates the fitness of the repaired candidate scheduling solutions. If the repair result simultaneously reduces the total waiting time and residual conflict penalty, the candidate scheduling solution is retained; if the repair result leads to an increase in new severe structural conflicts or a significant deterioration in the total fitness, the process is rolled back to the parent individual and the penalty coefficient of the current repair action is increased. After multiple iterations, the scheduling processor outputs the optimal berth scheduling scheme that satisfies structural legality, time feasibility, and priority constraints.

[0095] This embodiment illustrates that the present invention does not generalize to perform conflict optimization for ship scheduling. Instead, it continuously suppresses the spread of infeasible individuals during the evolution of the genetic algorithm by using a legal berth candidate set, a two-layer chromosome, a conflict record table, a two-stage repair and incremental refresh mechanism, thereby improving the feasibility, stability and computational efficiency of the berth scheduling scheme.

Claims

1. A method for identifying, detecting, and correcting multiple conflicts in berth scheduling based on genetic algorithms, characterized in that, Includes the following steps: Step S1: The scheduling processor reads ship data and berth resource data; Step S2: Calculate the candidate set B(v) of legal berths based on ship data and berth resource data. Step S3: Construct double-layered chromosome C; Based on the two-layer chromosome C, and combined with the legal berth candidate set B(v), an executable initial scheduling solution is generated; Step S4, execute the improved genetic algorithm for evolution: By using the legal berth candidate set B(v) as a constraint, the candidate scheduling solutions to be detected are obtained; Step S5, perform conflict classification and conflict detection: The conflicts in the candidate scheduling solutions are classified into categories, reproducible judgment rules are configured for each type of conflict, and each conflict is written into the conflict record table. Step S6: For different conflict types in the conflict log table, perform repairs in order of conflict severity. Step S7: Perform incremental refresh and global verification; Step S8: Perform fitness reassessment and rollback decision.

2. The method for identifying, detecting, and correcting multiple conflicts in berth scheduling based on genetic algorithms according to claim 1, characterized in that, In step S1, the vessel data includes vessel number, estimated arrival time, planned operation duration, vessel length, priority level, stern jump sign, and maximum allowable waiting time; The berth resource data includes berth number, terminal number, berth length, supported berthing directions, available service time window, and regional load threshold.

3. The method for identifying, detecting, and correcting multiple conflicts in berth scheduling based on genetic algorithms according to claim 1, characterized in that, In step S2, berth b in the legal berth candidate set B(v) should satisfy the following condition: The berth length Lb of berth b is greater than or equal to the sum of the ship length Lv and the safety margin ΔL. The berth direction set Dirb contains the ship's allowed berthing direction Dirv. When there is an intersection between the berth time window and the ship's available service time window, the scheduling processor adds berth b to the legal berth candidate set B(v). When the ship v is a stern-jumping ship, only stern-jumping compatible berths are retained. The scheduling processor calculates the legal berth candidate set B(v) based on the vessel v.

4. The method for identifying, detecting, and correcting multiple conflicts in berth scheduling based on genetic algorithms according to claim 1, characterized in that, In step S3, the double-layered chromosome C includes the sequence gene Gseq and the resource gene Gres; The sequence gene Gseq is used to record the berthing order of ships, and each gene unit in the resource gene Gres contains at least the berth number, planned start time, reserved buffer amount, and repair marker. During decoding, the scheduler reads the resource gene Gres ship by ship in the order of the sequential gene Gseq, and combines it with the legal berth candidate set B(v) to generate an executable initial scheduling solution.

5. The method for identifying, detecting, and correcting multiple conflicts in berth scheduling based on genetic algorithms according to claim 1, characterized in that, In step S4, the improved genetic algorithm is an improvement on the traditional genetic algorithm, including the following processes: First, the legal berth candidate set B(v) constraint is adopted: the scheduler first generates an initial population that satisfies the legal berth candidate set B(v) constraint, and allocates resources only from the berth set that satisfies the ship length, stern jump direction and operation attributes; Then, priority locking crossover is used; priority locking crossover is used to maintain the relative order of high-priority vessels from being disrupted by low-priority vessels. The high-priority vessels are those whose priority level reaches or exceeds the preset threshold Pthr; the low-priority vessels are those whose priority level is below the preset threshold Pthr; wherein Pthr is set by the scheduling processor according to the port business rules. Next, targeted mutation is used to remap low-priority vessels with conflict markers to spare berths or to shift the planned start time to a feasible time slot. Finally, a fitness calculation with a penalty function is used to simultaneously incorporate conflict severity, waiting time, and berth vacancy loss into the evaluation.

6. The method for identifying, detecting, and correcting multiple conflicts in berth scheduling based on genetic algorithms according to claim 1, characterized in that, In step S5, the conflict classification and conflict detection process is performed as follows: Step 5.1: The scheduling processor classifies the conflicts in the candidate scheduling solutions into five categories: time conflicts, berth resource conflicts, structural conflicts, priority conflicts, and local congestion conflicts, and configures reproducible judgment rules for each type of conflict. The rule for determining time conflicts is as follows: For two adjacent vessels vi and vj at the same berth b, let si and sj be the planned start times and ei and ej respectively, and let the following formula be satisfied: If they meet the following conditions, then a time conflict is determined: si < ej and ei > sj; Where si and ei are the planned start and completion times of vessel vi at berth b, respectively; sj and ej are the planned start and completion times of vessel vj, respectively. The two adjacent vessels refer to the two adjacent vessels after being sorted according to the planned start time on berth b; The berth resource conflict determination rule is as follows: using the wharf w and time slot τ as statistical units, calculate the planned number of occupied berths Nocc(τ,w) and the number of available berths Navail(τ,w). When Nocc(τ,w) > Navail(τ,w), it is determined to be a berth resource conflict. The rule for determining structural conflicts is as follows: when the ship length Lv is greater than the difference between the berth length Lb and the safety margin ΔL, or when the ship berthing direction Dirv does not belong to the set of directions that the berth can support, it is determined to be a structural conflict. The priority conflict determination rule is as follows: when the waiting time Whigh of a high-priority vessel is greater than the waiting time Wlow of a low-priority vessel at the same berth and exceeds the threshold ΔW, or when a high-priority vessel is assigned to a preset set of inferior berths, it is determined to be a priority conflict. The rule for determining local congestion conflict is as follows: when the continuous operation intensity Load(b,Tw) of the berth section within the sliding window Tw exceeds the load threshold Loadmax(b), it is determined to be a local congestion conflict. Step 5.2: Write each conflict into the conflict record table: Each conflict record should include at least the conflict number, conflict type, vessel number, berth number, conflict start time, conflict end time, severity score, and recommended remedial action. The severity score Sconf is obtained by weighting the time overlap duration (Tov), resource or structural exceedance (Rex), high-priority impact coefficient (Pimp), and potential cascading impact coefficient (Cchain), i.e.: Sconf = α1·Tov + α2·Rex + α3·Pimp + α4·Cchain; Wherein, α1, α2, α3 and α4 represent the weights of the time overlap duration Tov, the resource or structural overrun degree Rex, the high priority influence coefficient Pimp and the potential chain effect coefficient Cchain, respectively. Berth vacancy loss Ib is calculated based on the number of idle slots or the idle duration of berth b within the scheduling cycle: Ib = Σ|IdleSlots(b)|; Where IdleSlots(b) represents the set of idle time slots for berth b within the scheduling period; |IdleSlots(b)| represents the size of the set of idle time slots. The penalty value Ppri for priority default is calculated by combining the waiting threshold exceeding the highest priority and the resource downgrade of the highest priority: Ppri=Σmax(0,Whigh-Wthr)+γ·ΣI(b∈Bpoor); Where Wthr is the waiting threshold, Bpoor is the set of substandard berths, γ is the positive weighting coefficient, and I(·) is the indicator function, which takes the value 1 when the condition is met and 0 otherwise. Rex is quantified using the over-limit ratio: when it is a structural over-limit, Rex = max(0,(Lv+ΔL-Lb) / Lb); when it is a resource over-limit, Rex = max(0,(Nocc(τ,w)-Navail(τ,w)) / Navail(τ,w)); Pimp is quantified by the waiting time of high-priority vessels in default or the number of high-priority vessels affected. Pimp=Σmax(0,Whigh-Wthr); Step 5.3: After generating the conflict record table, the scheduler sorts each conflict record in the conflict record table from high to low according to the severity score Sconf; when Sconf is equal, it sorts them in order of priority impact Pimp from high to low, time overlap duration Tov from high to low, and conflict start time from early to late. Recommended repair actions are selected from a pre-defined repair strategy library based on the conflict type field, and determined using the criteria of minimizing the objective function increment and minimizing disturbance to high-priority vessel scheduling; for ease of implementation, the cascading effect coefficient Cchain is calculated from the number of affected vessels Nship and the number of affected berths Nberth. Cchain=β1×Nship+β2×Nberth; Among them, β1 and β2 are positive weighting coefficients.

7. The method for identifying, detecting, and correcting multiple conflicts in berth scheduling based on genetic algorithms according to claim 1, characterized in that, In step S6, the method for performing repairs in order of conflict severity is as follows: The scheduler processor repairs the components in the order they are repaired. The repair order is as follows: first repair structural conflicts, then repair time conflicts and berth resource conflicts, then priority conflicts, and finally repair local congestion conflicts. For different conflict types in the conflict log table, the scheduler performs the following categorized repair actions: When a structural conflict exists in the conflict record table, the scheduler re-selects the target berth from the legal berth candidate set B(v) and selects the berth that minimizes the increment of the objective function as the migration result. When the candidate berth set is empty, the scheduling processor marks the vessel as unrepairable and imposes a high penalty value in the fitness function; When a time conflict exists in the conflict log table, the scheduler first performs a time shift repair: the scheduler calculates the earliest conflict-free start time of the conflicting vessel at its original berth and determines whether the waiting time after the time shift exceeds the maximum allowable waiting time; if it does not exceed the maximum allowable waiting time, the scheduled start time is updated. If the limit is exceeded, then berth replacement repair is invoked, and the backup berth with the largest possible time gap is searched in the legal berth candidate set B(v); When there are berth resource conflicts in the conflict log table, the scheduling processor counts the number of available berths and planned berths within a given time window on a per-berth basis, and performs relocation of excess vessels to nearby berths or postponement of time according to priority from low to high; when relocating to nearby berths, the scheduling processor prioritizes the backup berth with the smallest increase in transportation distance and without introducing new structural conflicts. When a priority conflict exists in the conflict log table, the scheduling processor initiates a priority rearrangement repair: the scheduling processor first locks the order and target berth of the high-priority vessel, and then performs partial relocation, partial postponement, or alternative berth relocation for the low-priority vessel; when priority repair would cause a new serious structural conflict or time conflict, the scheduling processor retains the original high-priority plan and searches for alternative positions for the low-priority vessel again. When a local congestion conflict exists in the conflict log, the scheduling processor first identifies the idle time gaps within the berth section, and then inserts vessels with shorter operation times and lower priorities into the idle time gaps. If the load threshold is still exceeded after the gap is repaired, the scheduling processor will relocate the low-priority vessels that meet the relocation conditions to berths with lighter loads in the same area to achieve load balancing.

8. The method for identifying, detecting, and correcting multiple conflicts in berth scheduling based on genetic algorithms according to claim 1, characterized in that, In step S7, the specific method for performing incremental refresh and global verification is as follows: Step 7.1: After each repair is completed, the scheduling processor extracts the affected berth set Baff and the affected time window [ts,te] to form a local refresh area R, and performs conflict re-check only on the local refresh area R to replace global rescan. R = { (b, t) | b ∈ Baff and t ∈ [ts−Δt, te+Δt]}; Where Δt is the refresh margin, used to cover the boundary effects caused by the repair; by only re-detecting the R conflict, the detection complexity is reduced from O(|B|·|T|) to O(|Baff|·|[ts,te]|); t is a time variable, representing the time in the local refresh region; ts is the start time of the affected time window; te is the end time of the affected time window; |B| is the size of the berth set B; |T| is the size of the time slot set T; Step 7.1: After crossover and mutation, the scheduler performs a fast repair phase, processing only the subset of ships directly affected by the genetic operation; before fitness evaluation, it performs a global verification phase to eliminate secondary chain conflicts remaining after fast repair. If time conflicts, structural conflicts, or berth resource conflicts are still detected during the global verification phase, the scheduler returns to step S6 to continue the repair. When the number of consecutive repairs reaches the preset limit and the conflict still cannot be eliminated, the scheduler imposes a high penalty on the current individual and triggers a rollback judgment to prevent infeasible individuals from entering the next generation.

9. The method for identifying, detecting, and correcting multiple conflicts in berth scheduling based on genetic algorithms according to claim 1, characterized in that, In step S8, the specific method for performing fitness re-evaluation and rollback judgment is as follows: The scheduler calculates the fitness function F for each repaired individual and optimizes it by minimizing F. The fitness function is in a weighted form. F = w1·Σ Wv + w2·Σ Ib + w3·Σ Sconf + w4·Σ Ppri; Wherein, ΣWv is the sum of waiting times for all vessels; ΣIb is the sum of vacancy losses for all berths; ΣSconf is the sum of residual conflict severity; and ΣPpri is the sum of priority default penalties. If the fitness after repair is higher than that of the parent individual and the number of new serious conflicts increases, the scheduler will roll back to the parent individual and increase the penalty coefficient of the corresponding repair action; if the fitness after repair is not higher than that of the parent individual, the repair result will be retained for the next generation iteration; when the maximum number of iterations is reached or the optimal value of consecutive Gstag generations no longer improves, the optimal berth scheduling scheme will be output; Gstag∈[5, 20], with a value of 10.