I am trying to model a power generation unit in R which looks at a column in data frame (available (1/0)) to start (1) and it stops (0) once the reference value becomes zero. But once it stops there is a minimum shut down interval, therefore it cant start right away even if the value of available is 1.
example: available(reference column)[1100111] unit (to be modelled) [1100011] unit cant start as early as 6th step as there is a minimum downtime of 3 hours
Help is highly appreciated.
here is an excel sample file showing what i want to achieve. http://www.filedropper.com/sample_5