T
tony collier
ok - this is what i am trying to do and there is probably a much better
way which this newbie hasn't read or thought about yet.
i am getting prices from x number of suppliers who all quote me a
different individual price for each of y items. no one supplier is always
cheaper than the others.
IDEAL SCENARIO:
no. of suppliers: x (unlimited)
no. of items: y (unlimited)
i then calculate all the different combination of items from mixed
suppliers to get the lowest overall price possible. this is where my huge
array comes in to store the values, as the formula to work out number of
combinations =
no.of supplier ^ (to the power of) no. of items.
I have so far only been able to go up to x=11, and y=7 before running
into memory constraints.
Items must be able to be added/deleted like in a cart until user
checksout, so no running calculation can take place to try and crunch
numbers as i go. this is why i can't see how array can be made any
smaller.
any ideas on how to make x and y larger (other than investing in more
memory) would be greatly appreciated.
Incidentally, is there any way to initalize all elements in the array to
zero in one fell swoop rather than looping through them all?
many thanks tc.
way which this newbie hasn't read or thought about yet.
i am getting prices from x number of suppliers who all quote me a
different individual price for each of y items. no one supplier is always
cheaper than the others.
IDEAL SCENARIO:
no. of suppliers: x (unlimited)
no. of items: y (unlimited)
i then calculate all the different combination of items from mixed
suppliers to get the lowest overall price possible. this is where my huge
array comes in to store the values, as the formula to work out number of
combinations =
no.of supplier ^ (to the power of) no. of items.
I have so far only been able to go up to x=11, and y=7 before running
into memory constraints.
Items must be able to be added/deleted like in a cart until user
checksout, so no running calculation can take place to try and crunch
numbers as i go. this is why i can't see how array can be made any
smaller.
any ideas on how to make x and y larger (other than investing in more
memory) would be greatly appreciated.
Incidentally, is there any way to initalize all elements in the array to
zero in one fell swoop rather than looping through them all?
many thanks tc.