Model Minimum Up Time in Unit Commitment

How can I model the equation for minimum up time in Unit commitment?
How to write a summation over time t1, such that t1 varies from t to t+UP, where t is the index /1*8760/ and UP is uptime for generator, for example 4 hours.