My Math Forum  

Go Back   My Math Forum > Science Forums > Economics

Economics Economics Forum - Financial Mathematics, Econometrics, Operations Research, Mathematical Finance, Computational Finance


Reply
 
LinkBack Thread Tools Display Modes
June 1st, 2008, 04:12 AM   #1
Newbie
 
Joined: Jun 2008

Posts: 2
Thanks: 0

Set availability problem

Hi,

I am not so good in math. I would be very thankful if anyone solves my problem. Thanks in advance.

I am writing a small business software. I would like to explain the problem with a simple example.

Lets assume we are running a small kiosk and we sell gift hampers. 1 gift hamper contains 8 items: 4 cookies, 2 chocolates, 2 cakes. Now lets say a customer orders 10 gift hampers.

Now the user of my software would enter 80 items:

80 items (10 gift hampers)
-- 40 cookies
-- 20 chocolates
-- 20 cakes

My software keeps track of all the items stock. Lets assume the availablity of the items is the following:
-- 30 cookies are currently available
-- 20 chocolates are currently available
-- 13 cakes are currently available

When the user enters 80 I need to show the user 48 as available. 48 because:
-- Only 30 cookies are available, which means 7 gift hampers are available, for 7 gift hampers we need 28 cookies which is the max. which can be delivered.
-- Chocolates are available, so there is nothing we have to calculate.
-- Only 13 cakes are available, which means 6 gift hampers are available, for 6 gift hampers we need 12 cakes which is the max which can be delivered.

Since the minimum gift hampers deliverable from above is 6, which means only 6 gift hampers can be delivered which is 48 items because a set or a hamper contains 8 items.

Can anyone guide me how to calculate 48?

Thanks in advance,
Tiya.
tiya is offline  
 
June 1st, 2008, 01:01 PM   #2
Global Moderator
 
Joined: May 2007

Posts: 6,806
Thanks: 716

Re: Set availability problem

Quote:
Originally Posted by tiya
Hi,

I am not so good in math. I would be very thankful if anyone solves my problem. Thanks in advance.

I am writing a small business software. I would like to explain the problem with a simple example.

Lets assume we are running a small kiosk and we sell gift hampers. 1 gift hamper contains 8 items: 4 cookies, 2 chocolates, 2 cakes. Now lets say a customer orders 10 gift hampers.

Now the user of my software would enter 80 items:

80 items (10 gift hampers)
-- 40 cookies
-- 20 chocolates
-- 20 cakes

My software keeps track of all the items stock. Lets assume the availablity of the items is the following:
-- 30 cookies are currently available
-- 20 chocolates are currently available
-- 13 cakes are currently available

When the user enters 80 I need to show the user 48 as available. 48 because:
-- Only 30 cookies are available, which means 7 gift hampers are available, for 7 gift hampers we need 28 cookies which is the max. which can be delivered.
-- Chocolates are available, so there is nothing we have to calculate.
-- Only 13 cakes are available, which means 6 gift hampers are available, for 6 gift hampers we need 12 cakes which is the max which can be delivered.

Since the minimum gift hampers deliverable from above is 6, which means only 6 gift hampers can be delivered which is 48 items because a set or a hamper contains 8 items.

Can anyone guide me how to calculate 48?

Thanks in advance,
Tiya.
Let a be no. cookies available, b be no. chocolates, c be no. cakes, g be no. gifts possible, i = no. items.

First calculate g=min(a/4,b/2,c/2), where fractions are discarded. Then i=8g.

Wouldn't it be simpler to enter the number of hampers ordered?
mathman is offline  
June 2nd, 2008, 02:52 AM   #3
Newbie
 
Joined: Jun 2008

Posts: 2
Thanks: 0

Firstly, thanks for the reply.

>>Wouldn't it be simpler to enter the number of hampers ordered?

Actually my users do enter the no. of hampers, but there a additional business involving the no. of items.

Thanks again for your quick reply.
tiya is offline  
Reply

  My Math Forum > Science Forums > Economics

Tags
availability, problem, set



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Optimizing Worker Availability devenj Applied Math 11 December 10th, 2012 07:15 PM





Copyright © 2019 My Math Forum. All rights reserved.