Page 1 of 1

Quantity design

PostPosted: Fri Jan 10, 2014 5:51 am
by mires
Hi All


I'm trying to build a design in order to manager discount prices...
I'm treating Nb of units as alternative, and using the Unit Price and Discount Policy as attributes
add2.prix2 is the price for 2 quantities given the price for 1 Unit Add1.prix1 and discount policy

Design
;alts = add1,add2,add3,add4,add5,add6,none;
;rows = 210
;block= 30
;eff = (mnl,d)
;cond:
if (add1.prix1=8 and add1.discount=1, add2.prix2=16),
if (add1.prix1=8 and add1.discount=2, add2.prix2=12),
if (add1.prix1=8 and add1.discount=3, add2.prix2=11),
if (add1.prix1=10 and add1.discount=1, add2.prix2=20),
if (add1.prix1=10 and add1.discount=2, add2.prix2=15),
if (add1.prix1=10 and add1.discount=3, add2.prix2=13),
if (add1.prix1=12 and add1.discount=1, add2.prix2=24),
.....
if (add1.prix1=8 and add1.discount=1, add6.prix6=48),
if (add1.prix1=8 and add1.discount=2, add6.prix6=28),
if (add1.prix1=8 and add1.discount=3, add6.prix6=23),
if (add1.prix1=10 and add1.discount=1, add6.prix6=60),
if (add1.prix1=10 and add1.discount=2, add6.prix6=35),
if (add1.prix1=10 and add1.discount=3, add6.prix6=25),
if (add1.prix1=12 and add1.discount=1, add6.prix6=72),
if (add1.prix1=12 and add1.discount=2, add6.prix6=42),
if (add1.prix1=12 and add1.discount=3, add6.prix6=27)
;model:
U(add1) = a1 * prix1[8,10,12] + dis1 * discount[1,2,3] /
U(add2) = a2 * prix2[11,12,13,14,15,16,18,20,24] + dis2 * discount[discount] /
U(add3) = a3 * prix3[14,16,18,20,24,30,36] + dis3 * discount[discount] /
U(add4) = a4 * prix4[17,19,20,21,25,30,32,40,48] + dis4 * discount[discount] /
U(add5) = a5 * prix5[20,22,24,30,36,40,50,60] + dis5 * discount[discount] /
U(add6) = a6 * prix6[23,25,27,28,35,42,48,60,72] + dis6 * discount[discount] $

I'm getting too errors, 1st fact=X% should be placed.. and An attribute level for an attribute associated with constraints (;cond) could not be placed. There may not be enough rows, or the constraints might be too tight.

Thanks for your comments
Nassar

Re: Quantity design

PostPosted: Fri Jan 10, 2014 2:23 pm
by mires
The problem is simplified when only one product is concerned.
My purpose is to generate this case for several products, defining alternatives as any quantity from several products..

Best

Re: Quantity design

PostPosted: Fri Jan 10, 2014 4:37 pm
by johnr
Dear Mires

Both Michiel and I have run the design on separate computers and removing ".....", the syntax works. It generates a number of warnings however about not specifying any priors (basically the program is telling you that you are assuming your priors are all equal to zero). This is not an error however, just a warning letting you know that this is what you are doing.

Could you let us know what errors you are receiving given that we are unable to replicate any.

John

Re: Quantity design

PostPosted: Sat Jan 11, 2014 1:37 am
by mires
John Michiel

Thanks for your reply..

Here is the complete syntaxe.
I tried to integrate all prix2-6 into a single attribute prix, and rewrote the restrictions. Same limitations and error messages occured..
If the syntaxe is working without the ...., it means that the conditions are too tight. I don't have clear solution to release them. As the price for a bundle of 5 units is function of Unit Price (Prix1) and Discount Policy (discount)


Design
;alts = add1,add2,add3,add4,add5,add6,none;
;rows = 420
;block=30;
;eff = (mnl,d)
;cond:
if (add1.prix1=8 and add1.discount=1, add2.prix2=16),
if (add1.prix1=8 and add1.discount=2, add2.prix2=12),
if (add1.prix1=8 and add1.discount=3, add2.prix2=11),
if (add1.prix1=10 and add1.discount=1, add2.prix2=20),
if (add1.prix1=10 and add1.discount=2, add2.prix2=15),
if (add1.prix1=10 and add1.discount=3, add2.prix2=13),
if (add1.prix1=12 and add1.discount=1, add2.prix2=24),
if (add1.prix1=12 and add1.discount=2, add2.prix2=18),
if (add1.prix1=12 and add1.discount=3, add2.prix2=15),
if (add1.prix1=8 and add1.discount=1, add3.prix3=24),
if (add1.prix1=8 and add1.discount=2, add3.prix3=16),
if (add1.prix1=8 and add1.discount=3, add3.prix3=14),
if (add1.prix1=10 and add1.discount=1, add3.prix3=30),
if (add1.prix1=10 and add1.discount=2, add3.prix3=20),
if (add1.prix1=10 and add1.discount=3, add3.prix3=16),
if (add1.prix1=12 and add1.discount=1, add3.prix3=36),
if (add1.prix1=12 and add1.discount=2, add3.prix3=24),
if (add1.prix1=12 and add1.discount=3, add3.prix3=18),
if (add1.prix1=8 and add1.discount=1, add4.prix4=32),
if (add1.prix1=8 and add1.discount=2, add4.prix4=20),
if (add1.prix1=8 and add1.discount=3, add4.prix4=17),
if (add1.prix1=10 and add1.discount=1, add4.prix4=40),
if (add1.prix1=10 and add1.discount=2, add4.prix4=25),
if (add1.prix1=10 and add1.discount=3, add4.prix4=19),
if (add1.prix1=12 and add1.discount=1, add4.prix4=48),
if (add1.prix1=12 and add1.discount=2, add4.prix4=30),
if (add1.prix1=12 and add1.discount=3, add4.prix4=21),
if (add1.prix1=8 and add1.discount=1, add5.prix5=40),
if (add1.prix1=8 and add1.discount=2, add5.prix5=24),
if (add1.prix1=8 and add1.discount=3, add5.prix5=20),
if (add1.prix1=10 and add1.discount=1, add5.prix5=50),
if (add1.prix1=10 and add1.discount=2, add5.prix5=30),
if (add1.prix1=10 and add1.discount=3, add5.prix5=22),
if (add1.prix1=12 and add1.discount=1, add5.prix5=60),
if (add1.prix1=12 and add1.discount=2, add5.prix5=36),
if (add1.prix1=12 and add1.discount=3, add5.prix5=24),
if (add1.prix1=8 and add1.discount=1, add6.prix6=48),
if (add1.prix1=8 and add1.discount=2, add6.prix6=28),
if (add1.prix1=8 and add1.discount=3, add6.prix6=23),
if (add1.prix1=10 and add1.discount=1, add6.prix6=60),
if (add1.prix1=10 and add1.discount=2, add6.prix6=35),
if (add1.prix1=10 and add1.discount=3, add6.prix6=25),
if (add1.prix1=12 and add1.discount=1, add6.prix6=72),
if (add1.prix1=12 and add1.discount=2, add6.prix6=42),
if (add1.prix1=12 and add1.discount=3, add6.prix6=27)
;model:
U(add1) = a1 * prix1[8,10,12] + dis1 * discount[1,2,3] /
U(add2) = a2 * prix2[11,12,13,14,15,16,18,20,24] + dis2 * discount[discount] /
U(add3) = a3 * prix3[14,16,18,20,24,30,36] + dis3 * discount[discount] /
U(add4) = a4 * prix4[17,19,20,21,25,30,32,40,48] + dis4 * discount[discount] /
U(add5) = a5 * prix5[20,22,24,30,36,40,50,60] + dis5 * discount[discount] /
U(add6) = a6 * prix6[23,25,27,28,35,42,48,60,72] + dis6 * discount[discount] $

Re: Quantity design

PostPosted: Wed Jan 22, 2014 1:27 pm
by johnr
The problem appears to be in U(add2) = a2 * prix2[11,12,13,14,15,16,18,20,24] + dis2 * discount[discount] /. The level 14 does not appear in the constraints. This removes the errors, however I did not run it long enough to see if it produces a design. You may need in increase the number of choice tasks

John