Protocol Documentation

Table of Contents

city/clock/v1/clock_service.proto

Top

NowRequest

获取当前的模拟时间请求

request of getting current simulation clock

NowResponse

获取当前的模拟时间响应

response of getting current simulation clock

FieldTypeLabelDescription
t double

当前的模拟时间,单位为秒 current simulation clock, in seconds

ClockService

Method NameRequest TypeResponse TypeDescription
Now NowRequest NowResponse

获取当前的模拟时间 get current simulation clock

city/geo/v2/geo.proto

Top

AoiPosition

地图坐标(AOI)

Map coordinates (AOI)

FieldTypeLabelDescription
aoi_id int32

AOI ID

poi_id int32 optional

POI ID,需要是aoi_id的子poi,否则该值无效 POI ID, needs to be a sub-poi of aoi_id, otherwise the value is invalid

LanePosition

地图坐标(车道+距离s)

Map coordinates (lane ID + distance s)

FieldTypeLabelDescription
lane_id int32

车道id Lane ID

s double

s是车道上的点到车道起点的距离 s is the distance from the point on the lane to the starting point of the lane

LongLatBBox

经纬度矩形区域

latitude and longitude rectangular area

FieldTypeLabelDescription
min_longitude double

最小经度 minimum longitude

min_latitude double

最小纬度 minimum latitude

max_longitude double

最大经度 maximu longitude

max_latitude double

最大纬度 minimum longitude

LongLatPosition

WGS84经纬度坐标

WGS84 longitute and latitude coordinates

FieldTypeLabelDescription
longitude double

经度 longitude

latitude double

纬度 latitude

z double optional

高程(单位:米) elevation (unit: meters)

Position

坐标,如果多种坐标同时存在,两两之间必须满足映射关系,同时逻辑坐标是必须提供的

Coordinates, if multiple coordinates exist at the same time, the mapping relationship between them must be satisfied, and logical coordinates must be provided.

FieldTypeLabelDescription
lane_position LanePosition optional

地图坐标AOI(必须提供其中之一) Map coordinates AOI (one of these must be provided)

aoi_position AoiPosition optional

地图坐标Lane+S(必须提供其中之一) Map coordinates Lane+S (one of these must be provided)

longlat_position LongLatPosition optional

WGS84经纬度坐标 WGS84 longitute and latitude coordinates

xy_position XYPosition optional

XY坐标 XY coordinates

XYPosition

XY坐标

XY coordinates

FieldTypeLabelDescription
x double

x坐标,单位米,对应经度 x coordinate, in meters, corresponding to longitude

y double

y坐标,单位米,对应纬度 y coordinate, in meters, corresponding to latitude

z double optional

z坐标,单位米,对应高程 z coordinate, in meters, corresponding to elevation

city/comm/input/v1/comm.proto

Top

CommDemand

终端通信需求

FieldTypeLabelDescription
id int32

demands double repeated

CommDemands

FieldTypeLabelDescription
comm_demands CommDemand repeated

Node

FieldTypeLabelDescription
id int32

type NodeType

parent_id int32

父节点

children_ids int32 repeated

子节点

position city.geo.v2.Position optional

节点经纬度位置

aoi_id int32 optional

节点所在aoi

freq_range_id int32 optional

基站频段id

base_station_type BaseStationType optional

室内外基站类型

Nodes

FieldTypeLabelDescription
nodes Node repeated

repair_stations RepairStation repeated

pumps Pump repeated

Pump

水泵

FieldTypeLabelDescription
id int32

position city.geo.v2.Position

RepairStation

抢修站

FieldTypeLabelDescription
id int32

aoi_id int32

position city.geo.v2.Position

BaseStationType

NameNumberDescription
BASE_STATION_TYPE_UNSPECIFIED 0

BASE_STATION_TYPE_INDOOR 1

BASE_STATION_TYPE_OUTDOOR 2

NodeType

本文件描述通信部分拓扑结构

三种节点类型

NameNumberDescription
NODE_TYPE_UNSPECIFIED 0

NODE_TYPE_INTERNET 1

NODE_TYPE_GATEWAY 2

NODE_TYPE_BASE_STATION 3

city/comm/interaction/aoi/v1/aoi_service.proto

Top

GetBadAoiIDRequest

GetBadAoiIDResponse

FieldTypeLabelDescription
ids int32 repeated

AoiService

Method NameRequest TypeResponse TypeDescription
GetBadAoiID GetBadAoiIDRequest GetBadAoiIDResponse

city/comm/interaction/demand/v1/demand_service.proto

Top

SetDemandStatusRequest

设置用户通信需求激增

用户通信需求激增公式:

result=demand*multiple_times*exp(-power_times*(current_time-start_time))

demand: 用户正常通信需求

current_time: 当前时间, start_time: 开始激增时间

FieldTypeLabelDescription
multiple_times double

power_times double

SetDemandStatusResponse

DemandService

Method NameRequest TypeResponse TypeDescription
SetDemandStatus SetDemandStatusRequest SetDemandStatusResponse

city/comm/interaction/gateway/v1/gateway.proto

Top

Station

FieldTypeLabelDescription
id int32

status bool

reason Reason

Reason

NameNumberDescription
REASON_UNSPECIFIED 0

REASON_RUIN 1

REASON_CASCADE 2

city/event/v1/event.proto

Top

Event

FieldTypeLabelDescription
type EventType

level int32

step int32

Events

FieldTypeLabelDescription
events Event repeated

EventType

NameNumberDescription
EVENT_TYPE_UNSPECIFIED 0

EVENT_TYPE_HEAVY_RAIN 1

特大暴雨

EVENT_TYPE_MILITARY_STRIKE 2

军事打击

EVENT_TYPE_TRAFFIC_CONGESTION 3

交通拥堵

EVENT_TYPE_TRAFFIC_LANE_RESTRICTION 4

道路限行

EVENT_TYPE_TRAFFIC_BAD_LIGHT 5

信控失效

EVENT_TYPE_ELEC_RUINED_TRANSFORMER 6

变压器损坏(被摧毁)

EVENT_TYPE_WATER_RUINED_PUMP 7

水泵损坏(被摧毁)

EVENT_TYPE_WATER_STOPPED_PUMP 8

水泵停电(变压器停电影响)

EVENT_TYPE_COMM_RUINED_BASE_STATION 9

基站损坏

EVENT_TYPE_COMM_STOPPED_BASE_STATION 10

基站停电

EVENT_TYPE_COMM_OVERLOAD_BASE_STATION 11

基站过载

city/comm/interaction/gateway/v1/gateway_service.proto

Top

GetAllStatusRequest

GetAllStatusResponse

FieldTypeLabelDescription
stations Station repeated

GetEventsRequest

GetEventsResponse

FieldTypeLabelDescription
events city.event.v1.Events

GetRuinInfoRequest

GetRuinInfoResponse

FieldTypeLabelDescription
one RuinInfo

三级级损伤信息

two RuinInfo

three RuinInfo

RuinInfo

FieldTypeLabelDescription
num int32

损坏数量

ratio double

损坏占比

SetGatewayPowerStatusRequest

断电或恢复状态,True为修复,False为断电

FieldTypeLabelDescription
id int32

status bool

SetGatewayPowerStatusResponse

SetGatewayRuinStatusRequest

摧毁或恢复状态,True为修复,False为摧毁

FieldTypeLabelDescription
id int32

status bool

SetGatewayRuinStatusResponse

GatewayService

Method NameRequest TypeResponse TypeDescription
SetGatewayPowerStatus SetGatewayPowerStatusRequest SetGatewayPowerStatusResponse

SetGatewayRuinStatus SetGatewayRuinStatusRequest SetGatewayRuinStatusResponse

GetAllStatus GetAllStatusRequest GetAllStatusResponse

GetRuinInfo GetRuinInfoRequest GetRuinInfoResponse

GetEvents GetEventsRequest GetEventsResponse

city/comm/output/v1/output.proto

Top

Aoi

FieldTypeLabelDescription
id int32

demand_flow double

通信需求总量(单位:Bytes)

actual_flow double

通信真实总量(单位:Bytes)

outage_num int32

通信中断人数

satisfied_num int32

通信满足人数

unsatisfied_num int32

通信不满足人数

active_user_num int32

有通信需求的人数

BaseStation

基站状态

FieldTypeLabelDescription
id int32

demand_flow double

基站需求流量(单位:Bytes)

actual_flow double

基站真实流量(单位:Bytes)

num_agents int32

基站用户数

overload bool

基站是否过载

unsatisfied_num int32

不满足通信需求用户数

satisfied_num int32

满足通信需求用户数

outage_num int32

通信中断用户数

active_num int32

有通信需求人数

transmit_power double

基站发射功率

Node

设备状态

FieldTypeLabelDescription
id int32

status NodeStatus

battery_remaining_time double optional

电池剩余可用时间(单位:秒)(仅当gateway状态为“电池供电”时启用)

Person

人(可见的,交通模拟或室内模拟正在计算位置变动的)

FieldTypeLabelDescription
id int32

demand_rate double

通信需求速率(单位:Bytes/s)

actual_rate double

通信真实速率(单位:Bytes/s)

connect_status PersonConnectStatus

demand_status PersonDemandStatus

strength double

信号强度(单位:dBm)

base_station_id int32

连接基站

freq_range_ids int32 repeated

信道分配

received_power double

接收发射功率(单位:dBm)

Signal

信号情况

FieldTypeLabelDescription
num_rows int32

num_columns int32

strength double repeated

信号强度(单位:dBm)

base_station_id int32 repeated

基站ID

freq_range_id int32 repeated

基站频段

Statistics

FieldTypeLabelDescription
num_satisfied_agents int32

满足通信需求用户数

num_unsatisfied_agents int32

未能满足通信需求的用户数

num_outage_agents int32

通信中断的用户数

num_active_agents int32

有通信需求的用户数

demand_flow double

需求总流量(单位:Bytes)

actual_flow double

真实总流量(单位:Bytes)

num_base_station int32

总基站数

num_ok_base_station int32

正常基站数

num_ruined_base_station int32

损坏基站数

num_stopped_base_station int32

断电基站数

num_overloaded_base_station int32

过载基站数

num_gateway int32

总网关数

num_ok_gateway int32

正常网关数

num_ruined_gateway int32

损坏网关数

num_stopped_gateway int32

断电网关数

num_overloaded_gateway int32

过载网关数

num_battery_gateway int32

直流电网关数

power_consumption double

基站耗电量(单位:kW·h)

NodeStatus

NameNumberDescription
NODE_STATUS_UNSPECIFIED 0

NODE_STATUS_OK 1

正常供电

NODE_STATUS_BATTERY 2

电池供电

NODE_STATUS_FAILURE 3

停电

NODE_STATUS_RUINED 4

损坏

PersonConnectStatus

用户连接基站状态

NameNumberDescription
PERSON_CONNECT_STATUS_UNSPECIFIED 0

PERSON_CONNECT_STATUS_OK 1

可以连接到基站

PERSON_CONNECT_STATUS_OUTAGE 2

无法连接到基站

PersonDemandStatus

用户需求满足状态

NameNumberDescription
PERSON_DEMAND_STATUS_UNSPECIFIED 0

PERSON_DEMAND_STATUS_SATISFIED 1

需求被满足

PERSON_DEMAND_STATUS_UNSATISFIED 2

需求不满足

PERSON_DEMAND_STATUS_NO 3

没有需求

city/comm/output/v1/output_service.proto

Top

OutputRequest

FieldTypeLabelDescription
step int32

nodes Node repeated

设备状态

base_stations BaseStation repeated

signal_heatmap Signal

五环区域信号强度热力图(500m网格形式呈现)

small_signal_heatmap Signal

国贸区域信号强度热力图(50m网格形式呈现)

persons Person repeated

TODO(张钧): 基站和人的连接怎么表示? 人相关的数据

aois Aoi repeated

AOI相关的数据

events city.event.v1.Events

statistics Statistics

统计值

OutputResponse

OutputService

Method NameRequest TypeResponse TypeDescription
Output OutputRequest OutputResponse

city/config/v1/config.proto

Top

MongoPath

MongoDB配置

FieldTypeLabelDescription
db string

数据库名

col string

集合名

OutputTarget

输出目标PostgreSQL

FieldTypeLabelDescription
sql string

city/economy/v1/economy.proto

Top

Economy

组织列表,对应MongoDB中的集合

FieldTypeLabelDescription
persons Person repeated

orgs Org repeated

组织列表

Employee

员工

FieldTypeLabelDescription
person_id int32

员工ID

salary double

薪水

Goods

货物

FieldTypeLabelDescription
type string

货物类型

name string

货物名称

count int32

货物数量

price double optional

货物价格(允许暂未定价)

Job

岗位

FieldTypeLabelDescription
name string

岗位名称

employee_count int32

岗位所需员工数量

salary double optional

岗位薪水

Org

组织,具有员工、货物、资金等属性

FieldTypeLabelDescription
id int32

组织ID

poi_id int32

组织所在的POI ID

employees Employee repeated

员工列表(初始化时由Orgs列表提供,单向绑定到person上)

jobs Job repeated

岗位列表

money double

资金

goods Goods repeated

货物

functions string repeated

功能列表 buy: 购买货物 apply: 申请岗位 ...

Person

个人(与Person一一对应,

没有绑定到city.economy.v1.Person的Person将无法参与经济模拟)

FieldTypeLabelDescription
id int32

与person id一致

money double

起始资金

org_id int32 optional

所在组织ID(初始化时不提供,由组织中的员工列表设定)

city/economy/v1/org_service.proto

Top

GetOrgRequest

批量查询组织的经济情况请求

FieldTypeLabelDescription
org_ids int32 repeated

待查询的组织的ID列表(为空时查询所有组织)

GetOrgResponse

批量查询组织的经济情况响应

FieldTypeLabelDescription
orgs Org repeated

组织的经济情况

UpdateOrgEmployeeRequest

批量修改组织的员工请求

FieldTypeLabelDescription
items UpdateOrgEmployeeRequestItem repeated

待修改的组织员工变动

UpdateOrgEmployeeRequestItem

组织员工变动

FieldTypeLabelDescription
org_id int32

待修改的组织

adds Employee repeated

新增的员工

dels int32 repeated

删除的员工

updates Employee repeated

修改薪水的员工

UpdateOrgEmployeeResponse

批量修改组织的员工响应

FieldTypeLabelDescription
orgs Org repeated

修改后的组织的经济情况

UpdateOrgGoodsRequest

批量修改组织的货物请求

FieldTypeLabelDescription
items UpdateOrgGoodsRequestItem repeated

待修改的组织货物变动

UpdateOrgGoodsRequestItem

组织货物变动

FieldTypeLabelDescription
org_id int32

待修改的组织

goods Goods repeated

货物变动 按照(type, name)相等来判断是否为同一种货物 货物数量为增量,正数表示增加,负数表示减少 price如果未设定则沿用原来的价格,否则使用新的价格

UpdateOrgGoodsResponse

批量修改组织的货物响应

FieldTypeLabelDescription
orgs Org repeated

修改后的组织的经济情况

UpdateOrgJobRequest

批量修改组织的岗位请求

FieldTypeLabelDescription
items UpdateOrgJobRequestItem repeated

待修改的组织岗位变动

UpdateOrgJobRequestItem

组织岗位变动

FieldTypeLabelDescription
org_id int32

待修改的组织

jobs Job repeated

岗位变动 按照name相等来判断是否为同一种岗位 岗位数量为增量,正数表示增加,负数表示减少 salary如果未设定则沿用原来的薪水,否则使用新的薪水

UpdateOrgJobResponse

批量修改组织的岗位响应

FieldTypeLabelDescription
orgs Org repeated

修改后的组织的经济情况

UpdateOrgMoneyRequest

批量修改组织的资金请求

FieldTypeLabelDescription
items UpdateOrgMoneyRequestItem repeated

待修改的组织资金变动

UpdateOrgMoneyRequestItem

组织资金变动

FieldTypeLabelDescription
org_id int32

待修改的组织

money double

正数表示增加,负数表示减少

UpdateOrgMoneyResponse

批量修改组织的资金响应

FieldTypeLabelDescription
orgs Org repeated

修改后的组织的经济情况

OrgService

组织经济情况接口

Method NameRequest TypeResponse TypeDescription
GetOrg GetOrgRequest GetOrgResponse

批量查询组织的经济情况(员工、岗位、资金、货物)

UpdateOrgMoney UpdateOrgMoneyRequest UpdateOrgMoneyResponse

批量修改组织的资金

UpdateOrgGoods UpdateOrgGoodsRequest UpdateOrgGoodsResponse

批量修改组织的货物

UpdateOrgEmployee UpdateOrgEmployeeRequest UpdateOrgEmployeeResponse

批量修改组织的员工

UpdateOrgJob UpdateOrgJobRequest UpdateOrgJobResponse

批量修改组织的岗位

city/economy/v1/person_service.proto

Top

GetPersonRequest

批量查询人的经济情况请求

FieldTypeLabelDescription
person_ids int32 repeated

待查询的人的ID列表(为空时查询所有人)

GetPersonResponse

批量查询组织的经济情况响应

FieldTypeLabelDescription
persons Person repeated

人的经济情况

UpdatePersonMoneyRequest

批量修改人的资金请求

FieldTypeLabelDescription
items UpdatePersonMoneyRequestItem repeated

待修改的人员资金变动

UpdatePersonMoneyRequestItem

人员资金变动

FieldTypeLabelDescription
person_id int32

待修改的人员id

money double

资金变动(正数表示增加,负数表示减少)

UpdatePersonMoneyResponse

批量修改人的资金响应

FieldTypeLabelDescription
persons Person repeated

修改后的人的经济情况

PersonService

个人经济情况接口

Method NameRequest TypeResponse TypeDescription
GetPerson GetPersonRequest GetPersonResponse

批量查询人的经济情况(资金、雇佣关系)

UpdatePersonMoney UpdatePersonMoneyRequest UpdatePersonMoneyResponse

批量修改人的资金

city/elec/input/v1/config.proto

Top

Config

FieldTypeLabelDescription
mongo Mongo

control Control

output Output

Control

FieldTypeLabelDescription
step ControlStep

ControlStep

FieldTypeLabelDescription
start int32

total int32

Mongo

FieldTypeLabelDescription
uri string

map city.config.v1.MongoPath

facilities city.config.v1.MongoPath

Output

FieldTypeLabelDescription
target city.config.v1.OutputTarget

switch OutputSwitch

OutputSwitch

是否输出各类数据

FieldTypeLabelDescription
node bool

电网节点状态

aoi bool

event bool

city/elec/input/v1/input.proto

Top

Facilities

设施集合,对应于mongodb一个collection

FieldTypeLabelDescription
facilities Facility repeated

repair_stations RepairStation repeated

Facility

FieldTypeLabelDescription
id int32

position city.geo.v2.LongLatPosition

type FacilityType

relation int32 repeated

当前节点的邻居节点的id

foreign_id int32 optional

在其它关联的网络中如水网使用时,可使用外部id 对于负载,该值表示其在对应模拟中的id

aoi_id int32 optional

对于电力设施,该值表示所在aoi id

num_transformer int32 optional

对于10kv变压器组,该值表示变压器组中变压器的数量

RepairStation

FieldTypeLabelDescription
aoi_id int32

position city.geo.v2.LongLatPosition

FacilityType

NameNumberDescription
FACILITY_TYPE_UNSPECIFIED 0

电网相关的基础设施分类

FACILITY_TYPE_POWER_STATION 1

发电站

FACILITY_TYPE_TRANSFORMER_500 2

不同电压的变压器

FACILITY_TYPE_TRANSFORMER_220 3

FACILITY_TYPE_TRANSFORMER_110 4

FACILITY_TYPE_TRANSFORMER_10 5

FACILITY_TYPE_BASE_STATION 6

通信基站

FACILITY_TYPE_GATEWAY 7

网关

FACILITY_TYPE_DRAINAGE_PUMP 8

排水水泵

FACILITY_TYPE_TRAFFIC_LIGHT 9

交通灯

FACILITY_TYPE_AOI 10

AOI

FACILITY_TYPE_SUPPLY_PUMP 11

供水水泵

city/map/v2/light.proto

Top

AvailablePhase

FieldTypeLabelDescription
states LightState repeated

描述最大压力信控的可行相位,由每个lane的灯控情况组成,lane与Junction.lane_ids一一对应 Describes the feasible phase for max pressure algorithm, consisting of the lighting control situation for each lane in the junction, nd the lane corresponds one-to-one with junction.lane_ids

Phase

交通灯相位

traffic light phase

FieldTypeLabelDescription
duration double

相位持续时间,单位秒 Phase duration in seconds

states LightState repeated

描述该相位下每个lane的灯控情况,lane与Junction.lane_ids一一对应 The lighting control situation of each lane in this phase, and the lane corresponds one-to-one with junction.lane_ids

TrafficLight

交通灯

traffic light

FieldTypeLabelDescription
junction_id int32

所在路口id ID of the junction where the traffic light is at

phases Phase repeated

相位循环的一个循环周期 One cycle of phase cycling

LightState

交通灯的状态

traffic light state

NameNumberDescription
LIGHT_STATE_UNSPECIFIED 0

未指定 unspecified

LIGHT_STATE_RED 1

红灯 red light

LIGHT_STATE_GREEN 2

绿灯 green light

LIGHT_STATE_YELLOW 3

黄灯 yellow light

city/map/v2/map.proto

Top

Aoi

Aoi,用于描述地图上的区域

Aoi, describing a region on the map

FieldTypeLabelDescription
id int32

Aoi ID(从5_0000_0000开始) Aoi ID (starting from 5_0000_0000)

name string

Aoi名字 Aoi name

type AoiType

Deprecated. Aoi类型 Aoi type

driving_positions city.geo.v2.LanePosition repeated

Aoi与行车路网的连接点 Connection point between Aoi and driving lanes

walking_positions city.geo.v2.LanePosition repeated

Aoi与步行路网的连接点 Connection point between Aoi and walking lanes

positions city.geo.v2.XYPosition repeated

Aoi原始位置(如果只有一个值,则为Aoi所在的点,否则为Aoi多边形的边界) Aoi original position (if there is only one value, it is the point where Aoi is located, otherwise it is the boundary of the Aoi polygon)

driving_gates city.geo.v2.XYPosition repeated

Aoi与行车路网连接时在自身边界上的连接点, 与driving_positions按索引一一对应 The connection point on its own boundary when Aoi is connected to the driving lanes corresponds one-to-one with driving_positions by index.

walking_gates city.geo.v2.XYPosition repeated

Aoi与步行路网连接时在自身边界上的连接点, 与walking_positions按索引一一对应 The connection point on its own boundary when Aoi is connected to the walking lanes corresponds one-to-one with walking_positions by index.

area double optional

Aoi面积, 若是Poi则无此字段 Aoi area, if it is Poi, there is no such field

land_use LandUseType optional

Deprecated. 土地利用分类,若是Poi则无此字段 Land use type, if it is Poi, there is no such field 弃用 deprecated

urban_land_use string optional

城市建设用地分类,参照执行标准GB 50137-2011(https://www.planning.org.cn/law/uploads/2013/1383993139.pdf) Urban Land use type, refer to the national standard GB 50137-2011

poi_ids int32 repeated

Aoi包含的Poi Pois contained in Aoi

Fields with deprecated option

Name Option
type

true

land_use

true

Header

地图元信息

Map meta information

FieldTypeLabelDescription
name string

地图名称 Map name

date string

地图创建时间 Map creation time

north double

最大纬度对应的y坐标 y coordinate corresponding to the maximum latitude

south double

最小纬度对应的y坐标 y coordinate corresponding to the minimum latitude

east double

最大经度对应的x坐标 x coordinate corresponding to the maximum longitude

west double

最小经度对应的x坐标 x coordinate corresponding to the minimum longitude

projection string

PROJ.4 投影字符串,用以支持xy坐标到其他坐标系的转换 PROJ.4 projection string to support the conversion of xy coordinates to other coordinate systems

taz_x_step double optional

在x方向划分TAZ的步长 Step size of the TAZ in the x-direction

taz_y_step double optional

在y方向划分TAZ的步长 Step size of the TAZ in the y-direction

HeuristicTAZCost

交通分析区,用于预计算公共交通权重

// TAZ, used to precalculate public transport costs

message TransportationAnalysisZone{

int32 x_id = 1;

int32 y_id = 2;

double x_minimum = 3;

double x_maximum = 4;

double y_minimum = 5;

double y_maximum = 6;

}

预计算公共交通权重

Precalculate public transport costs

FieldTypeLabelDescription
taz_x_id int32

taz_y_id int32

aoi_id int32

cost double

Junction

Junction,用于描述路口

Junction, describing road intersections

FieldTypeLabelDescription
id int32

路口id(从3_0000_0000开始) Junction id (starting from 3_0000_0000)

lane_ids int32 repeated

属于该路口Junction的所有车道/人行道等lane All driving/walking lanes belonging to this junction.

driving_lane_groups JunctionLaneGroup repeated

属于该路口Junction的所有行车车道组 All driving lane groups belonging to this junction

phases AvailablePhase repeated

所有可用信号灯相位 All available phases for max pressure algorithm

fixed_program TrafficLight optional

默认固定相位信号灯 Default fixed phases traffic light

JunctionLaneGroup

车道组,用于描述路口内的车道组合

Lane group, describing the combination of lanes within an intersection

具有相同入口道路和出口道路的车道组成一个车道组

Lanes with the same entrance and exit roads form a lane group

车道组是信控处理、路口通行的基本单元

Lane group is the basic unit for signal control and traffic in the junction.

FieldTypeLabelDescription
in_road_id int32

该车道组的入口道路 The entrance road to this lane group

in_angle double

该车道组的入口角度(弧度制) The entrance angle of this lane group (in radians)

out_road_id int32

该车道组的出口道路 The exit road for this lane group

out_angle double

该车道组的出口角度(弧度制) The exit angle of this lane group (in radians)

lane_ids int32 repeated

该车道组包含的车道 Lanes in the group

turn LaneTurn

该车道组的转向属性 The turn type of this lane group

Lane

Lane,用于描述道路上的车道、人行道等

Lane, used to describe lanes, sidewalks, etc. on the road

FieldTypeLabelDescription
id int32

车道id(从0开始) lane id (starts from 0)

type LaneType

车道类型 lane type

turn LaneTurn

车道转向 lane turn type

max_speed double

限速 (m/s) max speed (m/s)

length double

中心线长度(单位:米) centerline length (in meters)

width double

车道宽度(单位:米) lane width (in meters)

center_line Polyline

车道中心线(车辆/行车轨迹线) Lane center line (vehicle/driving line)

left_border_line Polyline

Deprecated. 车道左边界线 Lane left boundary line 弃用 deprecated

right_border_line Polyline

Deprecated. 车道右边界线 Lane right boundary line 弃用 deprecated

predecessors LaneConnection repeated

Lanes can drive / walk from 对于Junction内的车道至多1个前驱 For lanes within junction, there is at most 1 predecessor 对于LANE_TYPE_DRIVING,连接类型必为LANE_CONNECTION_TYPE_TAIL For LANE_TYPE_DRIVING, the connection type must be LANE_CONNECTION_TYPE_TAIL 对于LANE_TYPE_WALKING连接类型,两种都有可能 For LANE_TYPE_WALKING, both connection types are possible

successors LaneConnection repeated

Lanes can drive / walk to 对于Junction内的车道至多1个后继 For lanes within junction, there is at most 1 successor 对于LANE_TYPE_DRIVING,连接类型必为LANE_CONNECTION_TYPE_HEAD For LANE_TYPE_DRIVING, the connection type must be LANE_CONNECTION_TYPE_HEAD 对于LANE_TYPE_WALKING连接类型,两种都有可能 For LANE_TYPE_WALKING, both connection types are possible

left_lane_ids int32 repeated

左侧相邻车道(按从近到远排列) Adjacent lanes on the left (arranged from nearest to far)

right_lane_ids int32 repeated

右侧相邻车道(按从近到远排列) Adjacent lanes on the right (arranged from nearest to far)

parent_id int32

所属的道路road id或路口junction id The road id or junction id it belongs to

overlaps LaneOverlap repeated

车道之间的冲突点(仅在Junction内有效),保证按照self_s从小到大排序 Conflict points between lanes (valid only within Junction), guaranteed to be sorted from small to large according to self_s

aoi_ids int32 repeated

连接到该车道的所有AOI All AOIs connected to this lane

Fields with deprecated option

Name Option
left_border_line

true

right_border_line

true

LaneConnection

车道连接信息

Lane connection information

FieldTypeLabelDescription
id int32

所连接的车道Lane的ID ID of the connected lane

type LaneConnectionType

连接类型 Connection type

LaneOverlap

两个lane的冲突区域

Conflict area between two lanes

FieldTypeLabelDescription
self city.geo.v2.LanePosition

冲突点在本车道上的坐标 Coordinates of the conflict point on this lane

other city.geo.v2.LanePosition

冲突点在冲突车道上的坐标 Coordinates of the conflict point on the conflicted lane

self_first bool

本车道是否有优先通行权 Whether this lane has priority

Map

地图,对应一个地图pb文件或一个地图mongodb collection

Map, corresponding to a map pb file or a map MongoDB collection

FieldTypeLabelDescription
header Header

lanes Lane repeated

roads Road repeated

junctions Junction repeated

aois Aoi repeated

pois Poi repeated

sublines PublicTransportSubline repeated

NextRoadLane

FieldTypeLabelDescription
road_id int32

下一条路的id ID of the next road

lane_id_a int32

我们假定能去往对应道路的车道id范围是连续的,用[a,b]表示 We assume that the range of lane IDs of the next road is continuous, represented by [a, b]

lane_id_b int32

NextRoadLanePlan

FieldTypeLabelDescription
next_road_lanes NextRoadLane repeated

记录去往目标next_road的可行lane集合 set of feasible lanes for going to the next_road

Poi

Poi,用于描述地图上的兴趣点

Poi, describing points of interest on the map

FieldTypeLabelDescription
id int32

Poi id(从7_0000_0000开始) Poi id (starting from 7_0000_0000)

name string

Poi名称 Poi name

category string

Poi分类编码 Poi category code

position city.geo.v2.XYPosition

Poi原始位置 Poi original position

aoi_id int32

Poi所属的Aoi Aoi to which the Poi belongs

capacity int32 optional

Poi的容量(能同时容纳的人数),若无则表示无人数限制 The capacity of Poi (the number of people it can accommodate at the same time), if none, it means there is no limit on the number of people

functions string repeated

Poi所能提供的功能 The functions the Poi can offer

Polyline

折线,用于定义车道等的形状

Polyline, used to define the shape of lanes, etc.

FieldTypeLabelDescription
nodes city.geo.v2.XYPosition repeated

折线上的点 Points of the polyline

PublicTransportSubline

公共交通支线 描述依附于行车路网的公共交通线路

Public transport sub-lines, describe public transport routes attached to the road network

FieldTypeLabelDescription
id int32

支线ID Subline ID

name string

支线名字 Subline name

aoi_ids int32 repeated

该条支线沿途的所有车站AOI,按支线前进顺序排列 All stations along this subline, in the order of advancement of the subline."

station_connection_road_ids RoadIds repeated

依次连接两个相邻车站的road ids Road IDs between two adjacent stations.

type SublineType

支线类型 Type of subline

parent_name string

所属线路名称 Name of the belonging line

schedules SublineSchedules

发车时刻表 departure schedule

taz_costs HeuristicTAZCost repeated

预计算公共交通权重 Precalculate public transport costs

Road

Road,用于描述道路

Road, describing roads

FieldTypeLabelDescription
id int32

道路id(从2_0000_0000开始) Road ID (starting from 2_0000_0000)

name string

道路名字 road name

lane_ids int32 repeated

属于该道路Road的所有车道/人行道等lane All lanes/sidewalks belonging to the road lane_id是按从最左侧车道到最右侧车道(从前进方向来看)的顺序给出的 lane_ids are given in order from the leftmost lane to the rightmost lane (viewed from the forward direction)

next_road_lane_plans NextRoadLanePlan repeated

对于包含动态车道的道路,需要通过这一项来指定所有的候选方案 For roads containing dynamic lanes, this is required to specify all candidates

RoadIds

FieldTypeLabelDescription
road_ids int32 repeated

SublineSchedules

发车时刻表

Subline departure schedule

FieldTypeLabelDescription
departure_times double repeated

始发站发车时间 Departure time from the departure station

offset_times double repeated

到达沿途站点预计时间 Estimated time to arrive at stops along the way

AoiType

TODO(张钧): 移除该项,重新设计公交地铁系统

NameNumberDescription
AOI_TYPE_UNSPECIFIED 0

未指定 unspecified

AOI_TYPE_BUS_STATION 1

公交站点 bus station

AOI_TYPE_OTHER 2

其他 other

LandUseType

土地利用类型,参照国标GB/T 21010—2007

Land use type, refer to the national standard GB/T 21010-2007

http://www.gscloud.cn/static/cases/%E3%80%8A%E5%9C%9F%E5%9C%B0%E5%88%A9%E7%94%A8%E7%8E%B0%E7%8A%B6%E5%88%86%E7%B1%BB%E3%80%8B%E5%9B%BD%E5%AE%B6%E6%A0%87%E5%87%86gb_t21010-2007(1).pdf

NameNumberDescription
LAND_USE_TYPE_UNSPECIFIED 0

未指定 unspecified

LAND_USE_TYPE_COMMERCIAL 5

商服用地 commercial land

LAND_USE_TYPE_INDUSTRIAL 6

工矿仓储用地 Industrial and storage land

LAND_USE_TYPE_RESIDENTIAL 7

住宅用地 residential land

LAND_USE_TYPE_PUBLIC 8

公共管理与公共服务用地 Public management and public service land

LAND_USE_TYPE_TRANSPORTATION 10

交通运输用地 transportation land

LAND_USE_TYPE_OTHER 12

其他土地 other land

LaneConnectionType

车道连接类型

Lane connection type

NameNumberDescription
LANE_CONNECTION_TYPE_UNSPECIFIED 0

未指定 unspecified

LANE_CONNECTION_TYPE_HEAD 1

连接处为道路开头 The connection is at the lane head

LANE_CONNECTION_TYPE_TAIL 2

连接处为道路结尾 The connection is at the lane tail

LaneTurn

车道转向

lane turn type

NameNumberDescription
LANE_TURN_UNSPECIFIED 0

未指定 unspecified

LANE_TURN_STRAIGHT 1

直行 go straight

LANE_TURN_LEFT 2

左转 turn left

LANE_TURN_RIGHT 3

右转 turn right

LANE_TURN_AROUND 4

掉头 turn around

LaneType

车道类型

Lane type

NameNumberDescription
LANE_TYPE_UNSPECIFIED 0

未指定 unspecified

LANE_TYPE_DRIVING 1

行车 driving

LANE_TYPE_WALKING 2

步行 walking

LANE_TYPE_RAIL_TRANSIT 3

轨道交通 rail transit

SublineType

支线类型

Type of subline

NameNumberDescription
SUBLINE_TYPE_UNSPECIFIED 0

未指定 unspecified

SUBLINE_TYPE_BUS 1

公交类型支线 The subline is a bus line

SUBLINE_TYPE_SUBWAY 2

地铁类型支线 The subline is a subway line

city/elec/input/v1/input_service.proto

Top

InitRequest

InitResponse

FieldTypeLabelDescription
address string

模拟器gRPC监听地址

control Control

facilities Facilities

map city.map.v2.Map

InputService

Method NameRequest TypeResponse TypeDescription
Init InitRequest InitResponse

city/elec/interaction/v1/elec_service.proto

Top

GetEdgeStatusRequest

GetEdgeStatusResponse

FieldTypeLabelDescription
reason1 string repeated

reason2 string repeated

reason3 string repeated

GetNoPowerAOIRequest

FieldTypeLabelDescription
flag int32

GetNoPowerAOIResponse

FieldTypeLabelDescription
aoi int32 repeated

GetPowerRequest

FieldTypeLabelDescription
id int32

设备id

GetPowerResponse

FieldTypeLabelDescription
power double

功率

GetPowerStatusRequest

FieldTypeLabelDescription
flag int32

GetPowerStatusResponse

FieldTypeLabelDescription
power_status GetPowerStatusResponse.PowerStatusEntry repeated

GetPowerStatusResponse.PowerStatusEntry

FieldTypeLabelDescription
key int32

value double

GetRuinInfoRequest

GetRuinInfoResponse

FieldTypeLabelDescription
one RuinInfo

三级损伤信息

two RuinInfo

three RuinInfo

RuinInfo

FieldTypeLabelDescription
num int32

损坏数量

ratio double

损坏占比

SetStatusRequest

FieldTypeLabelDescription
id int32

设施id

status bool

True 表示恢复,False表示摧毁

SetStatusResponse

ElecService

Method NameRequest TypeResponse TypeDescription
SetStatus SetStatusRequest SetStatusResponse

GetPower GetPowerRequest GetPowerResponse

GetPowerStatus GetPowerStatusRequest GetPowerStatusResponse

GetNoPowerAOI GetNoPowerAOIRequest GetNoPowerAOIResponse

GetRuinInfo GetRuinInfoRequest GetRuinInfoResponse

GetEdgeStatus GetEdgeStatusRequest GetEdgeStatusResponse

city/elec/output/v1/output.proto

Top

Aoi

FieldTypeLabelDescription
id int32

unsatisfied_demand_ratio double

用电需求不满足比例(没电100%/有电0)

unsatisfied_demand_num int32

用电需求不满足人数 (没电就是aoi里的人都不满足)

demand double

该aoi当前时刻的用电需求,单位为KW

supply double

电力系统向该aoi供应的电力,单位为KW

AveragePower

FieldTypeLabelDescription
transformer_500 double

当前各类变压器的平均承受功率,单位为MW

transformer_220 double

transformer_110 double

transformer_10 double

city/elec/output/v1/output_service.proto

Top

OutputRequest

FieldTypeLabelDescription
step int32

ruined_ids int32 repeated

被破坏的节点ID

stopped_ids int32 repeated

由于其他节点被破坏导致停止工作的节点ID

aois Aoi repeated

AOI相关的数据

events city.event.v1.Events

事件数据

resident_unsatisfied_ratio double

居民用电需求不满足比例

resident_demand double

居民总用电需求,MW

aoi_unsatisfied_ratio double

aoi用电需求不满足比例

aoi_unsatisfied_num int32

不满足用电的aoi数量,个数

aoi_demand double

aoi总用电需求,MW

average_powers AveragePower

各类变压器当前的平均承受功率,单位为MW

OutputResponse

OutputService

Method NameRequest TypeResponse TypeDescription
Output OutputRequest OutputResponse

city/event/v1/event_service.proto

Top

PublishRequest

FieldTypeLabelDescription
event Event

PublishResponse

PullRequest

PullResponse

FieldTypeLabelDescription
events Event repeated

EventService

Method NameRequest TypeResponse TypeDescription
Publish PublishRequest PublishResponse

发布事件

Pull PullRequest PullResponse

从事件中心拉取事件

city/event/v2/event.proto

Top

Entity

主语

FieldTypeLabelDescription
type EntityType

实体类型

id int32

实体ID

Event

模拟器中的事件

包含主题、主语(Who)、谓词(内容)、地点(Where)、时间(When)

FieldTypeLabelDescription
topic string

主题

id int32 optional

ID

subject Entity

主语

content string

谓词

position city.geo.v2.Position

地点

t double

时间

EntityType

实体类型

NameNumberDescription
ENTITY_TYPE_UNSPECIFIED 0

未指定

ENTITY_TYPE_LANE 1

Lane

ENTITY_TYPE_ROAD 2

Road

ENTITY_TYPE_JUNCTION 3

Junction

ENTITY_TYPE_AOI 4

AOI

ENTITY_TYPE_POI 5

POI

ENTITY_TYPE_PERSON 6

ENTITY_TYPE_ORG 7

组织

city/event/v2/event_service.proto

Top

GetEventsByTopicRequest

按照topic查询事件请求

FieldTypeLabelDescription
topic string

主题

GetEventsByTopicResponse

按照topic查询事件响应

FieldTypeLabelDescription
events Event repeated

事件列表

ResolveEventsRequest

确认事件已被处理请求

FieldTypeLabelDescription
events Event repeated

事件列表

ResolveEventsResponse

确认事件已被处理响应

EventService

Method NameRequest TypeResponse TypeDescription
GetEventsByTopic GetEventsByTopicRequest GetEventsByTopicResponse

按照topic查询事件

ResolveEvents ResolveEventsRequest ResolveEventsResponse

确认事件已被处理

city/person/v2/motion.proto

Top

PersonMotion

Person(人)的运动状态

Person's motion state

FieldTypeLabelDescription
id int32

ID

status Status

状态 status

position city.geo.v2.Position

位置(包含逻辑位置、XY位置、经纬度位置) Position (including logical position, XY position, longitude and latitude position)

v double

speed

direction double

方向角(atan2计算得到的弧度) Direction angle (radians calculated by atan2)

activity string

活动描述 activity descriptions

l double

长度 length

Status

Person(人)的运行时状态

Person's runtime state

NameNumberDescription
STATUS_UNSPECIFIED 0

未指定 unspecified

STATUS_SLEEP 1

没有移动行为 no mobility behaviors

STATUS_DRIVING 2

开车 driving

STATUS_WALKING 3

步行 walking

STATUS_CROWD 4

室内行人 indoor pedestrian

STATUS_PASSENGER 5

乘客 vehicle passenger

STATUS_WAIT_ROUTE 6

等待路径规划 wait for path routing

STATUS_WAIT_BUS 7

等待公交车 wait for bus coming

STATUS_RAIL_TRANSIT 8

操控轨道交通 operating rail transit

city/map/v2/aoi_service.proto

Top

AoiState

AOI状态

AOI state

FieldTypeLabelDescription
id int32

AOI ID

persons city.person.v2.PersonMotion repeated

AOI内的人 Persons in AOI

GetAoiRequest

获取AOI信息请求

Request for getting AOI information

FieldTypeLabelDescription
aoi_ids int32 repeated

指定AOI ID列表,如果为空,则返回所有AOI信息 List of targeted AOI IDs, if empty, returns all information of AOIs

GetAoiResponse

获取AOI信息响应

Response for getting AOI information

FieldTypeLabelDescription
states AoiState repeated

AOI信息列表 Lis of AOIs information

AoiService

Method NameRequest TypeResponse TypeDescription
GetAoi GetAoiRequest GetAoiResponse

获取AOI信息 Get AOI information

city/map/v2/lane_state.proto

Top

LaneState

Lane状态

Lane state

FieldTypeLabelDescription
id int32

Lane ID

persons city.person.v2.PersonMotion repeated

Lane上的人/车 person/vehicle on the lane

avg_v double

平均速度(m/s) average speed (m/s)

restriction bool

是否限行 whether restricted

light_state LightState

交通灯状态 traffic light state

city/map/v2/lane_service.proto

Top

GetLaneByLongLatBBoxRequest

获取特定区域内的Lane的信息请求

Request for getting lane information in a specific region

FieldTypeLabelDescription
bbox city.geo.v2.LongLatBBox

经纬度范围 latitude and longitude bounding box

exclude_person bool

是否要排除车道上的人的信息 Whether to exclude information of person on the lane

GetLaneByLongLatBBoxResponse

获取特定区域内的Lane的信息响应

Response of getting lane information in a specific region

FieldTypeLabelDescription
states LaneState repeated

Lane的信息 Lane information

GetLaneRequest

获取Lane的信息请求

Request for getting lane information

FieldTypeLabelDescription
lane_ids int32 repeated

指定的Lane id列表,如果为空,则返回所有Lane的信息 List of targeted lane IDs, if empty, returns all information of lanes

exclude_person bool

是否要排除车道上的人的信息 Whether to exclude information of person on the lane

GetLaneResponse

获取Lane的信息响应

Response of getting lane information

FieldTypeLabelDescription
states LaneState repeated

Lane的信息 Lane information

SetLaneMaxVRequest

设置Lane的最大速度(限速)请求

Request for setting lane's maximum speed (speed limit)

FieldTypeLabelDescription
lane_id int32

Lane id

max_v double

最大速度(限速),单位:m/s Maximum speed (speed limit), unit: m/s

SetLaneMaxVResponse

设置Lane的最大速度(限速)响应

Response of setting lane's maximum speed (speed limit)

SetLaneRestrictionRequest

设置Lane限行请求

Request for setting lane's traffic restriction

FieldTypeLabelDescription
lane_id int32

Lane id

restriction bool

限行 Traffic restriction

SetLaneRestrictionResponse

设置Lane限行响应

Response of setting lane's traffic restriction

LaneService

Method NameRequest TypeResponse TypeDescription
SetLaneMaxV SetLaneMaxVRequest SetLaneMaxVResponse

设置Lane的最大速度(限速) Set Lane's maximum speed (speed limit)

SetLaneRestriction SetLaneRestrictionRequest SetLaneRestrictionResponse

设置Lane限行 Set Lane's traffic restriction

GetLane GetLaneRequest GetLaneResponse

获取Lane的信息 Get Lane information

GetLaneByLongLatBBox GetLaneByLongLatBBoxRequest GetLaneByLongLatBBoxResponse

获取特定区域内的Lane的信息 Get Lane information in a specific region

city/map/v2/road_service.proto

Top

GetEventsRequest

GetEventsResponse

FieldTypeLabelDescription
events city.event.v1.Events

GetRoadRequest

查询道路信息请求

Request for getting road information

FieldTypeLabelDescription
road_ids int32 repeated

指定查询的道路ID列表,为空代表查询所有道路 List of targeted road IDs. If empty, it means querying all roads.

exclude_lane bool

是否要排除车道信息 Whether to exclude lane information

exclude_person bool

是否要排除车道上的人的信息(仅在包含车道信息时有效) Whether to exclude information about person in the lane (only valid when lane information is included)

GetRoadResponse

查询道路信息响应

Response of getting road information

FieldTypeLabelDescription
states RoadState repeated

道路信息列表 List of road information

GetRuinInfoRequest

GetRuinInfoResponse

FieldTypeLabelDescription
one RuinInfo

三级损伤信息 Three-level ruin information

two RuinInfo

three RuinInfo

RoadState

道路状态

road state

FieldTypeLabelDescription
id int32

道路ID road ID

avg_v double

道路平均速度(m/s) road average speed (m/s)

level RoadLevel

道路拥堵情况 road congestion level

reason InterruptionReason

道路中断原因 road interruption reason

lanes LaneState repeated

车道情况 lane state

RuinInfo

FieldTypeLabelDescription
num int32

损坏数量。Ruined number

ratio double

损坏占比。Ruined ratio

InterruptionReason

道路中断原因

road interruption reason

NameNumberDescription
INTERRUPTION_REASON_UNSPECIFIED 0

INTERRUPTION_REASON_RUINED 1

INTERRUPTION_REASON_CASCADE 2

INTERRUPTION_REASON_CONGESTION 3

RoadLevel

道路拥堵情况

road congestion level

NameNumberDescription
ROAD_LEVEL_UNSPECIFIED 0

未指定 unspecified

ROAD_LEVEL_CLEAR 1

畅通 clear

ROAD_LEVEL_LIGHT_LOAD 2

轻度拥堵 light load

ROAD_LEVEL_MEDIUM_LOAD 3

中度拥堵 medium load

ROAD_LEVEL_HEAVY_LOAD 4

重度拥堵 heavy load

ROAD_LEVEL_OVERLOAD 5

极端拥堵 overload

ROAD_LEVEL_RESTRICTED 6

限行 restricted

RoadService

Method NameRequest TypeResponse TypeDescription
GetRoad GetRoadRequest GetRoadResponse

查询道路信息 Get road information

GetRuinInfo GetRuinInfoRequest GetRuinInfoResponse

GetEvents GetEventsRequest GetEventsResponse

city/map/v2/traffic_light_service.proto

Top

GetTrafficLightRequest

获取路口的红绿灯信息请求

Reqeust for getting traffic light information

FieldTypeLabelDescription
junction_id int32

信号等相关的接口精确到junction The interfaces related to signals are precise to junction

GetTrafficLightResponse

获取路口的红绿灯信息响应

Response of getting traffic light information

FieldTypeLabelDescription
traffic_light TrafficLight

当前路口处的红绿灯 The traffic light at the junction

phase_index int32

表示当前路口处的红绿灯处于哪一个相位 Which phase the traffic light is currently in

time_remaining double

当前相位的剩余时间 The remaining time of the current phase

SetTrafficLightPhaseRequest

设置路口的红绿灯相位请求

Request for setting traffic light phase

FieldTypeLabelDescription
junction_id int32

需要改变相位的路口编号 The target junction ID

phase_index int32

指定当前路口红绿灯的相位 Specify the traffic light phase

time_remaining double

当前相位的剩余时间 The remaining time of the current phase

SetTrafficLightPhaseResponse

设置路口的红绿灯相位响应

Response of setting traffic light phase

SetTrafficLightRequest

设置路口的红绿灯信息请求

Request for setting traffic light information

FieldTypeLabelDescription
traffic_light TrafficLight

需要改变的红绿灯(含路口编号) The target traffic light (including junction ID)

phase_index int32

指定当前路口处的红绿灯的相位 Specify the phase of the traffic light

time_remaining double

当前相位的剩余时间 The remaining time of the current phase

SetTrafficLightResponse

设置路口的红绿灯信息响应

Response of setting traffic light information

SetTrafficLightStatusRequest

设置路口的红绿灯状态请求

Request for setting traffic light status

FieldTypeLabelDescription
junction_id int32

需要改变状态的路口编号 The target junction ID

ok bool

当前路口红绿灯状态,true为通,false为断 The current traffic light status at the junction, true is on, false is off

SetTrafficLightStatusResponse

设置路口的红绿灯状态响应

Response of setting traffic light status

TrafficLightService

Method NameRequest TypeResponse TypeDescription
GetTrafficLight GetTrafficLightRequest GetTrafficLightResponse

获取路口的红绿灯信息 Get traffic light information

SetTrafficLight SetTrafficLightRequest SetTrafficLightResponse

设置路口的红绿灯信息 Set traffic light information

SetTrafficLightPhase SetTrafficLightPhaseRequest SetTrafficLightPhaseResponse

设置路口的红绿灯相位 Set traffic light phase

SetTrafficLightStatus SetTrafficLightStatusRequest SetTrafficLightStatusResponse

设置路口的红绿灯状态 Set traffic light status

city/person/v1/motion.proto

Top

PersonMotion

Person(人)的运动状态

Person's motion state

FieldTypeLabelDescription
id int32

ID

status Status

状态 status

position city.geo.v2.Position

位置(包含逻辑位置、XY位置、经纬度位置) Position (including logical position, XY position, longitude and latitude position)

v double

speed

direction double

方向角(atan2计算得到的弧度) Direction angle (radians calculated by atan2)

activity string

活动描述 activity descriptions

l double

长度 length

Status

Person(人)的运行时状态

Person's runtime state

NameNumberDescription
STATUS_UNSPECIFIED 0

未指定 unspecified

STATUS_SLEEP 1

没有移动行为 no mobility behaviors

STATUS_DRIVING 2

开车 driving

STATUS_WALKING 3

步行 walking

STATUS_CROWD 4

室内行人 indoor pedestrian

STATUS_PASSENGER 5

乘客 vehicle passenger

STATUS_WAIT_ROUTE 6

等待路径规划 wait for path routing

STATUS_WAIT_BUS 7

等待公交车 wait for bus coming

STATUS_RAIL_TRANSIT 8

操控轨道交通 operating rail transit

city/routing/v2/routing.proto

Top

BusJourneyBody

FieldTypeLabelDescription
transfers TransferSegment repeated

eta double

从起点到终点预计的时间(estimation time of arrival) estimation time of arrival

DrivingJourneyBody

驾车出行方式的路径规划结果

Routing results for driving journey

FieldTypeLabelDescription
road_ids int32 repeated

从起点到终点的道路序列 Road sequence from origin to destination 采用道路序列的原因是主动变道对车道级的导航需要频繁修改 The reason for using road sequences is that active lane changing requires frequent modifications to lane level navigation 优先使用road_ids,如果road_ids为空,则使用route(也可以直接忽略route) Prioritize using road_ids. If road_ids is empty, use route (or simply ignore route)

eta double

从起点到终点预计的时间(estimation time of arrival) estimation time of arrival

Journey

路径规划结果的一部分,含且仅含采用一种交通出行方式的完整出行序列

Part of the routing results, including a complete travel sequence using exactly one travelling mode

FieldTypeLabelDescription
type JourneyType

出行方式 journey travelling mode

driving DrivingJourneyBody optional

驾车 Routing results for driving journey

walking WalkingJourneyBody optional

步行 Routing results of walking journey

by_bus BusJourneyBody optional

公交 Routing results of bus journey

RoadStatus

预计算路况信息

Pre calculate road condition information

FieldTypeLabelDescription
id int32

车道ID Lane ID

speed double repeated

车道在各个时间片(每个5min)的速度 The speed of the lane at each time slot (5 minutes each)

RoadStatuses

预计算道路路况信息集合,对应一个预计算道路况信息pb文件或一个预计算路况信息mongodb collection

Pre calculated road condition information set, corresponding to a pre calculated road condition information PB file or a pre calculated road condition information mongodb collection

FieldTypeLabelDescription
road_statuses RoadStatus repeated

TransferSegment

message BusJourneyBody {

int32 line_id = 1;

int32 start_station_id = 2;

int32 end_station_id = 3;

}

FieldTypeLabelDescription
subline_id int32

start_station_id int32

end_station_id int32

WalkingJourneyBody

步行出行方式的路径规划结果

Routing results of walking journey

FieldTypeLabelDescription
route WalkingRouteSegment repeated

从起点到终点的(Lane+方向)序列 The (Lane+direction) sequence from the origin to destination

eta double

从起点到终点预计的时间(estimation time of arrival) estimation time of arrival

WalkingRouteSegment

步行出行方式的路径规划结果中的一段

A segment in the routing results of walking journey

FieldTypeLabelDescription
lane_id int32

Lane ID

moving_direction MovingDirection

移动方向 moving direction

JourneyType

移动方式

travelling mode

Journey用以描述采用一种特定交通方式从一点出发到达另一点的路径。

Journey is used to describe the path from one point to another using one specific travelling mode

一般来说,多个Journey是一个Trip的“实现”。

Generally, multiple Journeys are used to "implement" a Trip

例如:Trip(从清华乘地铁到天安门):

For example: Trip (taking the subway from Tsinghua to Tiananmen Square):

Journey(步行到地铁站)->Journey(地铁)->Journey(步行到天安门)

Journey (walking to subway station) -> Journey (subway) -> Journey (walking to Tiananmen Square)

NameNumberDescription
JOURNEY_TYPE_UNSPECIFIED 0

未指定 unspecified

JOURNEY_TYPE_DRIVING 1

驾车 driving

JOURNEY_TYPE_WALKING 2

步行 walking

JOURNEY_TYPE_BY_BUS 3

公交 taking bus

MovingDirection

步行移动方向

Walking direction

行人前进的方向与Lane的正方向(s增大的方向)的关系

The relationship between the direction of pedestrian movement and the positive direction of Lane (the direction where s increases)

NameNumberDescription
MOVING_DIRECTION_UNSPECIFIED 0

未指定 unspecified

MOVING_DIRECTION_FORWARD 1

与正方向同向 In the same direction as the positive lane direction

MOVING_DIRECTION_BACKWARD 2

与正方向反向 In the opposite direction as the positive lane direction

RouteType

导航请求类型

routing type

NameNumberDescription
ROUTE_TYPE_UNSPECIFIED 0

未指定 unspecified

ROUTE_TYPE_DRIVING 1

驾车 driving

ROUTE_TYPE_WALKING 2

步行 walking

ROUTE_TYPE_BUS 3

公交 by bus

ROUTE_TYPE_SUBWAY 4

地铁 by subway

ROUTE_TYPE_BUS_SUBWAY 5

地铁+公交,包含两者的换乘 both bus and subway are available, including multimodal transfers

city/trip/v2/trip.proto

Top

Schedule

时刻表

Schedule

关于出发时间的说明如下:

The explanation about the departure time is as follows:

1. Schedule的开始时刻是 departure_time 或者 参考时刻+wait_time,

1. The start time of the Schedule is either departure_time or reference time+wait_time,

参考时刻定义为上一Schedule的结束时刻(即它最后一个Trip的结束时刻),

The reference time is defined as the end time of the previous Schedule (i.e. the end time of its last Trip),

或者当它为第一个Schedule时定义为Person更新Schedule后的首次Update

Alternatively, when it is the first Schedule, it can be defined as the first Update time after Person updates the Schedule

时刻(当有准确时间要求时建议直接指定departure_time)

(it is recommended to specify departuretime directly when there is an accurate time requirement)

2. Trip的开始时刻是 departure_time 或者 参考时刻+wait_time,参考

2. The start time of the Trip is either departure_time or reference time+wait_time,

时刻定义为上一Trip的结束时刻,或者当它为第一个Trip时定义为所属的

The reference time is defined as the end time of the previous Trip, or when it is the first Trip,

Schedule的开始时刻

it is defined as the start time of the Schedule to which it belongs

3. Person的实际运行时刻取决于Trip的开始时刻,例如它的首次运行是第一

3. The actual running time of a Person depends on the start time of the Trip,

个Schedule中第一个Trip的开始时刻

for example, its first run is the start time of the first Trip in the first Schedule

FAQ

Q1: 同时指定Schedule和第一个Trip的departure_time会怎样?

Q1: What would happen if both the Schedule and the departuretime of the first Trip were specified simultaneously?

A1: 参照(2),只看Trip的departure_time

A1: Referring to (2), only depend on the departuretime of Trip

Q2: Schedule和第一个Trip同时指定wait_time=10会怎样?

Q2: What would happen if both the Schedule and the first Trip were specified with wait_time=10 at the same time?

A2: 参照(2),等待时间为10+10=20

A2: Referring to (2), the waiting time is 10+10=20

FieldTypeLabelDescription
trips Trip repeated

出行列表 List of trips

loop_count int32

trips的执行次数,0表示无限循环,大于0表示执行几次 The number of times trips are executed, where 0 represents infinite loops and greater than 0 represents how many times they are executed

departure_time double optional

期望的出发时间(单位: 秒) Expected departure time (in seconds)

wait_time double optional

期望的等待时间(单位:秒),如果departure_time为空则wait_time默认为0 Expected waiting time (in seconds), if departure_time is empty, wait_time defaults to 0

Trip

出行

Trip

FieldTypeLabelDescription
mode TripMode

出行方式 trip mode

end city.geo.v2.Position

目的地,如果目的地是AOI且指定了XYPosition,则以XYPosition为室内步行的终点 destination, if the destination is AOI and XYPosition is specified, XYPosition is the end point of indoor walking

departure_time double optional

期望的出发时间(单位: 秒) Expected departure time (in seconds)

wait_time double optional

期望的等待时间(单位:秒),如果departure_time为空则wait_time默认为0 The expected waiting time (in seconds), if departure_time is empty, wait_time defaults to 0

arrival_time double optional

期望的到达时间(单位: 秒) Expected arrival time (in seconds)

activity string optional

本次出行目的地的活动名 The activity name of the destination for this trip

model string optional

本次出行对应的可视化模型(覆盖Person Attribute中的默认模型) The visual model corresponding to this trip (overriding the default model in Person Attribute)

routes city.routing.v2.Journey repeated

预计算的导航结果 Pre calculated routing results

trip_stops TripStop repeated

本次出行的所有停靠点 stop points of this trip

TripStop

停靠点

stop points of person

FieldTypeLabelDescription
aoi_position city.geo.v2.AoiPosition optional

停车点AOI坐标(可选) Parking position coordinates AOI (optional)

lane_position city.geo.v2.LanePosition

停车点Lane+S坐标(必须提供) Parking position coordinates Lane+S (must be provided)

duration double

停车持续时间 Parking duration time (s)

TripMode

出行偏好

Preferred trip travel mode

NameNumberDescription
TRIP_MODE_UNSPECIFIED 0

未指定出行方式 unspecified

TRIP_MODE_WALK_ONLY 1

仅步行 walking only

TRIP_MODE_DRIVE_ONLY 2

仅开车 driving only

TRIP_MODE_BUS_WALK 4

乘坐公交车(含站点间步行换乘) taking bus with walking to transit bus line between stations

TRIP_MODE_BIKE_WALK 5

当有自行车时选择骑自行车,否则步行 Riding bikes if avaible, otherwise walking

TRIP_MODE_TAXI 6

乘出租车 taking a taxi

TRIP_MODE_SUBWAY_WALK 7

乘坐地铁(含站点间步行换乘) taking subway with walking to transit bus line between stations

TRIP_MODE_BUS_SUBWAY_WALK 8

乘坐公交车(含站点间步行换乘) taking bus and subway with walking to transit bus line between stations

city/person/v1/person.proto

Top

BikeAttribute

自行车附加属性

Bike additional attributes

FieldTypeLabelDescription
speed double

单位: m/s speed: m/s

model string optional

自行车模型标签 Bike model tag

BusAttribute

公交车附加属性

Bus additional attributes

FieldTypeLabelDescription
subline_id int32

公交线路ID bus line ID

capacity int32

公交车容量 bus capacity

model string optional

公交车模型标签 bus model tag

type BusType

公交车类型 type of bus

PedestrianAttribute

行人附加属性

Pedestrian additional attributes

FieldTypeLabelDescription
speed double

单位: m/s speed: m/s

model string optional

行人模型标签 Pedestrian model tag

Person

智能体

agent

FieldTypeLabelDescription
id int32

智能体ID agent ID

attribute PersonAttribute

参数 attribute

home city.geo.v2.Position

初始位置 initial position

schedules city.trip.v2.Schedule repeated

初始日程 initial schedules

vehicle_attribute VehicleAttribute optional

车辆附加属性 vehicle addtional attribute

bus_attribute BusAttribute optional

公交车附加属性 bus additional attribute

pedestrian_attribute PedestrianAttribute optional

行人附加属性 pedestrian additional attribute

bike_attribute BikeAttribute optional

自行车附加属性 bike addition attribute

labels Person.LabelsEntry repeated

[可空] 额外的标签(例如:抢修车类型->电网) [can be empty] additional tags (e.g. repair vehicle type -> power grid)

profile PersonProfile optional

[可空] 智能体简介 [can be empty] agent profile

work city.geo.v2.Position optional

工作地位置 work position

output_when_sleep bool optional

是否在SLEEP状态下也输出可视化(仅限车辆) Whether to output visualization in the SLEEP state (vehicles only)

Person.LabelsEntry

FieldTypeLabelDescription
key string

value string

PersonAttribute

智能体属性(通用)

Agent properties (general)

FieldTypeLabelDescription
length double

单位: m,长度 length: m

width double

单位: m,宽度 width: m

max_speed double

单位: m/s max speed: m/s

max_acceleration double

单位: m/s^2, 最大加速度(正值) max accelaration: m/s^2 (positive value)

max_braking_acceleration double

单位: m/s^2, 最大减速度(负值) max deceleration: m/s^2 (negative value)

usual_acceleration double

单位: m/s^2, 一般加速度(正值),要求小于最大加速度 usual acceleration: m/s^2 (positive value), required to be less than the max acceleration

usual_braking_acceleration double

单位: m/s^2, 一般减速度(负值),要求大于最大减速度 usual deceleration: m/s^2 (negative value), required to be greater than the max deceleration

PersonProfile

智能体简介

agent profile

FieldTypeLabelDescription
age int32

年龄 age

education Education

教育水平 education level

gender Gender

性别 gender

consumption Consumption

消费水平 consumption level

house_id int32

房屋ID 区分不同家庭 House ID, identify which family this person belongs to

Persons

智能体集合,对应一个智能体pb文件或一个智能体mongodb collection

Agent collection, corresponding to an agent pb file or an agent mongodb collection

FieldTypeLabelDescription
persons Person repeated

VehicleAttribute

车辆附加属性

Vehicle additional attributes

FieldTypeLabelDescription
lane_change_length double

单位: m, 完成变道所需路程 Distance required to complete lane change: m

min_gap double

单位:米,本车距离前车的最小距离 The minimum distance between the vehicle and the vehicle in front: m

model string optional

车辆模型标签 Vehicle model tag

BusType

公交车

Type of Bus

NameNumberDescription
BUS_TYPE_UNSPECIFIED 0

未指定 unspecified

BUS_TYPE_BUS 1

公交类型 The bus is a trolleybus, BRT, eta.

BUS_TYPE_SUBWAY 2

地铁类型 The bus is a subway

Consumption

智能体消费水平

agent consumption level

NameNumberDescription
CONSUMPTION_UNSPECIFIED 0

未指定 unspecified

CONSUMPTION_LOW 1

低 low

CONSUMPTION_RELATIVELY_LOW 2

较低 relatively low

CONSUMPTION_MEDIUM 3

中等 medium

CONSUMPTION_RELATIVELY_HIGH 4

较高 relatively high

CONSUMPTION_HIGH 5

高 high

Education

智能体教育等级

Agent education level

NameNumberDescription
EDUCATION_UNSPECIFIED 0

未指定 unspecified

EDUCATION_DOCTOR 1

博士 doctor

EDUCATION_MASTER 2

硕士 master

EDUCATION_BACHELOR 3

本科 bachelor

EDUCATION_HIGH_SCHOOL 4

高中 high school

EDUCATION_JUNIOR_HIGH_SCHOOL 5

初中 junior high school

EDUCATION_PRIMARY_SCHOOL 6

小学 primary school

EDUCATION_COLLEGE 7

大专 college

Gender

智能体性别

agent gender

NameNumberDescription
GENDER_UNSPECIFIED 0

未指定 unspecified

GENDER_MALE 1

男性 male

GENDER_FEMALE 2

女性 female

city/person/v1/person_runtime.proto

Top

PersonRuntime

智能体运行时信息

FieldTypeLabelDescription
base Person optional

person信息 person information

motion PersonMotion

person运动信息 person motion information

events city.event.v2.Event repeated

事件信息 event information

city/person/v1/vehicle.proto

Top

LC

变道相关的信息

lane change related information

FieldTypeLabelDescription
shadow_lane_id int32

影子车道ID(变道前的车道) shadow lane id (lane before lane change)

shadow_s double

投影到影子车道的坐标 s coordinate projected to shadow lane

angle double

变道过程车头相对于前进方向的偏转角(弧度,总是为正,0代表不转向) deviation angle of the vehicle head relative to the forward direction during lane change (radians, always positive, 0 means no steering)

completed_ratio double

已完成的变道比例 completed ratio of lane change

ObservedLane

观测到的车道

observed lane

FieldTypeLabelDescription
id int32

Lane ID

restriction bool

是否限行 whether restricted

light_state LightState

交通灯状态 traffic light state

light_remaining_time double

交通灯剩余时间 remaining time of traffic light

ObservedVehicle

观测到的车辆

observed vehicles

FieldTypeLabelDescription
id int32

车辆编号 vehicle id

motion PersonMotion

当前的车辆运行时信息 current vehicle runtime information

relative_distance double

相对距离 relative distance

relation VehicleRelation

关系枚举 relation enumeration

VehicleAction

车辆控制信息

vehicle control information

FieldTypeLabelDescription
id int32

车辆编号 vehicle id

acc double

本轮更新中设定的加速度 acceleration set in this step

lc_target_id int32 optional

变道目标(可选,不设置代表不变道或保持变道状态) lane change target (optional, not set means no lane change)

angle double

变道过程的转向角度 steering angle during lane change

VehicleEnv

FieldTypeLabelDescription
id int32

车辆编号 vehicle id

runtime VehicleRuntime

当前的车辆运行时信息 current vehicle runtime information

journey city.routing.v2.Journey

当前的路径规划结果 journey: current routing result

observed_vehicles ObservedVehicle repeated

观测到的车辆 observed vehicles

observed_lanes ObservedLane repeated

观测到的车道状态 observed lane states

VehicleRuntime

FieldTypeLabelDescription
base PersonMotion

基本运行时信息 basic runtime information

lc LC optional

变道信息 lane change information

action VehicleAction optional

本轮车辆行为(获取车辆环境信息时不返回) vehicle action in the step (not returned when getting vehicle environment information)

running_distance double

走过的里程 running distance

num_going_astray int32

走错路次数 number of going astray

departure_time double

出发时刻 departure time

eta double

预计到达时刻(导航返回的eta+出发时刻) estimated arrival time (eta returned by routing + departure time)

eta_free_flow double

自由流下的预计到达时刻 estimated arrival time under free flow

LightState

交通灯的状态

traffic light state

NameNumberDescription
LIGHT_STATE_UNSPECIFIED 0

未指定 unspecified

LIGHT_STATE_RED 1

红灯 red light

LIGHT_STATE_GREEN 2

绿灯 green light

LIGHT_STATE_YELLOW 3

黄灯 yellow light

VehicleRelation

NameNumberDescription
VEHICLE_RELATION_UNSPECIFIED 0

未指定 unspecified

VEHICLE_RELATION_AHEAD 1

当前车道前车 vehicle ahead in the current lane

VEHICLE_RELATION_BEHIND 2

当前车道后车 vehicle behind in the current lane

VEHICLE_RELATION_SHADOW_AHEAD 3

影子车道前车 vehicle ahead in the shadow lane

VEHICLE_RELATION_SHADOW_BEHIND 4

影子车道后车 vehicle behind in the shadow lane

VEHICLE_RELATION_LEFT_AHEAD 5

当前车道左侧车道前车 vehicle ahead in the left lane

VEHICLE_RELATION_RIGHT_AHEAD 6

当前车道右侧车道前车 vehicle ahead in the right lane

VEHICLE_RELATION_LEFT_BEHIND 7

当前车道左侧车道后车 vehicle behind in the left lane

VEHICLE_RELATION_RIGHT_BEHIND 8

当前车道右侧车道后车 vehicle behind in the right lane

city/person/v1/person_service.proto

Top

AddPersonRequest

新增person请求

Request for adding a new person

FieldTypeLabelDescription
person Person

约定:person中不设置id Convention: personid is not set here

AddPersonResponse

新增person响应

Response of adding a new person

FieldTypeLabelDescription
person_id int32

新增的person分配得到的ID The ID assigned to the newly added person

FetchControlledVehicleEnvsRequest

获取由外部控制行为的vehicle信息请求

Request for getting information of vehicle controlled by external behavior

FetchControlledVehicleEnvsResponse

获取由外部控制行为的vehicle信息响应

Response of getting information of vehicle controlled by external behavior

FieldTypeLabelDescription
vehicle_envs VehicleEnv repeated

由外部控制行为的vehicle信息 Information of vehicle controlled by external behavior

GetAllVehiclesRequest

获取所有车辆请求

Request for getting all vehicles

GetAllVehiclesResponse

获取所有车辆响应

Response of getting all vehicles

FieldTypeLabelDescription
vehicles VehicleRuntime repeated

所有车辆的信息 Information of all vehicles

GetPersonByLongLatBBoxRequest

获取特定区域内的person请求

Request for getting persons in region

FieldTypeLabelDescription
bbox city.geo.v2.LongLatBBox

经纬度范围 longitude and latitude bounding box

exclude_statuses Status repeated

过滤人的状态(状态为列表内的值的人不返回) Filter person's status (person whose status is in the list will not be returned)

return_base bool

设置是否返回base信息 Set whether to return base information

GetPersonByLongLatBBoxResponse

获取特定区域内的person响应

Response of getting persons in region

FieldTypeLabelDescription
persons PersonRuntime repeated

区域内的person的信息 Information of persons in the region

GetPersonRequest

获取person信息请求

Request for getting person information

FieldTypeLabelDescription
person_id int32

person id

GetPersonResponse

获取person信息响应

Response of getting person information

FieldTypeLabelDescription
person PersonRuntime

GetPersonsRequest

获取多个person信息请求

Request for getting information of multiple persons

FieldTypeLabelDescription
person_ids int32 repeated

person id列表,为空则返回所有person List of person ids, return all persons if empty

exclude_statuses Status repeated

过滤人的状态(状态为列表内的值的人不返回),即使包含在person_ids中 Filter person's status (person whose status is in the list will not be returned), even if included in person_ids

return_base bool

设置是否返回base信息 Set whether to return base information

GetPersonsResponse

获取多个person信息响应

Response of getting information of multiple persons

FieldTypeLabelDescription
persons PersonRuntime repeated

person信息 person information

ResetPersonPositionRequest

重置人的位置请求

Request for resetting person's position

FieldTypeLabelDescription
person_id int32

person id

position city.geo.v2.Position

重置位置 reset position

ResetPersonPositionResponse

重置人的位置响应

Response of resetting person's position

SetControlledVehicleActionsRequest

设置由外部控制行为的vehicle的行为请求

Request for setting behavior of vehicle controlled by external behavior

FieldTypeLabelDescription
vehicle_actions VehicleAction repeated

由外部控制行为的vehicle的行为 Behavior of vehicle controlled by external behavior

SetControlledVehicleActionsResponse

设置由外部控制行为的vehicle的行为响应

Response of setting behavior of vehicle controlled by external behavior

SetControlledVehicleIDsRequest

设置由外部控制行为的vehicle请求(下一个step生效)

Request for setting vehicle controlled by external behavior

FieldTypeLabelDescription
vehicle_ids int32 repeated

由外部控制行为的vehicle id列表 List of vehicle ids controlled by external behavior

SetControlledVehicleIDsResponse

设置由外部控制行为的vehicle响应

Response of setting vehicle controlled by external behavior

SetScheduleRequest

修改person的schedule请求

Request for setting person schedule

FieldTypeLabelDescription
person_id int32

person id

schedules city.trip.v2.Schedule repeated

新的schedule(覆盖原有的schedule) New schedule (overwrites the original schedule)

SetScheduleResponse

修改person的schedule响应

Response of setting person schedule

PersonService

Method NameRequest TypeResponse TypeDescription
GetPerson GetPersonRequest GetPersonResponse

获取person信息 Get person information

AddPerson AddPersonRequest AddPersonResponse

新增person 传入person初始位置、目的地表、属性 返回personid Add a new person. Input person's initial location, destination table, and attributes, return personid

SetSchedule SetScheduleRequest SetScheduleResponse

修改person的schedule 传入personid、目的地表 Set person's schedule. Input personid and destination table

GetPersons GetPersonsRequest GetPersonsResponse

获取多个person信息 Get information of multiple persons

GetPersonByLongLatBBox GetPersonByLongLatBBoxRequest GetPersonByLongLatBBoxResponse

获取特定区域内的person Get persons in a specific region

GetAllVehicles GetAllVehiclesRequest GetAllVehiclesResponse

获取所有车辆 Get all vehicles

ResetPersonPosition ResetPersonPositionRequest ResetPersonPositionResponse

重置人的位置(将停止当前正在进行的出行,转为sleep状态) Reset person's position (stop the current trip and switch to sleep status)

SetControlledVehicleIDs SetControlledVehicleIDsRequest SetControlledVehicleIDsResponse

设置由外部控制行为的vehicle Set vehicle controlled by external behavior

FetchControlledVehicleEnvs FetchControlledVehicleEnvsRequest FetchControlledVehicleEnvsResponse

获取由外部控制行为的vehicle信息 Get information of vehicle controlled by external behavior

SetControlledVehicleActions SetControlledVehicleActionsRequest SetControlledVehicleActionsResponse

设置由外部控制行为的vehicle的行为 Set behavior of vehicle controlled by external behavior

city/person/v2/carbon.proto

Top

VehicleCarbon

车辆瞬时碳排放信息

Vehicle instantaneous carbon emission information

FieldTypeLabelDescription
id int32

ID

ds double

delta distance (m)

v double

vehicle speed (m/s)

a double

vehicle acceleration (m/s^2)

u_acc double

energy for acceleration (J)

u_roll double

energy for rolling resistance (J)

u_aero double

energy for air resistance (J)

c_d double

C_D: drag coefficient

city/person/v2/person.proto

Top

BikeAttribute

自行车附加属性

Bike additional attributes

FieldTypeLabelDescription
speed double

单位: m/s speed: m/s

model string optional

自行车模型标签 Bike model tag

BusAttribute

公交车附加属性

Bus additional attributes

FieldTypeLabelDescription
subline_id int32

公交线路ID bus line ID

capacity int32

公交车容量 bus capacity

type BusType

公交车类型 type of bus

EmissionAttribute

车辆碳排附加属性

Carbon emission additional attributes for Vehicles

FieldTypeLabelDescription
weight double

单位: kg,车重 vehicle weight: kg

type VehicleEngineType

车辆引擎类型 vehicle engine type

coefficient_drag double

汽车空气阻力系数 Drag coefficient of the vehicle

lambda_s double

路面摩擦系数 Pavement friction coefficient

frontal_area double

单位: m^2,迎风面积 Frontal area: m^2

fuel_efficiency VehicleEngineEfficiency optional

燃油引擎车辆效率 Fuel vehicle efficiency

electric_efficiency VehicleEngineEfficiency optional

电动引擎车辆效率 Fuel vehicle efficiency

PedestrianAttribute

行人附加属性

Pedestrian additional attributes

FieldTypeLabelDescription
speed double

单位: m/s speed: m/s

model string optional

行人模型标签 Pedestrian model tag

Person

智能体

agent

FieldTypeLabelDescription
id int32

智能体ID agent ID

attribute PersonAttribute

参数 attribute

home city.geo.v2.Position

初始位置 initial position

schedules city.trip.v2.Schedule repeated

初始日程 initial schedules

vehicle_attribute VehicleAttribute optional

车辆附加属性 vehicle addtional attribute

bus_attribute BusAttribute optional

公交车附加属性 bus additional attribute

pedestrian_attribute PedestrianAttribute optional

行人附加属性 pedestrian additional attribute

bike_attribute BikeAttribute optional

自行车附加属性 bike addition attribute

labels Person.LabelsEntry repeated

[可空] 额外的标签(例如:抢修车类型->电网) [can be empty] additional tags (e.g. repair vehicle type -> power grid)

profile PersonProfile optional

[可空] 智能体简介 [can be empty] agent profile

work city.geo.v2.Position optional

工作地位置 work position

output_when_sleep bool optional

是否在SLEEP状态下也输出可视化(仅限车辆) Whether to output visualization in the SLEEP state (vehicles only)

Person.LabelsEntry

FieldTypeLabelDescription
key string

value string

PersonAttribute

智能体属性(通用)

Agent properties (general)

PersonProfile

智能体简介

agent profile

FieldTypeLabelDescription
age int32

年龄 age

education Education

教育水平 education level

gender Gender

性别 gender

consumption Consumption

消费水平 consumption level

house_id int32

房屋ID 区分不同家庭 House ID, identify which family this person belongs to

Persons

智能体集合,对应一个智能体pb文件或一个智能体mongodb collection

Agent collection, corresponding to an agent pb file or an agent mongodb collection

FieldTypeLabelDescription
persons Person repeated

VehicleAttribute

车辆附加属性

Vehicle additional attributes

FieldTypeLabelDescription
length double

单位: m,长度 length: m

width double

单位: m,宽度 width: m

max_speed double

单位: m/s max speed: m/s

max_acceleration double

单位: m/s^2, 最大加速度(正值) max accelaration: m/s^2 (positive value)

max_braking_acceleration double

单位: m/s^2, 最大减速度(负值) max deceleration: m/s^2 (negative value)

usual_acceleration double

单位: m/s^2, 一般加速度(正值),要求小于最大加速度 usual acceleration: m/s^2 (positive value), required to be less than the max acceleration

usual_braking_acceleration double

单位: m/s^2, 一般减速度(负值),要求大于最大减速度 usual deceleration: m/s^2 (negative value), required to be greater than the max deceleration

lane_change_length double

单位: m, 完成变道所需路程 Distance required to complete lane change: m

min_gap double

单位:米,本车距离前车的最小距离 The minimum distance between the vehicle and the vehicle in front: m

headway double

安全车头时距 Safe time headway

model string optional

车辆模型标签 Vehicle model tag

lane_max_speed_recognition_deviation double

本车对车道限速认知的偏差百分比 The deviation of the vehicle's recognition of lane max speed

emission_attribute EmissionAttribute

碳排属性 Carbon emission attribute

VehicleEngineEfficiency

FieldTypeLabelDescription
energy_conversion_efficiency double

能量转换效率:车辆消耗的能量 / 燃料的能量 the energy conversion efficiency: E_{vehicle consumed} / E_{fuel or electricity}

c_ef double

消耗能量(MJ) 折合到CO2排放(g)的系数 the conversion factor from consumed energy (MJ) to CO2 emissions (g)

BusType

公交车

Type of Bus

NameNumberDescription
BUS_TYPE_UNSPECIFIED 0

未指定 unspecified

BUS_TYPE_BUS 1

公交类型 The bus is a trolleybus, BRT, eta.

BUS_TYPE_SUBWAY 2

地铁类型 The bus is a subway

Consumption

智能体消费水平

agent consumption level

NameNumberDescription
CONSUMPTION_UNSPECIFIED 0

未指定 unspecified

CONSUMPTION_LOW 1

低 low

CONSUMPTION_RELATIVELY_LOW 2

较低 relatively low

CONSUMPTION_MEDIUM 3

中等 medium

CONSUMPTION_RELATIVELY_HIGH 4

较高 relatively high

CONSUMPTION_HIGH 5

高 high

Education

智能体教育等级

Agent education level

NameNumberDescription
EDUCATION_UNSPECIFIED 0

未指定 unspecified

EDUCATION_DOCTOR 1

博士 doctor

EDUCATION_MASTER 2

硕士 master

EDUCATION_BACHELOR 3

本科 bachelor

EDUCATION_HIGH_SCHOOL 4

高中 high school

EDUCATION_JUNIOR_HIGH_SCHOOL 5

初中 junior high school

EDUCATION_PRIMARY_SCHOOL 6

小学 primary school

EDUCATION_COLLEGE 7

大专 college

Gender

智能体性别

agent gender

NameNumberDescription
GENDER_UNSPECIFIED 0

未指定 unspecified

GENDER_MALE 1

男性 male

GENDER_FEMALE 2

女性 female

VehicleEngineType

车辆引擎类型

vehicle type

NameNumberDescription
VEHICLE_ENGINE_TYPE_UNSPECIFIED 0

未指定 unspecified

VEHICLE_ENGINE_TYPE_FUEL 1

油车 gasoline vehicle

VEHICLE_ENGINE_TYPE_ELECTRIC 2

电车 electric vehicle

VEHICLE_ENGINE_TYPE_HYBRID 3

混合动力汽车 hybrid vehicle

city/person/v2/person_runtime.proto

Top

PersonRuntime

智能体运行时信息

FieldTypeLabelDescription
base Person optional

person信息 person information

motion PersonMotion

person运动信息 person motion information

events city.event.v2.Event repeated

事件信息 event information

city/person/v2/vehicle.proto

Top

LC

变道相关的信息

lane change related information

FieldTypeLabelDescription
shadow_lane_id int32

影子车道ID(变道前的车道) shadow lane id (lane before lane change)

shadow_s double

投影到影子车道的坐标 s coordinate projected to shadow lane

angle double

变道过程车头相对于前进方向的偏转角(弧度,总是为正,0代表不转向) deviation angle of the vehicle head relative to the forward direction during lane change (radians, always positive, 0 means no steering)

completed_ratio double

已完成的变道比例 completed ratio of lane change

ObservedLane

观测到的车道

observed lane

FieldTypeLabelDescription
id int32

Lane ID

restriction bool

是否限行 whether restricted

light_state LightState

交通灯状态 traffic light state

light_remaining_time double

交通灯剩余时间 remaining time of traffic light

ObservedVehicle

观测到的车辆

observed vehicles

FieldTypeLabelDescription
id int32

车辆编号 vehicle id

motion PersonMotion

当前的车辆运行时信息 current vehicle runtime information

relative_distance double

相对距离 relative distance

relation VehicleRelation

关系枚举 relation enumeration

VehicleAction

车辆控制信息

vehicle control information

FieldTypeLabelDescription
id int32

车辆编号 vehicle id

acc double

本轮更新中设定的加速度 acceleration set in this step

lc_target_id int32 optional

变道目标(可选,不设置代表不变道或保持变道状态) lane change target (optional, not set means no lane change)

angle double

变道过程的转向角度 steering angle during lane change

VehicleEnv

FieldTypeLabelDescription
id int32

车辆编号 vehicle id

runtime VehicleRuntime

当前的车辆运行时信息 current vehicle runtime information

journey city.routing.v2.Journey

当前的路径规划结果 journey: current routing result

observed_vehicles ObservedVehicle repeated

观测到的车辆 observed vehicles

observed_lanes ObservedLane repeated

观测到的车道状态 observed lane states

VehicleRouteAction

修改车辆路由信息

vehicle routing information modification

FieldTypeLabelDescription
id int32

车辆编号 vehicle id

journey city.routing.v2.Journey

新的路径规划结果 new routing result

VehicleRuntime

FieldTypeLabelDescription
base PersonMotion

基本运行时信息 basic runtime information

lc LC optional

变道信息 lane change information

action VehicleAction optional

本轮车辆行为(获取车辆环境信息时不返回) vehicle action in the step (not returned when getting vehicle environment information)

running_distance double

走过的里程 running distance

num_going_astray int32

走错路次数 number of going astray

departure_time double

出发时刻 departure time

eta double

预计到达时刻(导航返回的eta+出发时刻) estimated arrival time (eta returned by routing + departure time)

eta_free_flow double

自由流下的预计到达时刻 estimated arrival time under free flow

carbon VehicleCarbon optional

碳排放信息 carbon emission information

LightState

交通灯的状态

traffic light state

NameNumberDescription
LIGHT_STATE_UNSPECIFIED 0

未指定 unspecified

LIGHT_STATE_RED 1

红灯 red light

LIGHT_STATE_GREEN 2

绿灯 green light

LIGHT_STATE_YELLOW 3

黄灯 yellow light

VehicleRelation

NameNumberDescription
VEHICLE_RELATION_UNSPECIFIED 0

未指定 unspecified

VEHICLE_RELATION_AHEAD 1

当前车道前车 vehicle ahead in the current lane

VEHICLE_RELATION_BEHIND 2

当前车道后车 vehicle behind in the current lane

VEHICLE_RELATION_SHADOW_AHEAD 3

影子车道前车 vehicle ahead in the shadow lane

VEHICLE_RELATION_SHADOW_BEHIND 4

影子车道后车 vehicle behind in the shadow lane

VEHICLE_RELATION_LEFT_AHEAD 5

当前车道左侧车道前车 vehicle ahead in the left lane

VEHICLE_RELATION_RIGHT_AHEAD 6

当前车道右侧车道前车 vehicle ahead in the right lane

VEHICLE_RELATION_LEFT_BEHIND 7

当前车道左侧车道后车 vehicle behind in the left lane

VEHICLE_RELATION_RIGHT_BEHIND 8

当前车道右侧车道后车 vehicle behind in the right lane

city/person/v2/person_service.proto

Top

AddPersonRequest

新增person请求

Request for adding a new person

FieldTypeLabelDescription
person Person

约定:person中不设置id Convention: personid is not set here

AddPersonResponse

新增person响应

Response of adding a new person

FieldTypeLabelDescription
person_id int32

新增的person分配得到的ID The ID assigned to the newly added person

FetchControlledVehicleEnvsRequest

获取由外部控制行为的vehicle信息请求

Request for getting information of vehicle controlled by external behavior

FetchControlledVehicleEnvsResponse

获取由外部控制行为的vehicle信息响应

Response of getting information of vehicle controlled by external behavior

FieldTypeLabelDescription
vehicle_envs VehicleEnv repeated

由外部控制行为的vehicle信息 Information of vehicle controlled by external behavior

route_vehicle_envs VehicleEnv repeated

由外部控制车辆路由的vehicle信息 Information of vehicle controlled by external behavior (control is triggered after entering a new road)

GetAllVehiclesRequest

获取所有车辆请求

Request for getting all vehicles

GetAllVehiclesResponse

获取所有车辆响应

Response of getting all vehicles

FieldTypeLabelDescription
vehicles VehicleRuntime repeated

所有车辆的信息 Information of all vehicles

GetPersonByLongLatBBoxRequest

获取特定区域内的person请求

Request for getting persons in region

FieldTypeLabelDescription
bbox city.geo.v2.LongLatBBox

经纬度范围 longitude and latitude bounding box

exclude_statuses Status repeated

过滤人的状态(状态为列表内的值的人不返回) Filter person's status (person whose status is in the list will not be returned)

return_base bool

设置是否返回base信息 Set whether to return base information

GetPersonByLongLatBBoxResponse

获取特定区域内的person响应

Response of getting persons in region

FieldTypeLabelDescription
persons PersonRuntime repeated

区域内的person的信息 Information of persons in the region

GetPersonRequest

获取person信息请求

Request for getting person information

FieldTypeLabelDescription
person_id int32

person id

GetPersonResponse

获取person信息响应

Response of getting person information

FieldTypeLabelDescription
person PersonRuntime

GetPersonsRequest

获取多个person信息请求

Request for getting information of multiple persons

FieldTypeLabelDescription
person_ids int32 repeated

person id列表,为空则返回所有person List of person ids, return all persons if empty

exclude_statuses Status repeated

过滤人的状态(状态为列表内的值的人不返回),即使包含在person_ids中 Filter person's status (person whose status is in the list will not be returned), even if included in person_ids

return_base bool

设置是否返回base信息 Set whether to return base information

GetPersonsResponse

获取多个person信息响应

Response of getting information of multiple persons

FieldTypeLabelDescription
persons PersonRuntime repeated

person信息 person information

ResetPersonPositionRequest

重置人的位置请求

Request for resetting person's position

FieldTypeLabelDescription
person_id int32

person id

position city.geo.v2.Position

重置位置 reset position

ResetPersonPositionResponse

重置人的位置响应

Response of resetting person's position

SetControlledVehicleActionsRequest

设置由外部控制行为的vehicle的行为请求

Request for setting behavior of vehicle controlled by external behavior

FieldTypeLabelDescription
vehicle_actions VehicleAction repeated

由外部控制行为的vehicle的行为 Behavior of vehicle controlled by external behavior

vehicle_journeys VehicleRouteAction repeated

由外部控制车辆路由的vehicle的新路由 New route of vehicle controlled by external behavior (control is triggered after entering a new road)

SetControlledVehicleActionsResponse

设置由外部控制行为的vehicle的行为响应

Response of setting behavior of vehicle controlled by external behavior

SetControlledVehicleIDsRequest

设置由外部控制行为的vehicle请求(下一个step生效)

Request for setting vehicle controlled by external behavior

FieldTypeLabelDescription
vehicle_ids int32 repeated

由外部控制行为的vehicle id列表 List of vehicle ids controlled by external behavior

route_vehicle_ids int32 repeated

由外部控制车辆路由的vehicle id列表(在进入新的road后触发控制) List of vehicle ids controlled by external behavior (control is triggered after entering a new road)

SetControlledVehicleIDsResponse

设置由外部控制行为的vehicle响应

Response of setting vehicle controlled by external behavior

SetScheduleRequest

修改person的schedule请求

Request for setting person schedule

FieldTypeLabelDescription
person_id int32

person id

schedules city.trip.v2.Schedule repeated

新的schedule(覆盖原有的schedule) New schedule (overwrites the original schedule)

SetScheduleResponse

修改person的schedule响应

Response of setting person schedule

PersonService

Method NameRequest TypeResponse TypeDescription
GetPerson GetPersonRequest GetPersonResponse

获取person信息 Get person information

AddPerson AddPersonRequest AddPersonResponse

新增person 传入person初始位置、目的地表、属性 返回personid Add a new person. Input person's initial location, destination table, and attributes, return personid

SetSchedule SetScheduleRequest SetScheduleResponse

修改person的schedule 传入personid、目的地表 Set person's schedule. Input personid and destination table

GetPersons GetPersonsRequest GetPersonsResponse

获取多个person信息 Get information of multiple persons

GetPersonByLongLatBBox GetPersonByLongLatBBoxRequest GetPersonByLongLatBBoxResponse

获取特定区域内的person Get persons in a specific region

GetAllVehicles GetAllVehiclesRequest GetAllVehiclesResponse

获取所有车辆 Get all vehicles

ResetPersonPosition ResetPersonPositionRequest ResetPersonPositionResponse

重置人的位置(将停止当前正在进行的出行,转为sleep状态) Reset person's position (stop the current trip and switch to sleep status)

SetControlledVehicleIDs SetControlledVehicleIDsRequest SetControlledVehicleIDsResponse

设置由外部控制行为的vehicle Set vehicle controlled by external behavior

FetchControlledVehicleEnvs FetchControlledVehicleEnvsRequest FetchControlledVehicleEnvsResponse

获取由外部控制行为的vehicle信息 Get information of vehicle controlled by external behavior

SetControlledVehicleActions SetControlledVehicleActionsRequest SetControlledVehicleActionsResponse

设置由外部控制行为的vehicle的行为 Set behavior of vehicle controlled by external behavior

city/ping/v1/ping_service.proto

Top

PingRequest

连接测试请求

PingResponse

连接测试响应

PingService

Method NameRequest TypeResponse TypeDescription
Ping PingRequest PingResponse

连接测试

city/routing/v2/cost.proto

Top

Cost

路径成本设置

Route cost settings

FieldTypeLabelDescription
id int32

目标拓扑元素(只支持道路Road) Target topology element (only supports roads)

cost double

路径成本(单位:秒) Path cost (in seconds)

time double optional

设置的时间(单位:秒) Set time (in seconds) 即设置几点几分的道路通行成本为cost That is, set the cost as the value at what time 为空表示设置全天通行成本均为cost If empty, it means that the all-day cost is set to the value.

city/routing/v2/routing_service.proto

Top

GetDrivingCostsRequest

获取行车导航道路通行成本请求

Request for getting driving routing travelling cost

FieldTypeLabelDescription
costs Cost repeated

道路通行成本(按照给定的id和time进行查询) travelling cost (query via the given ID and time)

GetDrivingCostsResponse

获取行车导航道路通行成本响应

Response of getting driving routing travelling cost

FieldTypeLabelDescription
costs Cost repeated

道路通行成本(补全cost后的结果) travelling cost (results after completing the cost)

GetRouteRequest

获取导航路线请求

Request for getting routing path

FieldTypeLabelDescription
type RouteType

导航类型 routing type

start city.geo.v2.Position

起点,约定:包含LanePosition或AoiPosition中的一种 Starting point, convention: as LanePosition or AoiPosition

end city.geo.v2.Position

终点,约定:包含LanePosition或AoiPosition中的一种 Ending point, convention: as LanePosition or AoiPosition

time double

发送导航请求的时间(目前仅在行车导航中使用) The time to send routing request (currently only used in driving routing)

GetRouteResponse

获取导航路线响应

Response of getting routing path

FieldTypeLabelDescription
journeys Journey repeated

SetDrivingCostsRequest

设置行车导航道路通行成本请求

Request for setting driving routing travelling cost

FieldTypeLabelDescription
costs Cost repeated

道路通行成本 travelling cost

SetDrivingCostsResponse

设置行车导航道路通行成本响应

Response of setting driving routing travelling cost

RoutingService

Method NameRequest TypeResponse TypeDescription
GetRoute GetRouteRequest GetRouteResponse

获取导航路线 Get routing path

SetDrivingCosts SetDrivingCostsRequest SetDrivingCostsResponse

设置行车导航道路通行成本 Set traveling cost of driving routing

GetDrivingCosts GetDrivingCostsRequest GetDrivingCostsResponse

获取行车导航道路通行成本 Get traveling cost of driving routing

city/social/v1/message.proto

Top

Message

消息

message

FieldTypeLabelDescription
from int32

消息发送者ID message sender ID

to int32

消息接收者ID message receiver ID

message string

消息内容 message content

t double optional

消息发出时间(秒),如无则为当前模拟时间 Message sending time (in seconds), if none, it is the current simulation time 对于接收到的消息,该字段总是存在 For received messages, this field always exists

city/social/v1/social_service.proto

Top

ReceiveRequest

接收消息请求

Request for receiving message

FieldTypeLabelDescription
id int32

消息接收者ID(即为自身ID) Message receiver ID (i.e. self.ID)

ReceiveResponse

接收消息响应

Response of receiving messages

FieldTypeLabelDescription
messages Message repeated

接收到的消息 Received messages

SendRequest

发送消息请求

Request for sendding message

FieldTypeLabelDescription
messages Message repeated

待发送的消息 Messages to send

SendResponse

发送消息响应

Response of sendding message

SocialService

Method NameRequest TypeResponse TypeDescription
Send SendRequest SendResponse

发送消息 Send message

Receive ReceiveRequest ReceiveResponse

接收消息,并清空该用户的消息队列 Receive messages and clear the user's message queue

city/streetview/v1/streetview.proto

Top

StreetView

街景图片元数据

FieldTypeLabelDescription
lnglat city.geo.v2.LongLatPosition

WGS84经纬度位置

images StreetViewImage repeated

该位置的不同朝向街景图列表

StreetViewImage

街景图片描述

FieldTypeLabelDescription
heading double

朝向,单位度,0-360,0为正北,90为正东,180为正南,270为正西

object string

对象存储的object key

StreetViews

导出Message,对应一个MongoDB Collection

FieldTypeLabelDescription
street_views StreetView repeated

city/sync/v2/sync_service.proto

Top

EnterStepSyncRequest

进入同步状态请求

Enter step sync request

FieldTypeLabelDescription
name string

组件名,需要在同步器启动参数列表中

EnterStepSyncResponse

进入同步状态响应

Enter step sync response

ExitStepSyncRequest

退出同步状态请求

Exit step sync request

FieldTypeLabelDescription
name string

组件名,需要在同步器启动参数列表中

close bool

是否退出服务

ExitStepSyncResponse

退出同步状态响应

Exit step sync response

FieldTypeLabelDescription
close bool

服务是否关闭

GetURLRequest

获取程序URL请求

FieldTypeLabelDescription
name string

组件名,需要在同步器启动参数列表中

GetURLResponse

获取程序URL响应

FieldTypeLabelDescription
url string

程序URL

SetURLRequest

注册程序URL请求

FieldTypeLabelDescription
name string

组件名,需要在同步器启动参数列表中

url string

程序URL

SetURLResponse

注册程序URL响应

SyncService

Method NameRequest TypeResponse TypeDescription
SetURL SetURLRequest SetURLResponse

注册程序URL

GetURL GetURLRequest GetURLResponse

获取程序URL

EnterStepSync EnterStepSyncRequest EnterStepSyncResponse

程序完成本步所有操作,进入同步状态。 要求:进入同步状态的程序不再向其他程序发送消息,直到下一步开始。

ExitStepSync ExitStepSyncRequest ExitStepSyncResponse

程序完成同步阶段(无通信的安全区域)中必要的处理,如为prepare阶段加锁,可以进入准备阶段(恢复通信)。

city/water/input/v1/config.proto

Top

Config

FieldTypeLabelDescription
mongo Mongo

control Control

output Output

Control

FieldTypeLabelDescription
step ControlStep

ControlStep

FieldTypeLabelDescription
start int32

total int32

interval double

Mongo

FieldTypeLabelDescription
uri string

map city.config.v1.MongoPath

rain city.config.v1.MongoPath

Output

FieldTypeLabelDescription
target city.config.v1.OutputTarget

统一的输出目标

switch OutputSwitch

OutputSwitch

是否输出各类数据

FieldTypeLabelDescription
road bool

drainage bool

supply bool

aoi bool

event bool

city/water/input/v1/water.proto

Top

Rain

全天降雨情况,在数据库中体现为一条数据

FieldTypeLabelDescription
rains RainPeriod repeated

RainPeriod

FieldTypeLabelDescription
start int32

起始时间点,单位为秒,但必须整小时

rainfall double

降雨量:单位mm

city/water/input/v1/input_service.proto

Top

InitRequest

InitResponse

FieldTypeLabelDescription
address string

模拟器gRPC监听地址

control Control

rain Rain

map city.map.v2.Map

仅包括header与roads

InputService

Method NameRequest TypeResponse TypeDescription
Init InitRequest InitResponse

city/water/interaction/v1/water_service.proto

Top

GetNoWaterAOIRequest

FieldTypeLabelDescription
flag int32

GetNoWaterAOIResponse

FieldTypeLabelDescription
aoi int32 repeated

GetPumpStatusRequest

FieldTypeLabelDescription
flag int32

GetPumpStatusResponse

FieldTypeLabelDescription
pump_status GetPumpStatusResponse.PumpStatusEntry repeated

GetPumpStatusResponse.PumpStatusEntry

FieldTypeLabelDescription
key int32

value int32

GetRuinInfoRequest

GetRuinInfoResponse

FieldTypeLabelDescription
one RuinInfo

三级损伤信息

two RuinInfo

three RuinInfo

RuinInfo

FieldTypeLabelDescription
num int32

损坏数量

ratio double

损坏占比

SetPumpNetworkStatusRequest

FieldTypeLabelDescription
id int32

水泵id

status bool

True表示恢复,False表示摧毁

type WaterFacilityType

供水水泵还是排水水泵

SetPumpNetworkStatusResponse

SetPumpPowerStatusRequest

FieldTypeLabelDescription
id int32

水泵id

status bool

True表示恢复,False表示摧毁

type WaterFacilityType

供水水泵还是排水水泵

SetPumpPowerStatusResponse

SetPumpStatusRequest

FieldTypeLabelDescription
id int32

水泵id

status bool

True表示恢复,False表示摧毁

type WaterFacilityType

供水水泵还是排水水泵

SetPumpStatusResponse

WaterFacilityType

NameNumberDescription
WATER_FACILITY_TYPE_UNSPECIFIED 0

WATER_FACILITY_TYPE_SUPPLY 1

供水设施

WATER_FACILITY_TYPE_DRAINAGE 2

排水设施

WaterService

Method NameRequest TypeResponse TypeDescription
SetPumpPowerStatus SetPumpPowerStatusRequest SetPumpPowerStatusResponse

SetPumpNetworkStatus SetPumpNetworkStatusRequest SetPumpNetworkStatusResponse

SetPumpStatus SetPumpStatusRequest SetPumpStatusResponse

GetPumpStatus GetPumpStatusRequest GetPumpStatusResponse

GetNoWaterAOI GetNoWaterAOIRequest GetNoWaterAOIResponse

GetRuinInfo GetRuinInfoRequest GetRuinInfoResponse

city/water/output/v1/output.proto

Top

Aoi

FieldTypeLabelDescription
id int32

unsatisfied_num int32

AOI用水需求不满足人数

unsatisfied_ratio double

AOI用水需求不满足比例

demand double

AOI用水需求量 m3/s

supply double

AOI供水量 m3/s

DetailedRoad

FieldTypeLabelDescription
id int32

depths RoadFlood repeated

DrainageBasicInfo

排水基础信息

FieldTypeLabelDescription
average_power double

排水泵平均功率 kW

undrained_volume double

待排水量 m3

drained_volume double

已排水量 m3

average_flow double

平均流量 m3/s

flooded_volume double

积水水量 m3

DrainageMetrics

排水指标

FieldTypeLabelDescription
drainage_basic_info DrainageBasicInfo

load_ratio double

负载

failure_statistics FailureStatistics

FailureStatistics

水泵损坏情况

FieldTypeLabelDescription
failure_num int32

normal_num int32

failure_ratio double

边的状态

FieldTypeLabelDescription
id string

type为LINK_TYPE_PUMP的id将以"Pump_"前缀

type LinkType

flow double

流量 排水网,单位:m3/s 供水网,单位:L/s

ok bool

Node

节点状态

FieldTypeLabelDescription
id string

Node分两种, junction和outfall, outfall的id将以"_out"后缀 但输出不关心NodeType, 不需用type字段显示记录

head double

水头,单位:米

Road

宏观道路水深

FieldTypeLabelDescription
id int32

depth double

RoadFlood

微观水深点

FieldTypeLabelDescription
position city.geo.v2.LongLatPosition

depth double

SupplyBasicInfo

供水基础信息

FieldTypeLabelDescription
average_power double

供水泵平均功率 kW

average_flow double

平均流量 m3/s

SupplyDemandStatistics

供水需求及满足情况

FieldTypeLabelDescription
persons_demand double

居民总用水需求 m3/s

unsatisfied_persons int32

居民需求不满足人数

unsatisfied_persons_ratio double

居民需求不满足比例

aois_demand double

AOI总用水需求 m3/s

unsatisfied_aois int32

AOI需求不满足个数

unsatisfied_aois_ratio double

AOI需求不满足比例

SupplyMetrics

供水指标

FieldTypeLabelDescription
supply_basic_info SupplyBasicInfo

supply_demand_statistics SupplyDemandStatistics

load_ratio double

负载

failure_statistics FailureStatistics

LinkType

NameNumberDescription
LINK_TYPE_UNSPECIFIED 0

LINK_TYPE_PIPE 1

LINK_TYPE_PUMP 2

city/water/output/v1/output_service.proto

Top

OutputRequest

FieldTypeLabelDescription
step int32

roads Road repeated

宏观道路水深

detailed_roads DetailedRoad repeated

微观道路点位水深

drainage_nodes Node repeated

排水节点

drainage_links Link repeated

排水的边

supply_nodes Node repeated

供水节点

supply_links Link repeated

供水的边

aois Aoi repeated

AOI粒度的供水指标

drainage_metric double

排水负载指标

events city.event.v1.Events

水网模拟的各种事件

drainage_metrics DrainageMetrics

排水网指标

supply_metrics SupplyMetrics

供水网指标

OutputResponse

OutputService

Method NameRequest TypeResponse TypeDescription
Output OutputRequest OutputResponse

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)