4.1. Solution Representation in ALNS
At iteration
t, the encoded solution maintained by ALNS is represented as a job sequence
where
is a permutation of all panel jobs, and
denotes the job at the
q-th position in the sequence.
The encoded solution is decoded according to the job order in
. For each job, feasible resource assignments are generated, and the resulting feasible alternatives are ranked lexicographically according to the current makespan, cumulative downstream waiting time,
,
, and transport time. The alternative ranked first is selected for the initial schedule, whereas one alternative from the first
alternatives is uniformly selected during the search. The decoding procedure is summarized in Algorithm 1.
| Algorithm 1 Schedule decoding |
- 1:
function Decode() - 2:
Initialize an empty schedule - 3:
for do - 4:
Set - 5:
Enumerate feasible resource assignments for job j subject to Equations ( 8)–( 13) - 6:
for each feasible resource assignment do - 7:
Determine , , , and according to Equations ( 1)–( 3) and ( 14)–( 16) - 8:
end for - 9:
Rank the feasible alternatives according to the lexicographic criterion defined above - 10:
Uniformly select one alternative from the first K alternatives - 11:
Assign the selected alternative to job j and update - 12:
end for - 13:
return - 14:
end function
|
To account for differences in scale among the three criteria, min–max normalization is applied before solution evaluation. Let
,
, and
. For each criterion
, the lower and upper bounds are obtained from a set of reference schedules
as
The normalization bounds are calculated before the search and remain fixed throughout the search. Accordingly, the normalized value of criterion
k is calculated by
The normalized scalar objective is then given by
where
denotes the weight of criterion
k.
4.2. Architecture of the HeteroGNN
The decoded schedule
is represented as a heterogeneous graph when the HeteroGNN is invoked. The graph representation is given by
where
and
denote the node and edge sets, respectively, and
contains the node feature matrices.
The set of node types is given by
where
denotes the job node type, while
,
,
, and
denote the resource node types corresponding to the four production stages defined in
Section 3. The type of a node
is denoted by
.
The corresponding node set is expressed as
where
denotes the set of job nodes, and
denotes the set of resource nodes at stage
.
Each node is associated with a feature vector describing the corresponding job or resource state. The static and dynamic features of the different node types are summarized in
Table 2, and the input features are normalized before being fed into the network.
Different edge types are introduced to represent the relations in the current scheduling state. For an edge
, its type is denoted by
, where
is the set of edge types. The graph contains assignment, transport, and sequence relations. Assignment edges connect each job to the resources assigned to it in the decoded schedule. Transport edges represent feasible connections between resources at adjacent production stages according to
defined in
Section 3. Sequence edges connect adjacent jobs in the current job sequence. Reverse edges are included to allow bidirectional message passing.
To provide dynamic search information for learning the operator selection policy, a search state vector
is provided to the HeteroGNN together with the graph representation
. Considering four types of signals relevant to adaptive decision-making in ALNS, including the annealing status, search effectiveness, stagnation, and exploration behavior, the search state vector is given by
where
and
denote the elapsed and remaining proportions of the search budget, respectively.
is the maximum number of iterations. Both proportions characterize the current search progress. The variable
denotes the current simulated annealing (SA) temperature, which determines the acceptance probability of a worse candidate schedule during the search. The variables
,
, and
denote the acceptance rate, the improvement rate of the best schedule, and the acceptance rate of worse schedules over the most recent search iterations, respectively. Search stagnation is represented by
, where
is the number of iterations since the last improvement of the best schedule. The relative difference between the current schedule and the best schedule is given by
where
is a small positive constant.
The architecture of the HeteroGNN is illustrated in
Figure 2.
The input dimensions differ among node types. The input feature vector of each node is projected into a common hidden space of dimension
by a type-specific linear transformation followed by a rectified linear unit (ReLU). The initial representation of node
v is obtained as
where
denotes the input feature vector of node
v.
is the learnable projection matrix, where
denotes the input dimension of node type
. The hidden dimension is set to
in this study.
is the corresponding bias vector.
Information is subsequently propagated according to the different edge types. For an edge type , the neighbors of node v connected through relation are denoted by .
At layer
ℓ, the message associated with relation
is obtained by mean aggregation as
The messages obtained from the different relations are then combined with the representation of node
v. Its representation at layer
ℓ is updated as
where
denotes the set of edge types incident to node
v,
is the transformation matrix associated with relation
, and ‖ denotes vector concatenation.
After
L message-passing layers, mean pooling is applied separately to each node group. The corresponding pooled representations are computed as
The pooled representations of the node groups are concatenated to obtain the graph embedding. The resulting graph embedding is expressed as
The graph embedding is further combined with the search state vector. The resulting representation is given by
Three outputs are produced by the HeteroGNN based on
. The probability distribution over the sequence neighborhood operators obtained from the operator head is given by
The score assigned to each job by the destroy head is computed as
where
denotes the node corresponding to job
j.
The value of the current state estimated by the critic head is given by
Here,
,
, and
denote the operator, destroy, and value heads, respectively.
4.3. Generation of Neighborhood Solutions
Let denote the set of operators used in the search. Four operators acting on the job sequence are included. The block relocation operator removes a consecutive block of jobs and reinserts it at another position. The subset shuffling operator rearranges the jobs in a selected subset. The block reversal operator reverses the order of jobs within a consecutive block. The interval operator selects jobs from the lower and upper ranges of the minimum safety time interval and rearranges them in the sequence.
The operator
is sampled from the operator policy in training according to
The operator with the highest probability is selected for inference as
The number of jobs removed from the current sequence is controlled by the destroy ratio. The destroy size at iteration
t is calculated as
where
denotes the minimum destroy size and
denotes the destroy ratio.
The destroy scores produced by the destroy head are converted into a probability distribution for job selection. The probability associated with job
j is given by
where
is the temperature parameter used in the probability distribution over the destroy scores.
Job relatedness is evaluated according to the processing times and minimum safety time interval. The normalized attribute vector of job
j is expressed as
where
denotes the resource assigned to job
j at stage
o in the decoded schedule. The terms
,
, and
denote the normalized processing times on the assigned resources, while
denotes the normalized minimum safety time interval.
The destroy score is incorporated into the relatedness measure to guide job selection around a seed job
. The relatedness between jobs
j and
is calculated as
where
denotes the normalized destroy score of job
j, and
is the weight parameter for the destroy score. A smaller value of
gives job
j a higher priority for selection.
The seed job
is first sampled according to the probability distribution in Equation (
38). The remaining
jobs are selected sequentially according to the relatedness measure in Equation (
40). The job with the smallest relatedness value is selected with probability
at each selection step. Otherwise, one of the remaining jobs is sampled according to inverse weights derived from the relatedness values. The selected jobs together with the seed job form the destroy set
.
The auxiliary destroy objective is given by
The auxiliary destroy objective
provides a learning signal for the destroy head and is subsequently included in the actor–critic loss used to update the model parameters.
The candidate encoded solution is jointly determined by the destroy set
and the selected action
. Specifically, the jobs contained in
form the subsequence
, while the remaining jobs form
. The action
determines the sequence neighborhood operator
. The candidate encoded solution
is expressed as
where ⊕ denotes sequence concatenation. The candidate schedule
is obtained by decoding the resulting candidate encoded solution
according to Algorithm 1.
4.4. Search Procedure of HeteroGNN-ALNS
The framework of HeteroGNN-ALNS is illustrated in
Figure 3.
The objective difference used in the acceptance decision is calculated from the normalized scalar objective as
The candidate schedule is accepted according to the SA acceptance criterion. The corresponding acceptance probability is given by
The temperature schedule is given by
where
and
denote the initial and final temperatures, respectively.
The adaptive operator weights of ALNS are used to select the operator when the HeteroGNN is not invoked. Let
denote the weight of operator
. The selection probability of operator
a is given by
The operator weights are updated periodically according to
where
denotes the reaction factor and
denotes the average score of operator
a in the current update segment.
To evaluate the contribution of each guided search transition to the search process, a reward is assigned according to
where
denotes the reward scaling coefficient. The normalized objective difference measures the improvement of the candidate schedule, and the bonus
reflects the search outcome relative to the best schedule.
The model parameters are updated using an actor–critic loss that incorporates the auxiliary destroy objective
defined in Equation (
41). The loss consists of the policy objective for operator selection, the auxiliary destroy objective, the value function loss, and an entropy term. It is given by
where
contains the transitions collected at iterations in which the HeteroGNN is invoked. The policy objective and the auxiliary destroy objective are weighted by the estimated advantage
, while the estimated return
is used as the target of the critic. The coefficients
and
control the contributions of the value function loss and the entropy term, respectively, and
denotes the entropy of the operator policy.
Only the transitions in are used for model training. Consecutive transitions in are treated as consecutive learning steps when generalized advantage estimation (GAE) is applied. One execution of the search procedure constitutes one training episode, and the model parameters are updated at the end of each episode.
Remark 2. To reduce the dependence of the policy decision on information outside the current state representation, the heterogeneous graph encodes the current schedule, while the search-state vector incorporates recent ALNS search statistics. The state representation and adaptive control adopted in HeteroGNN-ALNS follow related DRL-guided metaheuristic frameworks in which information from the current search process is incorporated into learning-based search decisions [26,40]. The actor–critic training follows the general policy-gradient framework established in previous theoretical studies [41,42]. A formal convergence analysis for the coupled HeteroGNN-ALNS process requires further verification of the Markov property and the associated convergence conditions and is left for future study. The overall procedure is summarized in Algorithm 2.
| Algorithm 2 HeteroGNN-guided ALNS |
Require: Instance data, maximum number of iterations , HeteroGNN invocation interval Ensure: Best schedule - 1:
Construct the initial encoded solution and obtain - 2:
Set and initialize for - 3:
for do - 4:
Compute by Equation ( 45) - 5:
if then - 6:
Construct from and obtain - 7:
Select by Equation ( 35) for training or Equation ( 36) for inference - 8:
Construct according to Equations ( 37)–( 40) - 9:
Generate by Equation ( 42) - 10:
else - 11:
Select according to in Equation ( 46) - 12:
Generate from using the selected operator - 13:
end if - 14:
Obtain - 15:
Compute by Equation ( 43) - 16:
Accept or reject by Equation ( 44) and obtain - 17:
Set - 18:
if the current ALNS update segment is completed then - 19:
Update by Equation ( 47) - 20:
end if - 21:
if and model training is performed then - 22:
Compute by Equation ( 48) and by Equation ( 41) - 23:
Store the guided search transition - 24:
end if - 25:
end for - 26:
if model training is performed then - 27:
Update by Equation ( 49) - 28:
end if - 29:
return
|