1. ## Summation notation question

I have some data that describes workers login and logout times.
I'm calculating sum of minutes per workshift (which is 8 hours) when workers are logged in.

For example shift starts at 08:00AM and ends 02:00PM. Time is now 11:30 and login logout data i have so far is:

$
\begin{bmatrix}
\mathbf{m} & \mathbf{n}\\
---- & ----\\
0815 & 1010\\
0830 & 1005\\
0845 & 1115
\end{bmatrix}
$

Where m is login time and n is logout time.
Ok, sum of this is sum of differences of each logout-login time and we get:
115+95+150 = 360 minutes.

How to represent this summation with summation notation?
Notation should be working in general since we don't have any matrix data exists for example future login logout times.

2. Originally Posted by tabularasa
I have some data that describes workers login and logout times.
I'm calculating sum of minutes per workshift (which is 8 hours) when workers are logged in.

For example shift starts at 08:00AM and ends 02:00PM. Time is now 11:30 and login logout data i have so far is:

$
\begin{bmatrix}
\mathbf{m} & \mathbf{n}\\
---- & ----\\
0815 & 1010\\
0830 & 1005\\
0845 & 1115
\end{bmatrix}
$

Where m is login time and n is logout time.
Ok, sum of this is sum of differences of each logout-login time and we get:
115+95+150 = 360 minutes.

How to represent this summation with summation notation?
Notation should be working in general since we don't have any matrix data exists for example future login logout times.
Is this what you are asking?

$\sum_{r=1}^3 |(n_r - m_r)|$

I dont think so, probably you are asking incase of shift change
Got you its not what you want

Is this what you are asking?

$\sum_{r=1}^3 |(n_r - m_r)|$

Yes, thank you. r is unknown in real situation. We don't know how many login-logout events will exist. We know only that we have to sum all login-logout where login and logout are between shift starttime and current time.

This might needs some additional conditions like:
$
\left \{\forall n\in x|S_1\leq x\leq S_2\right \},\left \{\forall m\in x|S_1\leq x\leq S_2\right \}
$

$\\
where,\\S_2=current time, S_1=shift start time$

So, summing this all together. What would the summation look like?

4. Oh, ok. Yes your summation works. We just let r unknown. r is just r.
Is this right?

5. Originally Posted by tabularasa
Oh, ok. Yes your summation works. We just let r unknown. r is just r.
Is this right?
I dont think its gonna work because:

- The time has to be calculated in minutes
and the given data is in standard notation of time
example; 0855 and 1040
- There is a change of shift (can be eliminated by using conditions)

6. Representing m and n with decimals like 08,15 10,10 and refactoring summation notation to summing function f(m,n) which calculates:
(60*integerpartof(n)+decimalpartof(n)) - (integerpartof(m)+decimalpartof(m)) we finally get the right notation?

Yes this one works only if there is no different years, months or days between m and n.

7. Originally Posted by tabularasa
Representing m and n with decimals like 08,15 10,10 and refactoring summation notation to summing function f(m,n) which calculates:
(60*integerpartof(n)+decimalpartof(n)) - (integerpartof(m)+decimalpartof(m)) we finally get the right notation?

Yes this one works only if there is no different years, months or days between m and n.
This will happen if you represent you m and n as divided by 100 ie;

$
60 \times [n/100]+\{n/100\} - 60\times[m/100] -\{m/100\}
$