Notification texts go here Contact Us Buy Now!

Minimum Cost Maximum Flow Algorithm with restrictions

Minimum Cost Maximum Flow Algorithm with Restrictions

This algorithm allocates c clients to s servers, such that the total distance travelled is minimized.
LOOP until stop
Loop over servers
  SET closest = NULL
  SET shortest = INFINITY
  Loop over clients
    IF client has server
      CONTINUE
    SET dist = distance from client to server
    IF dist < shortest
      SET closest = client
      SET shortest = dist
    ENDLOOP over clients
  IF closest == NULL
    STOP
  Connect closest client to server
ENDLOOP over servers
ENDLOOP until stop
Alternatively, this problem can be modelled as a Mixed-Integer Linear Program (MIP): Variables:
  • xij = 1 if client i is assigned to server j; else 0
  • yj = number of clients assigned to server j
Known Constants:
  • dij = distance between client i and server j
Formulation:

min Σi,jdijxij

Subject to:

Σjxij = 1 for each client i

Σixij - yj = 0 for each server j

yj - f >= 0 for each server j

yj - f <= 1 for each server j

xij = 0 or 1

yj variables will be forced to equal integers.

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.