@@ -312,7 +312,11 @@ class TrafficGravityConfig:
312312 emission: One of {"explicit_pairs", "macro_pairwise"} for output format.
313313 max_partners_per_dc: If set, keeps top-K partners per DC by weight.
314314 jitter_stddev: Lognormal sigma for multiplicative noise (0 disables jitter).
315- rounding_gbps: If > 0, round per-pair demands to this step size and conserve totals.
315+ rounding_gbps: If > 0, quantize undirected per-pair totals to this step size.
316+ rounding_policy: Quantization policy for undirected totals. One of
317+ {"nearest", "ceil", "floor"}. "nearest" minimizes absolute error,
318+ "ceil" guarantees non-negative inflation (sum >= exact total), and
319+ "floor" guarantees non-positive inflation (sum <= exact total).
316320 mw_per_dc_region_overrides: Optional overrides by metro name or full DC path
317321 (e.g., "metro3/dc2"). Overrides apply after defaults.
318322 """
@@ -326,6 +330,7 @@ class TrafficGravityConfig:
326330 max_partners_per_dc : int | None = None
327331 jitter_stddev : float = 0.0
328332 rounding_gbps : float = 0.0
333+ rounding_policy : str = "nearest"
329334 mw_per_dc_region_overrides : dict [str , float ] = field (default_factory = dict )
330335
331336
@@ -456,6 +461,9 @@ class TopologyConfig:
456461 # Visualization behavior; default False keeps previous straight-line rendering
457462 _use_real_corridor_geometry : bool = False
458463 _source_path : Path | None = None
464+ # Optional instrumentation fields for debugging/export
465+ _debug_dir : Path | None = None
466+ _source_stem : str | None = None
459467
460468 @classmethod
461469 def from_yaml (cls , config_path : Path ) -> TopologyConfig :
0 commit comments