| | |
| | | |
| | | // 正序 |
| | | public static final List<Integer> TRACK_POSITION_POSITIVE_SEQUENCE = new ArrayList<Integer>() {{ |
| | | add(161);add(157);add(153);add(149);add(124);add(119);add(113);add(999);;add(112);add(107);add(106);add(101);add(100); |
| | | add(161);add(157);add(153);add(149);add(124);add(119);add(113);add(999);add(112);add(107);add(106);add(101);add(100); |
| | | }}; |
| | | // 反序 |
| | | public static final List<Integer> TRACK_POSITION_REVERSE_SEQUENCE = new ArrayList<Integer>() {{ |
| | |
| | | * 获取最远站点 |
| | | * */ |
| | | public static Integer RouteIndexFarMas(Integer a,Integer b,Integer c,Integer d){ |
| | | int ia = TRACK_POSITION_POSITIVE_SEQUENCE.indexOf(a); |
| | | int ib = TRACK_POSITION_POSITIVE_SEQUENCE.indexOf(b); |
| | | int ic = TRACK_POSITION_POSITIVE_SEQUENCE.indexOf(c); |
| | | int id = TRACK_POSITION_POSITIVE_SEQUENCE.indexOf(d); |
| | | int ia = TRACK_POSITION_POSITIVE_SEQUENCE.indexOf(a); //当前位置 |
| | | int ib = TRACK_POSITION_POSITIVE_SEQUENCE.indexOf(b); //地图开始位置 |
| | | int ic = TRACK_POSITION_POSITIVE_SEQUENCE.indexOf(c); //地图结束位置 |
| | | int id = TRACK_POSITION_POSITIVE_SEQUENCE.indexOf(d); //锁结束位置 |
| | | if (id==0){ |
| | | if (ia>ib){ |
| | | if (ia>ic){ |
| | |
| | | } |
| | | } |
| | | |
| | | public static Short SouStaEnd(Integer endSta,Integer souSta){ |
| | | if (souSta == 159) { |
| | | return (short)161; |
| | | } |
| | | return souSta.shortValue(); |
| | | } |
| | | |
| | | |
| | | |
| | | public static void main(String[] arge){ |