|
@@ -125,10 +125,18 @@ public class PidLambdaV2Container {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
latestRealCPA=realCost/conversion;
|
|
latestRealCPA=realCost/conversion;
|
|
- if(Math.abs(latestRealCPA-cacheItem.latestRealCpa)<0.01){
|
|
|
|
|
|
+ if(Math.abs(latestRealCPA-cacheItem.latestRealCpa)<0.01&&conversion.equals(cacheItem.latestConv)){
|
|
temp.put(creativeId,cacheItem);
|
|
temp.put(creativeId,cacheItem);
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
+ //稳态不调价 或者稳态后采用更保守调价策略
|
|
|
|
+
|
|
|
|
+ if(Math.abs(latestRealCPA-cpa)/cpa<=0.1){
|
|
|
|
+ temp.put(creativeId,cacheItem);
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
Double lambdaNew =cacheItem.calculate(kp,ki,kd,cpa,latestRealCPA);
|
|
Double lambdaNew =cacheItem.calculate(kp,ki,kd,cpa,latestRealCPA);
|
|
if(lambdaNew<minLambda){
|
|
if(lambdaNew<minLambda){
|
|
lambdaNew=minLambda;
|
|
lambdaNew=minLambda;
|