Keyboard Shortcuts
Likes
Search
A bit of info on Rates
开云体育I know some people were poking around with rates. ? After digging extensivly, I discovered that you cannot have a rate for terminal time that is less than 3.6 cents per hour. ? In the W013 (Engler) code, RATEGEN claims that terminal time is represented in $/hr * 1000, so to specify $2/hr, I would enter 2000 (decimal) as the first rate element. ? However…. MTS has another idea when it uses those rates. ? Bottom line – it takes the value you specify and divides it by 36. If you specify less than 18 decimal, you always get zero. ? Anything over that? - it adjusts to the nearest 3.6 cents per hour. ? Relevant code from GETRATES#SA: ? repeat when Cvttbl(J) < 0;???????????????????????????? Cost := Ratefile_Rates(K) + Ratefile_Rates(K + 1) +??? ???Ratefile_Rates(K + 2);????????????????????????????? if Cost > 0??????????????????????????????????????????? then?????????????????????????????????????????????????? ???variable Long_Cost is bit(64),??????????????? ?????? ??????Remainder is bit(32);??????????????????????????? ???Multiply_Long_Integer(Cost, Cvttbl(J), Long_Cost);? ???Divide_Long_Integer(Long_Cost, Cvttbl(J + 1), Cost, ??????Remainder);????????????????????????????????????? ???Remainder *:= 2;??????????????????????????????????? ???if Remainder >= Cvttbl(J + 1)?????????????????????? ???then??????????????????????????????????????????????? ??????Cost +:= 1;??????????????? /* Round */?????????? ???end if;????????????????????? ??????????????????????? end if;???????????? ? The Cvttbl is an integer array – for each rate element, the first one is a Muliplication factor, the second one is what you divide the rate by. ? For TT (terminal time) – it multiplies by 1 and divides by 36. ? So, If I specify 10 (what I think should be a penny per hour), it: ? Takes 10 * 1 = 10 ? Then 10 / 36 (integer divide) and gets 0 with a ?remainder of 10. ? If I multiply that by 2, it comes out to 20 which is less than 36 so the rate gets forced to 0. ? So, it converts the rate you gave it to that rate / 36 and then supposably later, multiplies it by 36 again, but it make the rate a multiple of $0.036 / hr ? Not sure what the meaning of this code is, but bottom line: ? No TT rate < ?$0.036 / hr AND ? All rates are forced to be a multiple of $0.036 / hr for terminal time. ? My next question is:? When I log on, Log off or say $DISPLAY COST, it says “No Charges”, which isn’t true since, if I? have rates and a MAXCHG > 0 on my ID, I get charged. ? What controls this “No Charge” message and what does it really mean. Rich accounts can always sign on, but ARE charged, that is, if they have a MAXCHG > $0.0. ? Probably too much deep geek for most people…. ? ? ?????????????????????????????????? |