BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello!

I need an idea to following problem:

Given: 300 shops, 800.000 customers

Problem:

250.000 customers should be assigned to the shops, optimized via distance.
There are different classes of shops (A,B,C,D) with different amounts of customers to assign (A=1000, B=500, C=300, D=100).

In some areas are a lot of shops in a small circle.

My first solution is:
1. Estimation of distance to nearest shop.
2. Order customers with sorting by shops and distance to nearest shop with the lowest amount of potential costumers first.
3. Select correct amount of costumers with nearest shop considering this sorting and the amount in classes.

After that I got 83% correct classification, 83% of the customers are assigned to the nearest shop. In 17% are assigned to other shops (second best, third best, ...). The Problem is to achiev the correct amount of costumers in the classes. It is not possible to become 100% correct assignments ... but I think it is possible to get more then 83%. You can see it in a map.

Any idea to do it in a job and not 'hand-made'?

Thank you and greetings,

Martin
3 REPLIES 3
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Unstated, but presumably you have zip code? You will find useful technical and conference topic-related reference information as well as SAS-hosted documentation at the SAS support http://support.sas.com/ website.

Scott Barry
SBBWorks, Inc.

Usage Note 5325: Calculating the distance between ZIP codes
http://support.sas.com/kb/5/325.html
RAAgnew
Calcite | Level 5
How come the class quantities don't add to 250,000?
deleted_user
Not applicable
In sum there are 250.000, but 17% are not signed to the nearest shop.

The cause is, if there are a lot of shops at the same location and I firstly fill up the shops with a small costumer density around, I get a lot of wrong classifications. I think I need a re-classification in a second step to change some customers between the shops.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1027 views
  • 0 likes
  • 3 in conversation