Hello everyone,
I'm trying to create an MS Access 03 database to be used in optimizing flow for various tasks. The idea is I have a table with task names, duration of each task, and the name of a task that needs to be completed before the current task may commence.
A typical example would be:
AutoNumber / TaskName / Duration / GroupName
1 / Take out trash / 5 minutes / None
2 / Put in fresh bag / 1 minute / Group 2
3 / Watch TV / 30 minutes / None
4 / Eat Dinner / 20 minutes / None
I have a linked table (1 to many relationship) which has
TaskName / ContingentOn
which holds records such as:
Put in Fresh bag / Take out trash
Watch TV / Put in fresh bag
where task "putting in a fresh bag" may only be done once task "Take out trash" has been completed, and "Watch TV" can only be done once a fresh bag is put in.
Several tasks require that multiple previous tasks are complete before starting.
Here is where I need some help.
In order to handle the groups of items, my thought is to add the group as a task, then calculate the duration of the group of tasks. So, in the above example, I would simply add the time required to take out the trash to the time required to put in a fresh bag.
The trouble comes when multiple tasks can be completed at the same time. So, suppose you're packing for a trip and you have 5 bags (each requiring a differing amount of time to transport) to carry out to the car, and you have two people to carry them. How do you optimize which person carries what bag?
I would like to have Access put together all combinations of the two people moving the five bags, then test to find the smallest duration.
I am able to loop through my tables to extract duration values one by one, but I can't think of a way to come up with each of the combinations without putting them in by hand (which would be a real pain in the -ss... a small example of 5 objects with 2 people has 10 different combinations.)
Can anyone point me in the direction of some VBA code for calculating combinations of "n" objects in groups of "k"?
Any help would be much appreciated.
--Thanks!
I'm trying to create an MS Access 03 database to be used in optimizing flow for various tasks. The idea is I have a table with task names, duration of each task, and the name of a task that needs to be completed before the current task may commence.
A typical example would be:
AutoNumber / TaskName / Duration / GroupName
1 / Take out trash / 5 minutes / None
2 / Put in fresh bag / 1 minute / Group 2
3 / Watch TV / 30 minutes / None
4 / Eat Dinner / 20 minutes / None
I have a linked table (1 to many relationship) which has
TaskName / ContingentOn
which holds records such as:
Put in Fresh bag / Take out trash
Watch TV / Put in fresh bag
where task "putting in a fresh bag" may only be done once task "Take out trash" has been completed, and "Watch TV" can only be done once a fresh bag is put in.
Several tasks require that multiple previous tasks are complete before starting.
Here is where I need some help.
In order to handle the groups of items, my thought is to add the group as a task, then calculate the duration of the group of tasks. So, in the above example, I would simply add the time required to take out the trash to the time required to put in a fresh bag.
The trouble comes when multiple tasks can be completed at the same time. So, suppose you're packing for a trip and you have 5 bags (each requiring a differing amount of time to transport) to carry out to the car, and you have two people to carry them. How do you optimize which person carries what bag?
I would like to have Access put together all combinations of the two people moving the five bags, then test to find the smallest duration.
I am able to loop through my tables to extract duration values one by one, but I can't think of a way to come up with each of the combinations without putting them in by hand (which would be a real pain in the -ss... a small example of 5 objects with 2 people has 10 different combinations.)
Can anyone point me in the direction of some VBA code for calculating combinations of "n" objects in groups of "k"?
Any help would be much appreciated.
--Thanks!
Comment