Metro diversity with second sites; more Asia-Pacific and Eastern Europe POPs

This commit is contained in:
Frederic Jung 2026-10-23 15:07:50 +02:00
parent f93c7de191
commit de79fbd0a7
No known key found for this signature in database
3 changed files with 138 additions and 36 deletions

View file

@ -25,6 +25,19 @@ All notable changes to this project are documented here. The project follows
shedding: bring a generator.
- New local networks: Clarovision, Vivo-ish, Mercado Livre-ly, Jio-graphy,
Airtel-tale, Chunghwa Tele-calm and do-ish.
- Metro diversity: add a second data center in any POP's metro from the
Infra tab, joined by your own metro ring. A power cut, cleaner or A/C
failure then only takes out half the city. You choose which site each
transit, PNI and IX port plugs into, and metro ring cuts can cut site B
off. Some hyperscaler and AI customers now insist on two sites.
- More Asia-Pacific: Melbourne, Brisbane, Darwin, Osaka, Kuala Lumpur,
Bangkok, Ho Chi Minh City, Karachi, Dhaka and Colombo, with cables to match.
Vietnam's cables break a lot, and Darwin has crocodiles.
- Central and Eastern Europe: Warsaw, Prague, Vienna, Budapest, Bucharest,
Tallinn and Istanbul. Baltic cables meet a lot of anchors.
- More local networks: KD-DIY, Opt-Out-Us, Mostly-True Move, Viet-tell,
PTC-hell, Telekom Ma-lazy-sia, Türk Tele-komik, Digi-tally Cheap and
UPC-You-Later.
- Tap your network's name in the top left for a menu to export or import a
save, or start a new network.

File diff suppressed because one or more lines are too long

View file

@ -88,3 +88,36 @@ test('every new city panel renders', () => {
}
assert.deepEqual(errors, []);
});
test('Asia-Pacific and Eastern Europe POPs exist with sellers', () => {
const { ev } = load();
start(ev);
for (const c of ['mel', 'bne', 'drw', 'osa', 'kul', 'bkk', 'sgn', 'khi', 'dac', 'cbo', 'waw', 'prg', 'vie', 'bud', 'buh', 'tll', 'ist'])
assert.ok(ev(`!!CITY['${c}']&&NETS.some(n=>n.price&&n.pops.includes('${c}'))`), c);
assert.ok(ev("CABLE_PAIRS.some(p=>p.cid==='balt')&&CABLE_PAIRS.some(p=>p.cid==='darwin')&&CABLE_PAIRS.some(p=>p.cid==='smw4')"));
});
test('metro diversity: a second site keeps half the POP up and uplinks follow their site', () => {
const { ev, errors } = load();
start(ev);
ev("ACT.launchBB({city:'fra'});ACT.buyTransit({city:'fra',net:'cog',tier:1});ACT.buyTransit({city:'fra',net:'lvl',tier:1});compute()");
const cap0 = ev("nodeCap('fra')");
ev("ACT.addSite({city:'fra'})");
assert.ok(ev("S.pops.fra.site2"));
ev("ACT.siteSet({k:'t',id:S.transit[1].id,s:'b'})");
assert.equal(ev("S.transit[1].site"), 'b');
// a power cut in site A: the POP stays up at half capacity, only site-B transit works
ev("S.pops.fra.sdown={until:S.day+3,s:'a'};compute()");
assert.equal(ev("popUp('fra')"), true);
assert.equal(ev("nodeCap('fra')"), cap0 / 2);
assert.equal(ev("R.useT[S.transit[0].id]||0"), 0, 'site A transit is dark');
assert.ok(ev("R.useT[S.transit[1].id]") > 0, 'site B transit carries traffic');
// the incident path also uses the second site
ev("S.pops.fra.sdown=null;S.pops.fra.gen=false;for(let i=0;i<500&&!S.inc.some(x=>x.type==='site'||x.type==='ring');i++){fireFailure();S.inc=S.inc.filter(x=>x.type==='site'||x.type==='ring');for(const c in S.pops)S.pops[c].down=0;}");
assert.ok(ev("S.inc.some(x=>x.type==='site'||x.type==='ring')"), 'site outages and ring cuts happen');
ev("selectCity('fra');ACT.tab({t:'infra'})");
assert.match(ev("document.getElementById('panelBody').textContent"), /Metro diversity/);
ev("selectCity('fra');ACT.tab({t:'up'})");
assert.match(ev("document.getElementById('panelBody').textContent"), /Site:/);
assert.deepEqual(errors, []);
});