docker-compose
This commit is contained in:
@@ -7,6 +7,7 @@ import static com.solution.rule.utils.RuleFunction.equipmentRule;
|
||||
import static com.solution.rule.utils.RuleFunction.target;
|
||||
import static com.solution.rule.utils.RuleFunction.position;
|
||||
import static com.solution.rule.utils.RuleFunction.trackRoute;
|
||||
import static com.solution.rule.utils.RuleFunction.groupFormation;
|
||||
|
||||
|
||||
global java.util.Map globalParams;
|
||||
@@ -176,6 +177,29 @@ function Map buildParam(){
|
||||
param.put("trackJamWobbleMeters", 400);
|
||||
param.put("trackJamSegments", 4);
|
||||
|
||||
// ===================== 编组规则参数(写入 TrackParam.Groups + wingmanData) =====================
|
||||
// groupRuleEnabled:是否生成编组节点。
|
||||
param.put("groupRuleEnabled", true);
|
||||
// groupDrawNameSuffix:drawName = 领队装备 Name + 此后缀(默认「编组」)
|
||||
param.put("groupDrawNameSuffix", "编组");
|
||||
// groupDrawNameWithIndex:是否在 drawName 末尾追加序号(避免多组同名),如 J15编组1
|
||||
param.put("groupDrawNameWithIndex", false);
|
||||
// groupFormationMode:onePerRed(每件红装一组) / clusterByCount(按固定人数分组) / singleGroup(全部一组)
|
||||
param.put("groupFormationMode", "onePerRed");
|
||||
// groupClusterSize:clusterByCount 模式下每组人数上限(>=1)
|
||||
param.put("groupClusterSize", 3);
|
||||
// groupLeaderPickMode:byHitRateThenId(命中率高优先,平手 equipmentId 小) / byId(equipmentId 字典序最小)
|
||||
param.put("groupLeaderPickMode", "byHitRateThenId");
|
||||
// groupMinMembersForWingman:组内人数达到该值才生成 wingmanData(否则仅 leader 壳,僚机列表为空)
|
||||
param.put("groupMinMembersForWingman", 2);
|
||||
// wingman 几何参数(相对蓝方主航向 mainBearing 叠加)
|
||||
param.put("wingmanDistanceBaseMeters", 100);
|
||||
param.put("wingmanDistanceStepMeters", 50);
|
||||
param.put("wingmanAngleBaseDeg", 50);
|
||||
param.put("wingmanAngleStepDeg", 15);
|
||||
param.put("wingmanAltBaseMeters", 40);
|
||||
param.put("wingmanAltScale", 1.0);
|
||||
|
||||
return param;
|
||||
}
|
||||
|
||||
@@ -218,3 +242,13 @@ then
|
||||
globalParams.putAll(buildParam());
|
||||
trackRoute($fact, globalParams);
|
||||
end
|
||||
|
||||
rule "编组匹配"
|
||||
salience 60
|
||||
when
|
||||
$fact : DroolsFact(task != null)
|
||||
then
|
||||
// 显式编组规则:填充 TrackParam.Groups(groupType=addGroup)与 wingmanData
|
||||
globalParams.putAll(buildParam());
|
||||
groupFormation($fact, globalParams);
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user