Multiple Constraints

dimbasco

Board Regular
Joined
Jun 2, 2002
Messages
89
Hi Folks -
Finally got he HTMLmaker to work .. so here's my question again.
There are 4 Carriers I have (A,B,C,D - I can select any/ all in any combination I desire).
The goal is to minimize $ spend and the constraint is the capacity offered by the carriers.

This is the data:
So for example I want to select the lowest cost carrier (out of A,B,C, and D) in CT (line 12). The Result will be Carrier B - $ 358,185. Capacity needed = 11 . Capacity available (Carrier B) = 80. (so this is a valid result).
But for next region capacity available from Carrier B = 80-11= 79. How do I incorporate this?
Mr Excel.xls
ABCDEFG
10Capacityofferedbycarriers1258015075430
11OriginCapacityNeededABCD
12CT11$365,820$358,185$385,070$374,025
13MA17$624,855$678,440$763,335$664,105
14ME8$364,536$419,485$392,370
15NH8$317,050$376,820$313,320
16NJ31$1,010,520$844,810$883,300$793,980
17NYE25$909,415$915,290$926,820$830,775
18RI3$114,000$119,320$135,280$118,560
19VT2$72,600$85,675$76,470
20DC1$13,650$13,545$14,175$12,180
21DE1$12,350$10,830$10,450$9,310
22KY1$1,884$2,550
23MD17$535,305$498,570$486,225$474,240
24NJ14$428,400$346,800$380,800$336,600
25NYW16$481,025$481,805$537,805
26OH20$653,555$708,900
27PAE27$690,440$661,305$672,910$661,320
28PAW9$274,075$292,780$300,635
29TN1$16,269$26,100
30VA16$566,894$569,050$598,165
31WV2$86,030$82,575$98,380
32230$7.539MN$4.447MN$7.704MN$6.592MN
MAster


Thanks in advance guys.

Dimbasco
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Have attempted a try, using a combination of values vs next higher transport and RANK, but so far to no avail...
 
Upvote 0
Hi dimbasco:

If I have understood you correctly, you should find the following approach to be of some interest ...
y031220h1.xls
ABCDEFGHIJKL
9CapacityOfferedByCarriers125801507543008012575150
10TRUETRUETRUEFALSE
11OriginCapacityNeededABCDCapacityNeededCapacityNeededCapacityNeededCapacityNeeded
12CT11$365,820$358,185$385,070$374,025111111
13MA17$624,855$678,440$763,335$664,105171717
14ME8$364,536$419,485$392,370888
15NH8$317,050$376,820$313,320888
16NJ31$1,010,520$844,810$883,300$793,980313131
17NY_E25$909,415$915,290$926,820$830,7752525
18RI3$114,000$119,320$135,280$118,56033
19VT2$72,600$85,675$76,47022
20DC1$13,650$13,545$14,175$12,18011
21DE1$12,350$10,830$10,450$9,31011
22KY1$1,884$2,55011
23MD17$535,305$498,570$486,225$474,2401717
Sheet8


(sorry, because of post-size limits, I could not show the whole table)

I have first ranked the carriers by lowest cost and their respective carrying capacity in cells I9:L9

Then for each of the carriers, I conduct an Advanced Filter -- the yellow, aqua, light green, and brown colored cells form my criteria ...

the formula in cell I9 is ...

=INDEX($C$9:$F$9,MATCH(SMALL($C$12:$F$12,COLUMNS($I$9:I$9)),$C$12:$F$12,0))

and the formula in cell I 10 is ...

=AND(SUM($B$12:$B$31)>SUM($H$9:H$9),SUM($B$12:$B12)<=SUM($H$9:I$9))

these formulas are then copied over to cells J9:L9 and J10:L10 respectively.

The process of performing the 4 Advanced Filters can be automated by assigning the following code to a Command Button ...
Code:
Sub yDo4Filters()
'
' 12/21/2003 by Yogi Anand
'
    Range("A11:F32").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
        "I9:I10"), CopyToRange:=Range("I11"), Unique:=False
    Range("A11:F32").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
        "J9:J10"), CopyToRange:=Range("J11"), Unique:=False
    Range("A11:F32").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
        "K9:K10"), CopyToRange:=Range("K11"), Unique:=False
    Range("A11:F32").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
        "L9:L10"), CopyToRange:=Range("L11"), Unique:=False
End Sub
I hope this helps. If I have misunderstood your question -- my apologies!
 
Upvote 0
Hi Yogi Anand,

Thanks for your response. What I see is you have selected the lowest cost option in The columns I-L. (am I understanding this right?)

What I am a little confused about is that lets say line 12 (CT). Carrier A,B, and D all three show capacity of 11. But only carrier B should have been selected. (The other two should not refelct a usage/ allocation of 11 per week).

Note: It is not necessary that we use all the capacity offered by all carriers. We can use only 10% of 1 and 80 of another. The capacity sets the upper limit.

Thanks,
Dimbasco.
 
Upvote 0
Hi Diambasco:

My formulation uses the lowest cost carriers in sequence -- using the full capacity of the first lowest cost carrier (if needed) then on to the next lowest cost carrier utilizing its full capacity if needed, and then on to the next lowest cost carrier and so on.

Because of the size limit on what I can post on the Board, I am showing a part of the table, so please read this in conjunction with my earlier post and your full table.
y031220h1.xls
FGHIJKL
8CarrierBCarrierACarrierDCarrierC
97543008012575150
10TRUETRUETRUEFALSE
11DCapacityNeededCapacityNeededCapacityNeededCapacityNeeded
12$374,025111111
13$664,105171717
14$392,370888
15$313,320888
16$793,980313131
17$830,7752525
18$118,56033
19$76,47022
20$12,18011
21$9,31011
2211
23$474,2401717
24$336,6001414
25$537,8051616
262020
27$661,3202727
28$300,6359
291
30$598,16516
31$98,3802
326.592Million
Sheet8


To display only the capacity numbers to be used from the respective carrier, I have used Conditional Formating to show those numbers in Bold and the others numbers are shown grayed out. I hope this is clear -- and if we need to discuss this further, please post back and then let us take it from there.
 
Upvote 0
Hi Yogi Anand,

Sorry for the delay in replying to your post. I am actually trying to figure out the "CODE" you have given. To be honest I am a little perplexed - alll it did for me was copy the cells from A:F to I:L.
But I did get the formulas in the columns I9:L10. I was unable to generate the capacities in I:L. (Guess I'm a little slow). (I Put the code into a Macro).
Thanks,

Dimbasco
 
Upvote 0
dimbasco said:
Hi Yogi Anand,

Sorry for the delay in replying to your post. I am actually trying to figure out the "CODE" you have given. To be honest I am a little perplexed - alll it did for me was copy the cells from A:F to I:L.
But I did get the formulas in the columns I9:L10. I was unable to generate the capacities in I:L. (Guess I'm a little slow). (I Put the code into a Macro).
Thanks,

Dimbasco
Hi Diambasco:

I am not clear on what you did, what results you got and where the problem lies. As I mentioned in my posts -- here is the concept I have used ...

I have started with the lowest cost carrier to begin with, and if my needs were still not met, I went to utilize the next lowest cost carrier and utilzed theit carrying capablities, and if my needs were still not met, I went to the next lowest cost supplier, and so on -- but I do not think you have a problem with the concept.

So, if you are having a problem with implementing the concept, please post ...

1. what data you have used
2. what are you trying to accomplish
3. what formulation have you used
4. what result did you get
5. what you think is the right answer

and then let us take it from there.
 
Upvote 0

Forum statistics

Threads
1,203,115
Messages
6,053,598
Members
444,674
Latest member
DWriter9

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top