You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NICKY: Looks like you were trying to set a break from 9th July to 10th July, on the 3rd. So it's correct that you can't make that change: it's within the akrasia horizon of 7 days.
The bug is that the graph going red and saying "error" doesn't happen when you're on the cusp of the akrasia horizon.
Replicata
Try to set a break on a goal that will kick in 6 days from now (e.g., on Sunday try to set a break for next Sunday). [wait, but Sunday to Sunday is 7 days]
Expect to see the error flagged up on the graph preview (e.g. as would happen if on Sunday you tried to set a break for next Saturday).
Press submit and receive an error.
Working as expected (violating the akrasia horizon):
Edge-case where the graph doesn't warn you but the API won't accept it:
Bee and I discussed this and found the place in the Beebody code (related to roadall in the API) where this needs to be fixed:
today=Date.todayeps=0.000000001# floating point epsilon# diff the roads and return list of days w/in AKH at which the road is easiert=(0..7).map{|v| today + v}.map{|v| {date: v,from: road_front_center_at(from,v,goal.siru),to: road_front_center_at(to,v,goal.siru)}}.select{|v| goal.yaw==1 ? v[:to] + eps < v[:from] : v[:from] + eps < v[:to]}t.empty? ? [nil,true] :
["Error: graph matrix can't get easier in akrasia horizon"]
It's the above that sometimes happens when it shouldn't.
defroad_front_center_at(road,date,siru)# has same sketchiness as roadfunc: returns frontmost point on discontinuitiesstart=road[0][:end]val=road[0][:endv]ifdate >= startroad[1..-1].each{ |v|
if(v[:type]=="ratedate" ||
v[:type]=="valuedate") && v[:end] < dateval=road_segment_endv(v,start,val,siru)start=v[:end]elseval += road_segment_rate(v,start,val,siru) * (date - start)breakend}endvalenddefroad_segment_rate(v,start,startv,siru)# need to normalize rate we are comparing to daily rate:# dailyrate is rate/siru * sidayv[:type]=="ratedate" || v[:type]=="ratevalue" ?
(v[:rate]/siru.to_f)*1.day.seconds :
(v[:endv]-startv)/(v[:end]-start).to_fenddefroad_segment_endv(v,start,startv,siru)# need to normalize rate we are comparing to daily rate:# dailyrate is rate/siru * sidayv[:type]=="ratevalue"|| v[:type]=="valuedate" ?
v[:endv] :
startv + ((v[:rate]/siru.to_f)*1.day.seconds) * (v[:end]-start)end
Desiderata
Via Nicky and RPerce. Widely confirmed.
NICKY: Looks like you were trying to set a break from 9th July to 10th July, on the 3rd. So it's correct that you can't make that change: it's within the akrasia horizon of 7 days.
The bug is that the graph going red and saying "error" doesn't happen when you're on the cusp of the akrasia horizon.
Replicata
Working as expected (violating the akrasia horizon):
Edge-case where the graph doesn't warn you but the API won't accept it:
Cognata
Verbata: akrasia horizon, graph editor, user confusion, baneful bugs,
The text was updated successfully, but these errors were encountered: