Skip to main content
. 2026 Sep 14;26(18):5827. doi: 10.3390/s26185827
Algorithm 1 The PSO-MCC-SCBLS Algorithm for Truck-Scale Weighing
  • Input: Training dataset of truck-scale weighing data.

  • Output: Predicted output Y for the test dataset.

  •   1:

    Data preprocessing.

  •   2:

    for i=1; i≤n do.

  •   3:

    Randomly initialize the parameters We and βe of the feature mapping layer;

  •   4:

    Calculate Zi=ϕ(XWei+βei),i=1,…,n;

  •   5:

    end

  •   6:

    Construct feature-node matrix Zn=[Z1,Z2,…,Zn];

  •   7:

    for j=1; j≤m do

  •   8:

    Randomly initialize the parameters Wh and βh of the enhancement-mapping layer

  •   9:

    Calculate Hj=ξ(ZnWhj+βhj),j=1,…,m;

  • 10:

    end

  • 11:

    Construct enhancement-node matrix Hm=[H1,H2,…,Hm];

  • 12:

    Concatenate node matrices to form A=[Zn∣Hm];

  • 13:

    Compute the adjacency matrix S and the Laplacian matrix L using Equations (15) and (16);

  • 14:

    for t1=1; t1≤T1 do

  • 15:

    Initialize output-weight matrix W and construct state matrix A based on Equations (3)–(6);

  • 16:

    Compute diagonal matrix Λw according to Equation (21);

  • 17:

    Update output-weight matrix W according to Equation (22);

  • 18:

    if ∥Wt+1−Wt∥2 <ε;

  • 19:

    break

  • 20:

    end

  • 21:

    Output-weight matrix W;

  • 22:

    for t2=1; t2≤T2 do

  • 23:

    Evaluate fitness of each particle;

  • 24:

    Update personal best and global best positions;

  • 25:

    Update particle velocity and position using Equations (8) and (9);

  • 26:

    end

  • 27:

    Output the optimized structural parameters of SCBLS;

  • 28:

    Train the model using the optimal parameters;

  • 29:

    Output Y;

  • 30:

    return Y