posted 19 years ago
Hello all,
I'm facing IMO a quite complicated problem and can't quite figure out how to
start solving it. I'm quite familiar with basic SQL, but this problem goes beyond my understanding.
The task is to optimize production line to operate at peak performance. Meaning, that idle time will be as minimal as possible.
The user gives following parameters to the program (jsp/form->bean->jdbc->mysql):
- estimated completion time
- deadline for task (date)
- plus some other non-essential information (materials etc)
Every task is identified with unique #ID (autoinc). One task can take from hours to days to complete. The machine operates every day (weekends and holidays excluded) from 0800 to 1600.
If user adds/deletes task to/from the time line, the tasks assigned after that date must be automatically moved forward/backward.
At the moment I have basic basic table that holds the #id, deadline, eta etc.
Should I make another table that represents weekdays and hours. Something like this:
+------------------+---------+
| date | id |
+------------------+---------+
| 01.01.2004 08:00 | 123 |
+------------------+---------+
| 01.01.2004 09:00 | 123 |
+------------------+---------+
| 01.01.2004 10:00 | 789 |
+------------------+---------+
| 01.01.2004 11:00 | 789 |
+------------------+---------+
| 01.01.2004 12:00 | 789 |
+------------------+---------+
| 01.01.2004 13:00 | 789 |
+------------------+---------+
... or any better ideas ?
- My brains hurt