{"version":"0.1.0","code":"0000","result":true,"message":"处理成功","errdetail":"","timestamp":1671516333781,"data":{"id":71712522,"title":"5.3.6.5电动车可达范围模型参数-powertrain loss动力总成损耗","slug":"pziuao","format":"lake","bookId":26046811,"body":null,"body_draft":null,"body_html":"
void com.autonavi.gbl.route.RouteService.setElecInfoConfig(ElecInfoConfig elecConfig)\nlong com.autonavi.gbl.route.RouteService.requestRoute(RouteOption routeOption)
ElecInfoConfig详细参数见【电车算路参数设置】
RouteOption详细参数见【基础算路】
不规划路线请求可达范围见 【云服务-新能源电车相关-Range on map】
说明:函数详情,请复制函数名称到在线API搜索
RouteService mRouteService = (RouteService)ServiceMgr.getServiceMgrInstance().getBLService(SingleServiceID.RouteSingleServiceID);\n...\nRouteOption routeOption = RouteOption.create();\n...\nPOIForRequest poiForRequest = POIForRequest.create();\n...\nrouteOption.setPOIForRequest(poiForRequest);\n...\nint constrainCode = 0;\nconstrainCode |= 0x00004000\nrouteOption.setConstrainCode(constrainCode)\n...\n//设置电车能耗参数\nElecCostList costList = new ElecCostList();\ncostList.ID = 666;\ncostList.type = 1;\ncostList.auxValue = 0.5f;\ncostList.ferryRate = 0.8f;\n//坡度上升的消耗系数,坡度上升导致的势能提升与车辆耗电量间的比例关系,势能增量/SLOPE_UP=耗电量,单位J/KWH,取值范围[0-3600000]\ncostList.slope.decess = 2400000;\ncostList.slope.access = 1200000;\n//数组,设置电动车匀速行驶下的平均能耗\nElecSpeedCostList costItem = new ElecSpeedCostList();\ncostItem.speed = 7;\ncostItem.costValue = 23.0f;\nElecSpeedCostList costItem2 = new ElecSpeedCostList();\ncostItem2.speed = 120;\ncostItem2.costValue = 92.5f;\ncostList.speedCost.push_back(costItem);\ncostList.speedCost.push_back(costItem2);\n\n//数组,设置能量消耗与动力系统衰减因子\nPowertrainLoss l_powertrainLoss1 = new PowertrainLoss();\nl_powertrainLoss1.powerdemand = 7;\nl_powertrainLoss1.costValue = 23.5f;\n\nPowertrainLoss l_powertrainLoss2 = new PowertrainLoss();\nl_powertrainLoss2.powerdemand = 15;\nl_powertrainLoss2.costValue = 30;\n\ncostList.powertrainLoss.add(l_powertrainLoss1);\ncostList.powertrainLoss.add(l_powertrainLoss2);\n\n//设置电车其它参数\nElecInfoConfig elecConfig = new ElecInfoConfig();\nelecConfig.orgaName = "jaguar";\nelecConfig.driveTrain = 6;\nelecConfig.fesMode = 0;\nelecConfig.costModelSwitch = 0x01|0x04|0x08;\nelecConfig.hasTraffic = 1;\nelecConfig.costUnit = 1;\nelecConfig.topSpeed = 150;\nelecConfig.vehiclelMass = 1440;\nelecConfig.maxVechicleCharge = 10.0f;\nelecConfig.powerflag = 0x00000011;\nelecConfig.arrivingPercent = 80;\nelecConfig.leavingPercent = 20;\nelecConfig.costList.add(costList);\nmRouteService.Control(RouteControlKeyVehicleType, "2");\nmRouteService.setElecInfoConfig(elecConfig); \n....\nmRouteService.requestRoute(routeOption);