I have been trying to figure out a practical way to select events of specific period of a machine. I have a historical data of product arrival/process_start/process_finish times (DateTime) to a machine and events (breakdown,repair,maintenance etc.) of the machine with event_start/event_type/event_finish times (DateTime).
I want to identify those events happened at the machine for a product from time it arrives to it finishes the process.
foreach(var product in productList)
var resultEvents = from events in eventList
where (data.Machine == product.Machine) && (events.Start<product.Arrival && event.Finish < product.Finish)
This is not giving me proper states, and it gets confusing and ambigious as I outline options when a machine may go down... Is it that I should also use process start or am I looking at more && statements?
A quick feedback is greatly appreciated :) Thanks!