+ Reply to Thread
Results 1 to 5 of 5

How to assign people to groups with certain constraints

  1. #1
    Registered User
    Join Date
    07-04-2022
    Location
    London, England
    MS-Off Ver
    2019
    Posts
    1

    Question How to assign people to groups with certain constraints

    Hello everybody,

    I am wondering if someone can help me to create in Excel a system to assign people in groups. The problem is that the members have different nationality and there cannot be two people from the same country in the same group. I was thinking about using solver, but I am not sure how to built the nationality constraint.

    Thank you!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: How to assign people to groups with certain constraints

    You will have to provide more information. Ideally you would provide an Excel file that includes this information.

    List of people and their nationalities. Avoid private data, this can be fake names.
    List of groups you want to assign them to.
    Rules about how many people can be in a group.

    A "before" and "after" view of how you picture that you want this to work.

    See yellow banner at the top of the page.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: How to assign people to groups with certain constraints

    A possible solver setup could look like this. Total participants from each nation specified in range J5:J9.

    As the Excel solver is limited to max 200 constraint you may run into this limitation with a high number of people / nations. If so try the freebie OpenSolver.

    https://opensolver.org/

    Alf
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    11-07-2018
    Location
    Bulgaria
    MS-Off Ver
    2007
    Posts
    34

    Re: How to assign people to groups with certain constraints

    I am using similar model for another purpose, and it just works fine. The problem is that you get the same result each time, even though there are multiple combinations to arrange the binary values, and still satisfy the constraints. Even if you set all bin values initially to zero, that is before you start solver, you still get the same values as the last time. Is there a way to make solver to generate random different combinations that satisfy the constraints, each time? Because, in general, you might want to use this model many times, and to get different combinations every time.

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: How to assign people to groups with certain constraints

    Quote Originally Posted by Petkov View Post
    I am using similar model....Is there a way to make solver to generate random different combinations that satisfy the constraints, each time?


    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread

+ 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. Create random groups, with balanced skill level constraints
    By pinebush in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-17-2021, 03:26 PM
  2. [SOLVED] Assign 300 people into groups
    By C3Auto in forum Excel General
    Replies: 6
    Last Post: 09-05-2020, 08:19 PM
  3. Assign People to Groups Based on Weight
    By bryn.jones in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-23-2020, 10:37 PM
  4. Replies: 8
    Last Post: 02-28-2018, 10:34 AM
  5. Groups no longer appear in Recent People
    By taylorsm in forum Outlook Formatting & Functions
    Replies: 0
    Last Post: 11-14-2017, 12:30 PM
  6. 22 people randomized into 4 groups
    By msa969 in forum Excel General
    Replies: 4
    Last Post: 10-25-2016, 03:47 PM
  7. Organize 35 people into groups of 5 over 9 days; minimize same people together
    By LuluPearl in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-30-2015, 07:12 AM

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