Integration of renewable energy into mining and processing operations is becoming necessary as part of a strategy towards sustainability in the minerals industry. A solar photovoltaic plant along with a battery energy storage system (PV-BESS) can provide a long-term solution to cope with increasing energy costs, thus reducing the tension with other societal competing needs for a key resource such as clean energy. However, sizing these systems is challenging, in face of uncertain ore grindability and solar power availability. In this paper, we present an application of an integrated model to size the PV-BESS, where the variability of ore grindability is modeled using geostatistical tools, solar irradiance variability is captured using a Markov chain simulation model, and the entire system is optimized through linear stochastic optimization, considering a fixed mine schedule for the feed of a semiautogenous grinding (SAG) mill. The main goals are to minimize the costs associated with operating the SAG mill in the presence of a PV-BESS system, understand how the sizing and costs change under the influence of stochastic drivers, and reveal the potential for demand-side management in mines. The size and costs of the necessary infrastructure are determined for a model of estimated grindability and an ensemble of 50 simulated models of grindability, and compared against the sizing and cost of the ground truth. The effect of climate change on solar energy availability is accounted for by forecasting the ratio of excellent, good, and moderate days over bad days in terms of irradiance out to the year 2030. Finally, the effects of stockpiles and feed control according to the processing plant needs, namely a demand-side management approach, are evaluated to reveal the impact on the energy requirements and the sizing of the photovoltaic and storage system. The model is optimized considering a yearly cost function, with hourly resolution for the solar irradiance and hardness models. The results show that integrating solar power into the operation of a SAG mill has potential to reduce the total energy cost by 27%. Robustness against climate change can be achievedwith an increase in total cost of 1%. Finally, use of stockpiles to manage the ore supply to the mill and minimize the energy cost to process it results in a cost reduction of around 2%, which should offset the rehandling cost of managing the stockpiles.