Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Design problem - how to approach ?

 
Vedek Bareil
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Loren Rosen
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you asking about the algorithms that might be used to optimize the scheduling, or about how to represent and modify the schedule in a relational database?
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic