|
@@ -0,0 +1,60 @@
|
|
|
+package com.persagy.ibms.data.sdk.test;
|
|
|
+
|
|
|
+import java.io.File;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.persagy.ibms.core.data.SceneObject;
|
|
|
+import com.persagy.ibms.core.data.SceneProperty;
|
|
|
+import com.persagy.ibms.core.util.ComputeUtil;
|
|
|
+import com.persagy.ibms.core.util.FastJsonReaderUtil;
|
|
|
+import com.persagy.ibms.core.util.FastJsonUtil;
|
|
|
+import com.persagy.ibms.data.sdk.util.Constant;
|
|
|
+import com.persagy.ibms.data.sdk.util.RWDLoadUtil;
|
|
|
+import com.persagy.ibms.data.sdk.util.RepositoryContainer;
|
|
|
+import com.persagy.ibms.data.sdk.util.RepositoryImpl;
|
|
|
+
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+
|
|
|
+@Slf4j
|
|
|
+public class CheckTest {
|
|
|
+
|
|
|
+ public static void test(String[] args) throws Exception {
|
|
|
+ Constant.debug = false;// 调试模式设为true
|
|
|
+ RepositoryImpl Repository = RepositoryContainer.instance;
|
|
|
+ Repository.use_thread = !Constant.debug;
|
|
|
+ Repository.RepositoryBase = RepositoryContainer.RepositoryBase;
|
|
|
+ {
|
|
|
+ Repository.property2SDV_enable = true;
|
|
|
+ Repository.property2SDV.clear();
|
|
|
+
|
|
|
+ log.warn("LoadConfig");
|
|
|
+ SceneObject sceneObject = new SceneObject();
|
|
|
+ JSONObject sceneJSON = FastJsonReaderUtil.Instance().ReadJSONObject(new File(Constant.getLatestPath(Constant.config, false)));
|
|
|
+ FastJsonUtil.Set_JavaObject(sceneJSON, sceneObject);
|
|
|
+ Repository.sceneObject = sceneObject;
|
|
|
+ ComputeUtil.RefreshRepository(Repository);
|
|
|
+ List<List<SceneProperty>> spListList = ComputeUtil.computePrepare(Repository);
|
|
|
+
|
|
|
+ log.warn("LoadPhysicalWorld");
|
|
|
+ RWDLoadUtil.LoadPhysicalWorld(Repository);
|
|
|
+ log.warn("LoadReference");
|
|
|
+ RWDLoadUtil.LoadReference(Repository);
|
|
|
+ if (Constant.zkt_physical_world_enable) {
|
|
|
+ log.warn("LoadZKTPhysicalWorld");
|
|
|
+ RWDLoadUtil.LoadZKTPhysicalWorld(Repository);
|
|
|
+ }
|
|
|
+ if (Constant.ibms_physical_world_enable) {
|
|
|
+ log.warn("LoadIBMSPhysicalWorld");
|
|
|
+ RWDLoadUtil.LoadIBMSPhysicalWorld(Repository);
|
|
|
+ }
|
|
|
+ log.warn("computeAll");
|
|
|
+ ComputeUtil.computeAll(Repository, spListList);
|
|
|
+
|
|
|
+ Repository.property2SDV_enable = false;
|
|
|
+ Repository.property2SDV.clear();
|
|
|
+ }
|
|
|
+ log.warn("compute finish");
|
|
|
+ RepositoryContainer.RepositoryBase.compute_finish = true;
|
|
|
+ }
|
|
|
+}
|