The question says it all. I am having difficulties formulating general problems (meaning no numbers just variables). When I read the solution, I understand but I can't figure how to formulate myself in new problems. I need some tips or what to look for, some guidance in general. By formulation I mean finding the objective to be minimized/maximized and the constraints. Here is an example with the solution (you can just look at the solution to understand what I mean):
Formulate the problem of finding an optimal timetable for a school. The timetable is represented by variables $x_{i,j,k} \in \{0,1\}$. The index $i\in \{1, ...,6\}$ stands for the timeslot (with the duration of one lesson) on a day from the morning to the late afternoon. The index $j=\{1, ...,5\}$ stands for a weekday. The index $k\in \{1, ...,6\}$ stands for the subject. The index $\in \{1,2,3\}$ stands for the classroom.The decision variable $x_{i,j,k}$ is set equal to 1 if subject $k$ is given in timeslot $i$ on day $j$. Otherwise $x_{i,j,k}$ is set equal to 0. Formulate the mathematical program under the following constraints: (C1) Subject 1,2 and 3 are given 6 timeslots per week, subjects 4, 5 and 6 only 3 timeslots per week. (C2) At every time, a classroom can be used only for one subject. (C3) The same subject cannot be taught in parallel at the same time. (C4) the same subject should not be taught more than two times per day. Moreover, the total number of lessons taught in timeslots 1, 5 and 6 should be minimized.
(The image has the solution)