+ Reply to Thread
Results 1 to 9 of 9

Optimal task time scheduling and assigment problem - Excel Solver

  1. #1
    Registered User
    Join Date
    04-18-2011
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2019
    Posts
    90

    Optimal task time scheduling and assigment problem - Excel Solver

    I'm trying to resolve an assigment problem using Excel solver.

    I have a number of task that each takes a number of days to complete.
    I have a number of person to do the tasks. Each takes the same amount of time to resolve the tasks.

    There are the following constraints:
    - each task has to have 2 persons assignet to it
    - each person has to be assigned a total time of 40 days

    In theory the solution is something like this:
    - Persons 1 and 2 to work on Tasks 1 and 3
    - Persons 3 and 4 to work on Tasks 2 and 4
    - Persons 5 and 6 to work on Task 5

    I want to add an extra constraint regarding the Persons and how to assign them together. There are 3 types of Persons: Leader, member and newbie. The constraints would be:
    - two Leaders cannot work on the same task
    - two newbies cannot work on the same task.
    All other combinations are possible: Leader and member, Leader and newbie, member and member, member and newbie.

    Extra: for the Time Assigned range is there a better way to write the sum function?

    This part is already solved, please take a look at post #6. I'm looking for a solution to optimal schedule the tasks as the first step before the people assigment.
    Attached Files Attached Files
    Last edited by ciprian; 12-29-2020 at 10:18 AM.

  2. #2
    Valued Forum Contributor Hydraulics's Avatar
    Join Date
    07-15-2018
    Location
    Udine - Italy
    MS-Off Ver
    Office 365
    Posts
    373

    Re: Assigment problem - solver

    Assuming Leaders are Person1 and Person2, you need to calculate the sum of those binary variables and constraint it to be <= 1, for each Task, e.g.

    SUM(C13:C14) <= 1.

    Same reasoning goes for newbies.

    Extra: yes, there is. In M13

    =SUMPRODUCT(C4:G4,C13:G13)

    HTH,

    Francesco
    Last edited by Hydraulics; 12-27-2020 at 06:56 AM.
    Aim high or don't even try.
    ---------------------------------
    If your question has been answered, don't forget to mark the thread as SOLVED.
    If you find an answer helpful, click on the star icon at the bottom of the post.

  3. #3
    Registered User
    Join Date
    04-18-2011
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2019
    Posts
    90

    Re: Assigment problem - solver

    Thank you for replying. I found a working solution by assigning values (2 for Leaders, 1 for members and 0 for newbies) and using sumproduct function to calculate the team value. Then I added min and max team value constraints.
    I attached the work file for anyone interested.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor Hydraulics's Avatar
    Join Date
    07-15-2018
    Location
    Udine - Italy
    MS-Off Ver
    Office 365
    Posts
    373

    Re: Assigment problem - solver

    Your setup is a valid alternative, and I'm happy you could solve your problem. However, introducing a value for each person, you have added one layer of complexity.

    The first rule in this kind of constraint problems is: keep it simple.

    You can get the same result constraining directly the binary variables, as I suggested. I'm attaching a worksheet you can test, and that will work even if you add people.

    HTH,

    Francesco
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-18-2011
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2019
    Posts
    90

    Re: Assigment problem - solver

    Ok, I didn't understand your solution at first but now it makes sense. Thank you.

  6. #6
    Registered User
    Join Date
    04-18-2011
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2019
    Posts
    90

    Re: Assigment problem - solver

    Let's try and go a bit further and have not have a fixed time for the tasks in the begining.

    We have 5 tasks and 3 people (in the original post we needed a solution for teams of people, but for this is easier to understand and go forward). Each person takes the same amount of time to finish a task, it all depends on the time allocated to each task.

    Tasks 1 and 2 can take between 5 and 15 days.
    Tasks 3 and 4 can take between 25 and 35 days.
    Task 5 takes between 35 and 45 days.

    Having 3 people means that 3 tasks can have people assigned to them at the same time.

    The time constraint for the tasks is that the total time for each layer/timeline (not sure of the best word here) is 40 days.

    So a solution would be:

    Tasks 1 and 2 are scheduled for 10 days.
    Tasks 3 and 4 are scheduled for 30 days.
    Task 5 is scheduled for 40 days.

    Person 1 would work on Task 1 and then on Task 3.
    Person 2 would work on Task 2 and then on Task 4.
    Person 3 would work on Task 5.
    This last part is already solved.

  7. #7
    Valued Forum Contributor Hydraulics's Avatar
    Join Date
    07-15-2018
    Location
    Udine - Italy
    MS-Off Ver
    Office 365
    Posts
    373

    Re: Assigment problem - solver

    Quote Originally Posted by ciprian View Post
    Let's try and go a bit further and have not have a fixed time for the tasks in the begining.
    Do you mean that time (for each task) is a variable, and its value should be somehow found by Solver? Then there are very few solutions if we must respect the time constraint of 40 days, and we don't need Solver.

    First, task 5 cannot be > 40, so its value is within 35 and 40. No task is smaller than 5, so task 5 must be either 35 or 40 (otherwise we are left with a number < 40).

    If it is the former, we could set Task1 (or 2) = 5, sum it to Task5 and reach 40, but then we are left with a Task3 (or 4) that is always < 40.

    Otherwise, we can express that Task1 (or 2) + Task3 (or 4) = 40, and 5 < Task1 < 15. There are 11 couples of values that satisfy the equation and the constraint.

    If I have misunderstood your question, please explain what may be another valid solution.

    HTH,

    Francesco

  8. #8
    Registered User
    Join Date
    04-18-2011
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2019
    Posts
    90

    Re: Assigment problem - solver

    This example is just a water-down version of the actual problem which has 30 to 40 tasks each with a min/max possible duration that have to all fit in a calendar semester with 15 people assigned to them.

    So getting a Excel Solver solution to the 5 tasks and 3 people example would help me extrapolate to resolve the actual problem.

    I know that with a constraint of 40, Task 5 cannot be 45, but I want Excel Solver to come to this solution. I could have made the example with all 30+ tasks and people, but I thought it would be too much and having fewer tasks would be easier to understand the issue and the solution needed.
    Last edited by AliGW; 12-30-2020 at 02:51 AM.

  9. #9
    Valued Forum Contributor Hydraulics's Avatar
    Join Date
    07-15-2018
    Location
    Udine - Italy
    MS-Off Ver
    Office 365
    Posts
    373

    Re: Optimal task time scheduling and assigment problem - Excel Solver

    I already outlined a model setup: express the relationships among Tasks as equations, and apply the constraints as min/max limits. You would need to switch to Evolutionary engine, since the problem is now non-linear.

    More importantly, Solver has a limit of 200 on the number of decision variables, and we have approximately 525 binary vars (35 Tasks x 15 Persons) and 35 integer vars. Usually, extrapolation doesn't work very well in this kind of problems.

    However, it may be possible to linearize the model and then use OpenSolver, a free Add-In that has no limits on the number of variables.

    HTH,

    Francesco

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 7
    Last Post: 12-31-2016, 12:29 PM
  2. Problem Using Solver with an optimization stock problem
    By Jagrubski in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-24-2013, 03:41 AM
  3. Rotation Assigment to New Clients
    By basketballrats in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-28-2012, 08:40 AM
  4. OnAction macro assigment through a macro in network environment behaves strange
    By kbx17 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-26-2012, 02:22 PM
  5. Assigment assistance (need ideas)
    By jermaindefoe in forum Excel General
    Replies: 7
    Last Post: 02-18-2008, 12:50 PM
  6. Interesting Solver problem (Solver encounters an error)
    By MrShorty in forum Excel General
    Replies: 3
    Last Post: 12-22-2005, 06:55 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1