|
@@ -123,12 +123,15 @@ public class PidLambdaContainer {
|
|
conversion=Double.parseDouble(cols[1]);
|
|
conversion=Double.parseDouble(cols[1]);
|
|
cpa=Double.parseDouble(cols[2]);
|
|
cpa=Double.parseDouble(cols[2]);
|
|
realCost=Double.parseDouble(cols[3]);
|
|
realCost=Double.parseDouble(cols[3]);
|
|
- if(conversion<5d){
|
|
|
|
- conversion=1d;
|
|
|
|
|
|
+ if(conversion<3d){
|
|
|
|
+ temp.put(creativeId,cacheItem);
|
|
|
|
+ continue;
|
|
}
|
|
}
|
|
latestRealCPA=realCost/conversion;
|
|
latestRealCPA=realCost/conversion;
|
|
Double lambdaNew =cacheItem.calculate(kp,ki,kd,cpa,latestRealCPA);
|
|
Double lambdaNew =cacheItem.calculate(kp,ki,kd,cpa,latestRealCPA);
|
|
-
|
|
|
|
|
|
+ if(lambdaNew<0.5){
|
|
|
|
+ lambdaNew=0.5;
|
|
|
|
+ }
|
|
cacheItem.lambda=lambdaNew;
|
|
cacheItem.lambda=lambdaNew;
|
|
cacheItem.latestRealCpa=latestRealCPA;
|
|
cacheItem.latestRealCpa=latestRealCPA;
|
|
cacheItem.sumError=sumE;
|
|
cacheItem.sumError=sumE;
|