Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Brand allocation

Hi all ... got a fun Friday question.

So here's the situation.  Two lists of brands.   24 in one list and 16 in another.  Everyone will be aware of at least one in the first list.  Some will also have awareness of at least one in the second list.

Task:  To allocate up to two brands to each respondent based on awareness.  Any who are aware of brands from the second list will have one from each list.  Others will have up to two from the first list.

There is a weighting (or target) for each brand.  (so we might need 200 for brand 1, 40 for brand 2, 380 for Brand 3, etc).

No-one should fail quota based on this allocation, and if, when it comes time to allocate brands to a person, all available targets are full, they are able to be surpassed.

Any ideas to code this elegantly?  I know I could set up quota questions (ALLOCATE1 and ALLOCATE2) and use quota logic but there's so many cells!  Anyone got a better idea? Perhaps I need to set up a multichoice hidden list and query the database for numbers?

I'm on 9.8.0.
asked Feb 21 by Marion Bronze (3,770 points)
Actually .... this might solve my problem!   What you y'all think?  Perhaps I put the target in as the value of $BestCell?

Looking at that code, I think it would still work if the quota cells were set to 200, 40, 380, etc.  It would effectively use "Least Fill (Counts)."

If you wanted "Least Fill (Percentage)" behavior, you should just have to replace each instance of this:


with this:

Wouldn't it then be possible to fail quota?  This allocation is WAAAY into the survey so no-one should be kicked out as a result of the allocation.  If our targets for each brand that they are aware of are filled, they should still get allocated something based on ... dunno ... least over-filled?
Yes, that would be possible with non-99999 limits.  Perhaps one workaround would be for you to multiple each cell limit with the same large number, say 100 - so a 20,000 limit, 4,000 limit, 38,000 limit, etc.  That QuotaCellCompletes / QuotaCellLimit code should still behave like before, but now all your limits are large enough that no respondent should ever be booted.
Of course!!!  Thanks, Zachary :-)

Your solution to the original question

Please only use this to answer the original question. Otherwise please use comments.
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

To avoid this verification in future, please log in or register.