从 Simple-FR 拆出 Platform.Server 并重命名为 MiGu.Server;frontends 源码与构建脚本迁入本仓库。地图监控在 projection/cars 失败或为空时回退 reflection 车辆列表;Simple 仓库已移除旧 Platform.Server。 Co-authored-by: Cursor <cursoragent@cursor.com>
17 lines
724 B
C#
17 lines
724 B
C#
namespace MiGu.Server.Configs;
|
|
|
|
public record IntersectionPolicy(string Id, List<string> SiteIds, string Mode);
|
|
public record ZoneMutex(string Id, List<string> ZoneIds);
|
|
public record DynamicYield(string Id, string From, string To, string Condition);
|
|
|
|
public record TrafficRule(
|
|
List<IntersectionPolicy> Intersections,
|
|
List<ZoneMutex> Mutex,
|
|
List<DynamicYield> Yields)
|
|
{
|
|
public static TrafficRule Default() => new(
|
|
Intersections: new List<IntersectionPolicy> { new("IX1", new List<string> { "S006", "S007" }, "mutex") },
|
|
Mutex: new List<ZoneMutex> { new("MZ1", new List<string> { "Z-CROSS" }) },
|
|
Yields: new List<DynamicYield> { new("YD1", "A 区", "B 区", "priority<peer") });
|
|
}
|