Vectorisation of an indicator function for a search heuristic

Comjens

New member
Joined
Apr 17, 2018
Messages
1
I have a great math question for you. I am trying to vectorize an indicator for a search heuristic. In this case it is a timetabling problem.


The indicator function indicates a penalty when one. Here it is:


. . .\(\displaystyle \displaystyle A_{qt}(x) =\begin{cases} 1 & \left[\sum_{c\in C_q,\,r\in R}x_{c,t,r} =1\right] \land\left[ \sum_{c\in C_q,\,r\in R,\,t'\in T,\,\Gamma(t',t)=1}x_{c,t,r} =0\right]\\0 &\text{otherwise} \end{cases} \quad\forall q \in Q,t\in T\)


This is an indicator for if a course c in C_q is adjacent to another course in same C_q.
qin Q is the curriculum dimension n, the C_q is the set of all courses c in the curriculum. t in T is the timeslots dimension m. r\in R is the rooms that can be located into, dimension o. The variable x_{c,t,r} indicated whether a course c is planed in timeslot $t$ and room r. Gamma(t,'t) is an indicator that the timeslot t and t' are adjacent to each other.


The first sum \(\displaystyle \displaystyle sum_{c\in C_q,r\in R}x_{c,t,r} =1\) was quite easy to vectorize into C_q*X* 1, yet the second part I can not seem to figure out. x in X
 
Last edited by a moderator:
Top