#Stats/Probability Problem.. Multi Constraint Cost Benefit Analysis

86 messages · Page 1 of 1 (latest)

kindred jewel
#

You are a business. You need to sell your product. There are 14 Companies that are willing to buy your product. They each have different amounts of unmet demand, and prices they are willing to pay for one unit of this product. They also each have different levels of 4 categories of quality in your product. These qualities can be rank 1 (worst) to rank 5 (the best). For instance, company 11 may be an automobile company. Their minimum requirements will probbaly be low for cost and power efficiency, but will be high for temperature proofing, and light sensitivity, given they are on the outside of a car. Those are the 4 categories: power efficiency, image resolution, temperature resistance, light sensitivity. The thing is, developing your product costs money. The lesser a rank in a certain category it is, the less RnD money you will spent. This can be illustrated in the table attached, ignore ranks past 5. You can notice the prices for development going up as the rank goes up. Ultimately, this product needs to be assembled, in whatever configuration, and enough need to be produced to meet the demand of the customers minimum requirements you satisfied. If you developed a 5 5 5 5 product, then you would satisfy every companies requirements, as the quality in each category would be greater than or equal to each respective quality-requirement for each category every one of the 14 customers would have, but it would cost a fortune, eating into your revenue. There are four production lines to choose from for your product. This problem is over the time frame of a year, and the machines ALL run at 75 percent utilization, meaning they run 6552 hours a year. That means, for any amount of units you need to produce, you need to find a product line configuration that would produce that many products over the course of a year. The more units per hour the line can produce, the more expensive, shown in table 2 attached, "production capacity". If you only wished to develop a 1 2 1 1 product and say that only satisfied two customers, then you would only need to produce the amount of units of the summative demand of those two customer(companies). If it was 2 million, over 6552 hours, you would need to produce 2 million units. Meaning you would choose the cheapest production option, as even that provides a considerable amount of overflow for that many units over a time frame of a year. Ultimately, choose the best combination of qualities for categories in a product that meets the requirements for the MOST revenue, and consider the expenses from the production line, and the cost of development for each associated rank. The costs, unmet demand, and minimum requirements for the companies are provided in a third file attached, 1-14 going downwards.

flat streamBOT
kindred jewel
fossil flume
#

This is much clearer !

#

About the RnD costs, do you agree that they must be paid only once ?

#

So to maximize the sensitivity rank, it is the most expensive among the criteria

#

Isn't it ?

#

And only customer 6 needs such a high sensitivity

#

And similarly, the more you upgrade your production line, the faster your production per hour is

#

This is how I would approach the problem:

  • I would create a rank cost matrix for all the possible tuples/lists of ranks. So one column would be
    (1,1,1,1)
    (1,1,1,2)
    Etc..
    Until (5,5,5,5)
    And the other column would be the cost associated with each of those rank upgrades.
    This will be a table with 5^4
    = 625 rows

  • For each of those rows, I would locate the eligible customer ids (such that all the ranks necessary for those customers is superior to each of the components of the row)

  • Then I would compute, for each of those located customer ids
    Demand * Price per unit
    To find which ones have the highest demand and price return

  • Then I would compute the difference between this amount and the R n D price (second column of the first table) to find the maximum earning potential

#

Then we may need to determine the best line of production to satisfy the most demands
(So we would compute the time necessary to produce the units using each of the four lines of production)

#

Do you use Python?

kindred jewel
#

Yes

#

I tried python and then python api in gurpbi, an MILP solver. It's just too advanced for me, kept returning index range errors or other

#

Issues. I couldn't seem to properly define my constraints because the Mathematics knowhow isn't there

#

Each rnd does only need to be paid once at that rank level for any given combination of your product

fossil flume
#

Yes

#

I think you dont need advanced APIs

#

Just numpy

#

And basic optimizers

#

The first steps can be done easily by using pandas if you like it

#

Did you study Karush Kuhn Tucker optimizers

kindred jewel
#

Well.. I have no idea on any of that. Where do I start ?

#

Don't know of it

fossil flume
#

Well did you start by

#

Implementing the first

#

Bullet point

#

I suggested

#

The cost for each tuple of ranks

#

Of R n D ?

kindred jewel
#

That's basically what my python code looked like

#

It was 3 matrices

#

But coding the ability for gurobi or python to solve from it was past my skill

#

I got errors for hours

#

Or it would return wrong answers

#

Seeminglyvnot following constraints

fossil flume
#

What constraints did you struggle to implement ?

#

Seems like you already have some code written

kindred jewel
#

I have never had to do anything like this, so I tried to make it so it would iterate through every combination, determine RnD cost and revenue for each. I planned to add on each layer of constraint after the first

fossil flume
#

Yes

#

Thats how I would do it

#

Iterating for each tuple

#

Of ranks

kindred jewel
#

But I had an issue specifying to it that it was fine if it didn't utilize every single place, as I wanted the best combination, not one that used EVERY single place. I kept getting rank 5 4 5 4, which generated 105mil revenue at 4mil cost

fossil flume
#

Finding the companies that work

kindred jewel
#

And used 14 places

fossil flume
#

Determine the sum of their ( demands * unit price)

#

And then try to see which line of productions can produce this within a year (then subtract the cost of it)

kindred jewel
#

Also; I had no idea how to add on the layer of production line costs as an additional constraint onto the already existing code, if it was something that should be iterated on, inside of the loop for every single iteration of the combinations? If so, it seemed like that would amount to well over twns of thousands of computations, probably slow as hell. And I didn't even know how if I could visualize it.

#

I am in shower BRB 15min class soon lol

fossil flume
#

You can work with the costs separately

#

And the demand * unit price separately

#

And only computing the profit in the end

#

For each choice of strategy

#

So let us formulate this more mathematically

#

We would like to define a strategy S

#

Where S is a 5-integer list

#

Comprised of
(Rank of first attribute,
Rank of second,
Rank of ...,
Rank of fourth,
Production Line number)

#

And for this choice, we want the final profit to be maximum

#

Isnt it ?

#

If this is so, it means you have
5 * 5 * 5 * 5 * 4
Strategies to compare

#

For each choice of the first 4 elements in your strategy

You have
N eligible customers

For each of those customers you will have to find determine the best line of production (that satisfies the production of the entirety of their demands within a year?)

So you will obtain for every fixed choice of ranks, one line production that would work

And for this selected strategy you just need to add up the costs and subtract the profits to determine the value of this strategy

kindred jewel
kindred jewel
#

The highest that the highest production line can produce in s year is just short of 3million. So the majority of combinations would be too much returned demand for the production line. Furthermore, produccti9n line 4 is 20 million dollars, un godly expensive

kindred jewel
#

How would I ask something to compute that data for me

#

Where would I ask

#

Seems like a lot of resources

fossil flume
#

So what is the choice to be made if none of the production lines suffice

kindred jewel
#

Ultimately tje production lines can be run for 100 percent of the hours in a year for an additional 200,000 cost, for over 4mil units produced. So one of tje production lines likely will have a close match with tje direct amount of demand from a certain combination. If not , it could just be the closest match. There's a 12 percent inventory holding fee at the end of each year, which is an additional constraint as to pricing; which is why you want to fulfill almost exactly tje amount of demand by production. Ultimately, there is no scenario where a production line can't satisfy at least one minimum customer

fossil flume
#

Okay so we can compute the maximum production per line, and deduce the penalties from the costs

kindred jewel
#

yes; i can. but that will be time-consuming. would need tosit down this afternoon to get the values

visual quail
# kindred jewel

hi
I'm not sure if this can help.
Have you noticed that each attribute is in increasing order?

kindred jewel
#

attribute?

#

the total sum of attributes?

#

the only thing in obvious increasing order to me is the customer number

visual quail
kindred jewel
#

i see it now. but i am not sure if it has any useful implementation yet. given i am missing a lot of other computation

visual quail
#

just to make sure, you sum the cost of all attributes (sensitivity, power, ...) for each customer in the same table. right?

kindred jewel
#

i have not made a table that has the data for the total cost of requirement for each customer yet.

#

because the way i was trying to solve it was simply looking at the revenue and then iterating the cost each time

#

or trying to

fossil flume
# visual quail

It might make sense (if adapted to the problem), but such an approach would be much harder to prove mathematically

visual quail