Express lightpaths: regen cards for their channels, and dirty connectors dim them (#58)
A regen site added to a fiber that already carries expresses now charges a regen card for every express channel in that glass, as it does for the fiber's own channels. One helper, regenAddCost(), prices it for the action, the fiber panel's button and the MCP dry-run quote, so the three agree. Lighting an express over existing regen sites already paid its cards (xpCost); only adding a site later was free for them. A dirty connector on a fiber is in the glass, so it now dims the expresses riding that fiber by the same factor (capOf multiplies xpG by xpGlassF over the express's fibers), and the express's panel names the fiber. The other link-degrading incidents (MTU mismatch, microbursts, a marginal optic's CRC errors) belong to the fiber's own routers and optics, which an express bypasses, as the optic-failure incident already treats them, so they leave expresses alone. The incident marks the connector with loss.glass=true; sanitize keeps the flag only when it is true, so an old save's loss loads as router-side, as it behaved before. A fiber that only carries expresses can now get the dirty connector too (never the router-side variants), like the backhoe and amp-hut incidents already find it.
This commit is contained in:
parent
2dc8274f34
commit
ae78e82ddb
17 changed files with 123 additions and 9 deletions
|
|
@ -226,7 +226,7 @@ const API_CMD={
|
|||
quote:a=>{const l=S.links.find(x=>x.id===a.id);return l?{setup:sysUpCost(l)}:{};},
|
||||
doc:'Upgrade the line system: Rainbow to ROADMaster to C+L. Every channel goes down for a day.'},
|
||||
regen:{args:[['id','entityId'],['d','step']],watch:['links.#id'],
|
||||
quote:a=>{const l=S.links.find(x=>x.id===a.id);return l&&a.d>0?{setup:REGEN_COST+Math.round((l.ch||[]).reduce((x,c)=>x+optCost(c),0)*REGEN_CH)}:{setup:0};},
|
||||
quote:a=>{const l=S.links.find(x=>x.id===a.id);return l&&a.d>0?{setup:regenAddCost(l)}:{setup:0};},
|
||||
doc:'Add or remove a regeneration site on a terrestrial span, up to REGEN_MAX. Removing is refused if the optics then cannot reach.'},
|
||||
spares:{args:[['id','entityId']],watch:['links.#id'],
|
||||
doc:'Toggle keeping spare optics on site for this span, so a card failure is fixed in hours instead of days.'},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue