Commit ea6805ab authored by 神楽坂玲奈's avatar 神楽坂玲奈

test

parent 635e5c42
...@@ -20,11 +20,10 @@ export class Quality { ...@@ -20,11 +20,10 @@ export class Quality {
assert(0 <= this.reliability && this.reliability <= 1); assert(0 <= this.reliability && this.reliability <= 1);
assert(this.cost >= 0); assert(this.cost >= 0);
if (this.reliability === 0) { if (this.reliability === 0) {
// 同样都是不通的,选直连
return Infinity; return Infinity;
} else { } else {
// 公式 // 公式
return this.delay + (1 - this.reliability) * 6 + this.cost * 0.1; return this.delay + (1 - this.reliability) * 1000 + this.cost * 0.1;
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment