#
Junjie
2024-04-12 b7a88cf890d7259d2164bef402be3e8423a38007
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/model/NavigateNode.java
@@ -2,15 +2,20 @@
import lombok.Data;
import java.io.Serializable;
/**
 * A*寻路算法Node节点
 */
@Data
public class NavigateNode implements Comparable<NavigateNode>{
public class NavigateNode implements Comparable<NavigateNode>, Cloneable, Serializable {
    private static final long serialVersionUID = 1L;
    private int x;//坐标x
    private int y;//坐标y
    private int z;//坐标z(高度)
    private int nodeZ;
    private int F;//综合花费的步数
    private int G;//已经花费的步数
    private int H;//将要花费的步数
@@ -46,4 +51,18 @@
        return Integer.compare(this.F, o.F);
    }
    public void setZ(int z) {
        this.z = z;
        this.nodeZ = z;
    }
    @Override
    public NavigateNode clone() {
        try {
            return (NavigateNode) super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return null;
    }
}