初始化 MiGu.Server 项目,包含基本的 ASP.NET Core 8 配置、JWT 鉴权、RBAC 权限管理、YARP 反向代理及相关配置文件。新增 build-and-run 脚本以简化构建与运行流程,添加 README 文档以指导用户快速上手。

This commit is contained in:
ArtoriasWu
2026-06-22 09:29:31 +08:00
parent f2ef32a22b
commit f4dec3c120
45 changed files with 0 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
namespace MiGu.Server.Configs;
public record AvoidanceRule(string Id, string ZoneId, string Rule);
public record ZoneSpeedLimit(string ZoneId, double MaxSpeedMps);
public record RoutingPolicy(
string Algorithm,
Dictionary<string, double> Weights,
List<AvoidanceRule> Avoidance,
List<ZoneSpeedLimit> ZoneSpeedLimits)
{
public static RoutingPolicy Default() => new(
Algorithm: "astar",
Weights: new Dictionary<string, double>
{
["distance"] = 1.0,
["congestion"] = 0.5,
["turnPenalty"] = 0.2
},
Avoidance: new List<AvoidanceRule> { new("AV1", "Z-NORTH", "no-entry-while-loading") },
ZoneSpeedLimits: new List<ZoneSpeedLimit> { new("Z-NARROW", 0.5) });
}