Ejemplo n.º 1
0
float PathTree::segmentTime(Segment::PtrConst s,Segment::ExpediteSupport expediteSupport) const{
    Segment::SegmentType st = s->type();
    float tSpeed = speed(st).value();
    if (s->expediteSupport() == Segment::fullExpediteSupport() && expediteSupport == Segment::fullExpediteSupport()){
        tSpeed *= 1.3;
    };
    return s->length().value() / tSpeed;
};
Ejemplo n.º 2
0
float PathTree::segmentCost(Segment::PtrConst s, Segment::ExpediteSupport expediteSupport) const{
    Segment::SegmentType st = s->type();
    float newCost = s->length().value() * cost(st).value() * s->difficulty().value();
    if (s->expediteSupport() == Segment::fullExpediteSupport() && expediteSupport == Segment::fullExpediteSupport()){
        newCost*= 1.5;
    };
    return newCost;
};