Merge pull request #147 from mxhob1/broadband-price

The broadband panel shows each city's real price per gigabit

# Conflicts:
#	CHANGELOG.md
#	site/index.html
This commit is contained in:
Claude 2026-10-27 07:05:03 +01:00
commit c73665a1bc
No known key found for this signature in database
3 changed files with 19 additions and 3 deletions

View file

@ -12,11 +12,14 @@ All notable changes to this project are documented here. The project follows
- Opt-Out-Us is now Floptus, with its real-world network number. The Indigo-go cable is now Indi-Go-Down.
- A new scenario, Fibre to the Basement, starts you in Sydney in 2013 as a rival to the national network: your own fibre skips its wholesale cut, but the government charges a levy on every broadband bill. Launch broadband in five capitals and land two cables overseas.
- Adelaide, Canberra and Hobart join the map with Vineyard-IX, Capital-IX and Cousin-IX, and Perth and Darwin get their own exchanges, Beard-IX and Gator-IX. Hobart is on Tasmania, so the only way in is the Ferry Express cable across Bass Strait.
- Australia's biggest networks by subscribers arrive: the Toilet Paper Group, Aussie Boyband, Hocus Pocus, Doodoo, Musklink, Speedyloop, Beshort, Spin2wintel, Frogtel and Lintel. New cables: the Sushi Train Cable to Tokyo, Aloha Mate to Los Angeles and the Cut Lunch Cable from Perth to Singapore, which breaks three times as often as most, and SMAP (Somewhere, Maybe Also Perth) around the south coast from Sydney to Perth. Sydney's data centres are now Scrog-DC S1 to S3 and Equinox SY1 to SY7, and AirDrunk builds AI campuses in Western Sydney and Melbourne.
- Australia's biggest networks by subscribers arrive: the Toilet Paper Group, Aussie Boyband, Hocus Pocus, Doodoo, Musklink, Speedyloop, Beshort, Spin2wintel, Frogtel and Lintel. New cables: the Sushi Train Cable to Tokyo, Aloha Mate to Los Angeles and the Cut Lunch Cable from Perth to Singapore, which breaks three times as often as most, and SMAP (Somewhere, Maybe Also Perth) around the south coast from Sydney to Perth. Sydney's data centres are now Scrog-DC S1 to S3 and Equinox SY1 to SY7, and AirDrunk builds AI campuses in Western Sydney and Melbourne.- The broadband panel now shows what homes in each city really pay per gigabit, and the revenue they really bring in. It used to show the base $150 everywhere, so cities that pay less, like Delhi or Moscow, or more, like Doha, looked different from what landed in the bank.
## [1.32.0] — 2026-10-27
- Six Atlantic stops join the map: Halifax, Bermuda, the Azores, Tenerife, Cape Verde and St Helena (#120). The cables across the Atlantic now stop where they really land, and a POP on an island splits a crossing that is just too long for 1.6T into hops that each carry 1.6T or more: Miami to Madrid via Bermuda and the Azores, Atlanta to Lisbon via Bermuda, Lisbon and London to Lagos via Tenerife, and Fortaleza to Europe via Cape Verde. Halifax sits at the start of the shortest line to England. Three new cables, Sol Survivor, Atlantis-2: The Sequel and Canary in the Cable Mine, link the islands, and older ones gain island stops. Exchanges only where one runs today, in Praia and Halifax. New island networks from One Commotion to Pretty Sure South Atlantic, cables that go quiet in the Bermuda Triangle, and a new scenario, Mid-Atlantic Accent, asks you to cross at 1.6T hop by hop. Broadband in a very small town no longer starts above what the town can use.
- Backhauling users to transit far away now makes their internet slow, and slow is bad service. Users feel the round trip to wherever their traffic leaves for transit: up to 20 ms (about 1,500 km) is fine, beyond that service suffers, and past 50 ms broadband and internet services count as bad service, which costs revenue and customers. Traffic over your own peering, PNIs and caches is not penalised. Slow cities show a 🐢 in their panel, a warning in the Transit tab and a list in the NOC.
- The NOC now keeps every notification from the last 10 minutes near the top of its tab, newest first, so nothing that popped up while you looked away is lost. Each one shows its title, a short text and how long ago it happened, repeats fold into one line with a count, and an Open button takes you to the city, link, customer, bank or goal it is about. The NOC button in the top bar and the NOC tab on phones count the ones you have not read yet. Resolved incidents now say what was fixed and where.
- Peering now comes with an inbox: every IX port brings peering requests from networks you have never heard of, and sessions drop when someone blows past the max-prefix limit their PeeringDB promised. Answer requests, decide whether a max-prefix alert is growth or a route leak, and keep your reputation up, because selective networks hear when you never answer. For $20M a year the Large Peering Model AI answers it all for you, quickly and often wrongly.
- PNIs take time: a cross-connect with a small network takes a few weeks, and the big content networks, Tier 1s and big eyeball networks quote 6 to 12 months for a new PNI or an augment. The content networks and Tier 1s no longer do 10G PNIs (100G and up), Doitsche Telekomm still sells 1G, and Microsnoft has no capacity on the US east coast at all.
- Backhauling users to transit far away now makes their internet slow, and slow is bad service. Users feel the round trip to wherever their traffic leaves for transit: up to 20 ms (about 1,500 km) is fine, beyond that service suffers, and past 50 ms broadband and internet services count as bad service, which costs revenue and customers. Traffic over your own peering, PNIs and caches is not penalised. Slow cities show a 🐢 in their panel, a warning in the Transit tab and a list in the NOC.

View file

@ -3679,11 +3679,11 @@ function cityPanel(c){
if(UI.tab==='cust'){
{const nl=R.nodeLoad[c]||0,nc=R.nodeCap[c]||1;if(nl>=nc*0.95)h+=`<section><h3 style="color:var(--bad)">${tr('Router maxed out')}</h3><p class="lead">${tr('Your routers here are forwarding {load} of {cap}. Traffic is being dropped. Upgrade or add a router in the Infra tab.',{load:fmtG(nl),cap:fmtG(nc)})}</p>${btn(tr('Open Infra'),'tab',{t:'links'},'pink sm')}</section>`;}
h+=`<section><h3>${tr('Home broadband')}</h3>`;
if(!p.bb){const s=bbStart(c);h+=`<p class="lead">${tr('Sell internet to homes here. Starts around {start} and grows toward {max} while service is good. Pays {rate} per Gbps served, every month.',{start:fmtG(s),max:fmtG(eyeP(c)),rate:fmt$(EYE_RATE)})}${C.au?` ${scnRule('levy')?tr('It runs on your own fibre, so the Nearly Broadband Network gets nothing. The government still takes a {pct} levy.',{pct:pct(AU_LEVY)}):tr('The Nearly Broadband Network keeps {pct} of it for the last mile.',{pct:pct(AU_WHOLESALE)})}`:''}</p>${btn(tr('Launch broadband <small>{cost}</small>',{cost:fmt$(bbCost(c))}),'launchBB',{city:c},'pink big',S.cash<bbCost(c))}`;}
if(!p.bb){const s=bbStart(c);h+=`<p class="lead">${tr('Sell internet to homes here. Starts around {start} and grows toward {max} while service is good. Pays {rate} per Gbps served, every month.',{start:fmtG(s),max:fmtG(eyeP(c)),rate:fmt$(EYE_RATE*(C.arpu||1))})}${C.au?` ${scnRule('levy')?tr('It runs on your own fibre, so the Nearly Broadband Network gets nothing. The government still takes a {pct} levy.',{pct:pct(AU_LEVY)}):tr('The Nearly Broadband Network keeps {pct} of it for the last mile.',{pct:pct(AU_WHOLESALE)})}`:''}</p>${btn(tr('Launch broadband <small>{cost}</small>',{cost:fmt$(bbCost(c))}),'launchBB',{city:c},'pink big',S.cash<bbCost(c))}`;}
else{const eye=R.cityEye[c]||0;
h+=`<div class="kv"><span>${tr('Eyeball demand')}</span><b>${tr('{a} of {b}',{a:fmtG(eye),b:fmtG(eyeP(c))})}</b></div><div class="bar me"><i style="width:${Math.min(100,eye/eyeP(c)*100)}%"></i></div>
<div class="kv"><span>${tr('Served in {city}',{city:C.name})}</span><b style="color:${sf<0.9?'var(--bad)':'var(--eye)'}">${pct(sf)}</b></div><div class="bar ${sf<0.9?'bad':''}"><i style="width:${sf*100}%"></i></div>
<div class="kv"><span>${tr('Revenue')}</span><b>${tr('{price}/mo',{price:fmt$(eye*sf*EYE_RATE)})}</b></div>
<div class="kv"><span>${tr('Revenue')}</span><b>${tr('{price}/mo',{price:fmt$(eye*sf*EYE_RATE*(C.arpu||1))})}</b></div>
<div class="kv"><span>${tr('Network-wide peering ratio')}</span><b>${pct(R.peerShare||0)}</b></div><p class="note">${tr('More traffic over peering, PNIs and caches means lower latency, and happier users grow faster.')}</p>
${sf<0.9?`<p class="why">${tr('Customers are unhappy and leaving. Add upstream capacity, peering, or a bigger link.')}</p>`:''}
<div class="btns">${p.boost>S.day?`<span class="tag st on">${tr('Ad campaign: {n}d left',{n:p.boost-S.day})}</span>`:btn(tr('Run ad campaign <small>$8k · 2× growth 30d</small>'),'ad',{city:c},'',S.cash<8000)}</div>`;}

View file

@ -465,3 +465,16 @@ test('notifications: the NOC keeps the last ten minutes, folds repeats and opens
assert.equal(nocTab.querySelector('.cnt').classList.contains('red'), false, 'not red: red is for incidents');
assert.deepEqual(errors, []);
});
test('the broadband panel shows what homes in that city really pay, not the base rate', () => {
const { ev, errors } = load();
ev("ACT.start({});S.cash=1e9;S.lvl=4;for(const g of GOALS)S.done[g.id]=0;ACT.buildPop({city:'del'})");
assert.equal(ev('CITY.del.arpu'), 0.4);
assert.match(ev("cityPanel('del')"), new RegExp('Pays \\' + ev('fmt$(EYE_RATE*CITY.del.arpu)') + ' per Gbps'), 'Delhi homes pay 40% of the base rate');
assert.match(ev("cityPanel('fra')"), new RegExp('Pays \\' + ev('fmt$(EYE_RATE)') + ' per Gbps'), 'a city without its own rate pays the base rate');
ev("const t=NETS.find(n=>n.price&&n.pops.includes('del'));ACT.buyTransit({city:'del',net:t.id,tier:1});ACT.launchBB({city:'del'});compute()");
const rev = ev("fmt$(R.cityEye.del*sfOf(R,'del')*EYE_RATE*CITY.del.arpu)");
assert.ok(ev("R.cityEye.del*sfOf(R,'del')") > 0);
assert.ok(ev("cityPanel('del')").includes(rev + '/mo'), `revenue line matches what the month pays (${rev})`);
assert.deepEqual(errors, []);
});