Routing reference skips exits behind a full path too; #210 test checks the answer; CHANGELOG for players
The reference loop now states the rule #225 adds to compute(): without Auto-TE an exit whose shortest path is already full fits nothing, like a full exit. With the same rule both match bit for bit; before, only float rounding differed (at most 3.6e-14 relative), because the ECMP split no longer counts a dead exit's room.
This commit is contained in:
parent
8c2dd05d0b
commit
928d6f0111
3 changed files with 8 additions and 2 deletions
|
|
@ -1390,6 +1390,10 @@ test('#210 candidate exits on saturated shortest paths are skipped to avoid fall
|
|||
ev("S.links.push({id:'x1',a:'fra',b:'par',kind:'wave',tier:0,km:450,mult:1,mo:1000,ready:0,cut:0});");
|
||||
ev("compute();");
|
||||
assert.ok(ev("R.load['x1'] >= 10 - 1e-6"), 'intercity wave is saturated');
|
||||
assert.ok(ev("R.load['x1'] <= 10 + 1e-6"), 'and carries no more than it can');
|
||||
// Skipping exits behind the full wave changes nothing: routing again gives the same answer.
|
||||
const first = ev('JSON.stringify([R.served,R.citySrv,R.load])');
|
||||
ev("compute();");
|
||||
assert.equal(ev('JSON.stringify([R.served,R.citySrv,R.load])'), first);
|
||||
assert.deepEqual(errors, []);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue