Skip to content

The question about get_max_pairing() #1

Open

Description

@wangshui123

Hello, thank you very much for sharing the code. I have a question. What is the get_max_pairing() function in the code and what does it mean??
Thank you !!

Activity

  1. Azmisov commented on Dec 26, 2020

    @Azmisov
    Owner

    In the example in README, there are two user defined functions I didn't show:

    1. get_pairing_cost: The arc benefit for matching a person and object
    2. get_max_pairing: This is the maximum value out of all of the arc benefits you specify in The question about get_max_pairing() #1; e.g. out of all the possible person-object pairs, which has the max cost? This is used internally as an upper bound when doing the iterative solve. I could have had the solver look through the arc matrix itself and find the max value, but for my use case, I knew what the max would be analytically; so the solver has you calculate and pass it in yourself.

    Does that clarify it?

  2. wangshui123 commented on Dec 26, 2020

    @wangshui123
    Author
  3. wangshui123 commented on Dec 26, 2020

    @wangshui123
    Author

    hello, I have another important question,thank you.
    When I want to match m persons with n objects (m<n), can the algorithm ensure that all n objects can be assigned to different persons ?
    Or is the algorithm only capable of matching m objects among n objects to m persons to maximize benefits?

  4. Azmisov commented on Dec 28, 2020

    @Azmisov
    Owner

    This is for the "assignment problem", which will only assign one person to one object and vice versa. So yes, they will all be different.

    The case where an object can be assigned to multiple persons is a different problem and needs a different algorithm. You can look into "weapon target assignment problem" if you're interested. There's also the generalized assignment problem too. The less constrained the problem gets, in general the algorithms to solve it will be slower too; so just be aware of that.

    Also sorry, I'd prefer not to share my email here if that's okay... Better not to have it out in the open to reduce spam and other stuff :)

  5. wangshui123 commented on Dec 28, 2020

    @wangshui123
    Author

    Thank you very much, I understand what you mean. If there are some issues that need to be discussed in the future, I hope to continue to ask you on github. Thank you again! ! Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions