Abstract
This study proposes a Bayesian weather-conditioned Wasserstein distributionally robust chance-constrained framework for operating a radial distribution network with a flexible smart factory. Daily macro regimes from clearness and variability indices, hourly micro states from regime-conditioned Gaussian mixture models, and daylight blocks condition a hierarchical empirical Bayes model of photovoltaic proxy forecast errors. The posterior predictive distribution centers each context-dependent Wasserstein ambiguity set, whose radius adapts to the group sample size. The resulting voltage and line-loading margins tighten a 24-hour mixed-integer second-order cone program that co-optimizes network operation and service-constrained production tasks. For day-ahead deployment, regime forecast probabilities replace the unavailable realized label and determine a predictive mixture and an effective-count radius. In model-based validation under realized context labels, only the oracle-context benchmark meets the 5\% individual-constraint target on all 11 representative days. In the 2025 out-of-sample test, which holds out all realized 2025 error outcomes, the proposed probabilistic formulation records annual mean and worst-day daily maximum violation rates of 3.8\% and 18\%, while the oracle and top-1 assignment variants both reach 96\% on their worst days. It also operates more cost-effectively than the more conservative global and macro-only designs, which record lower annual mean rates at higher cost.