Electric utilities are doing something that is equivalent to a person changing clothes without ever getting naked.

They can’t shut down while they switch out old plants for new; they can’t turn off the lights while they retool. They must try to modernize without the communities they serve being affected by so much as a flicker.

What is called “the world’s largest machine” — the coordinated operation of the nation’s 3,000 electric utilities — must hum 24/7 while replacing old polluting plants with new less-polluting plants and adding tranches of renewable power, primarily wind and solar.

I have been watching this feat of changing in place at CPS Energy, the municipally owned electric and natural gas utility in San Antonio. And, I have been following its president and CEO, Rudy D. Garza.

It is a utility with all the stresses now faced by utilities: growing demand, pressure to retire fossil fuel plants and preparing for the onslaught of demand from data centers, driven by the need for more computing for artificial intelligence and other computing needs.

Underlying all of these challenges in San Antonio, as elsewhere, is the need to control the increase in consumer bills. Garza told me with pride that despite the pressures, CPS Energy still has among the lowest electricity rates in the country.

Some in the environmental community may have balked at the company’s recent announcement that the utility was buying two large gas turbine plants in Corpus Christi and one smaller unit used for peaking in Laredo from Talen Energy, which is emerging from bankruptcy. The deal is worth $785 million and will provide CPS Energy with a whopping 1,710 megawatts of power.

Garza told me that CPS Energy will spend additional money on bringing the purchased plants up to its operating standards and preparing them for continuous use. Talen Energy, a power merchant, used them intermittently.

The purchases will enable the utility to shut down so-called steam gas plants. These older gas-fired units don’t use modern, super-efficient turbines but operate like coal-fired plants with a boiler and a lot of wasted heat. Garza said this would reduce air pollution in San Antonio. CPS Energy is also planning to retire coal generation on an accelerated schedule.

Although CPS Energy may not be able to get off of gas entirely, it is a leader in clean energy. It is, Garza said, the largest solar generator in Texas and the second-largest wind user. It has added 50 MW of battery storage and is seeking up to 500 MW of new storage.

Out with the old and in with the new.

This includes the rising electricity demand, which is growing at a rate of 3 percent, and the looming need of data centers. The demand, fed by artificial intelligence, is incalculable and growing exponentially.

Garza said, “The wild card is how quickly these larger loads that are coming to the area get connected to the system. We’ve got eight of these (data centers) on the ground right now in San Antonio with 20 more waiting in the wings.”

Some data centers, Garza said, will need their own backup generation. Although outages are rare on the CPS Energy system, he said the 24/7 needs of the centers are such that the larger ones will have to have their own emergency backup.

CPS Energy isn’t alone in dealing with data centers. It is a challenge faced by utilities nationwide. Rene Haas, CEO of Arm, the UK chip development company, part of Japan’s SoftBank, has described the need for electricity by AI as “insatiable.” A former U.S. secretary of energy told me it is scary and underestimated.

CPS Energy is looking at ways of accommodating the data centers and is at the forefront of new ways of generating. It is collaborating with Joint Base San Antonio — the giant military installation that sits in the center of the CPS Energy service area — to explore the potential for carbon-free solutions. CPS Energy is also looking into geothermal, particularly efficiencies that can be attained with fracking technology, which has changed the oil and gas outlook.

This creativity, which is part of the electric evolution in San Antonio, is taking place across the country. Like changing clothes without getting naked, it is a challenge.