Note: this problem has been taken from the
Logic in Information Technology subject at Barcelona School of Informatics.
Solve the following exercise by means of a reduction to
SAT:
- Determine if a steel mill can
finish a set of tasks in h hours.
The steel mill can perform up to 3 tasks at the same time, and disposes of
2 furnaces and 1 refrigerator.
Each task consists of three phases:
preparation (1 hour), smelting (x hours), and
cooling down (5 hours). Once a task has started, all the process must be
performed without interruption.
The smelting phase requires a furnace, whereas the cooling down phase
requires a refrigerator.
Note that the only thing that changes between tasks is
the furnace time. Given a set of tasks with different furance times,
find an arrangement, if possible, such that all tasks are finished in h hours
with the available resources.
The input of the exercise and the output with the solution (when the input is
solvable) are as follows: