_externals\1\Week 2 Data.yxdb
Week 2 Data.yxdb
_externals\1\Week 2 Present Data.yxdb
Week 2 Present Data.yxdb
Exercise 3:
In Part 2 we identified the hubs Santa will visit this season and the minimum weight that can deliver presents to every kid in those hubs with respect to their present score.
But what about maximizing the space of the sled so that itâ€™s full,
while accounting for how much weight the reindeer can pull?
Can you help the elves revisit the present assignments for each nice kid now that we know how many reindeer Santa is attaching to the sleigh this year? They want to make sure every kid is getting the biggest and best (priciest then heaviest in priority order) present they earned in their present classes. The kids who behaved the best should be the first to get their presents adjusted - they earned it!
Goal of Part 3:
Determine the exact present distribution of the nice kids without exceeding 422 lbs per hub - prioritize price, then weight and assign to the nicest kids first
Solution Motivation
The equation is basically sum of present weights with coefficients being the number of presents... must be less than or equal to 422, with constraints for each present type according the given requriements for a particular hub.
1
PresentID
String
0
Simple
Hub
=
1
[Hub] = "1"
"sample a hub"
type="I"
PresentID="P" + PadLeft(TrimLeft([PresentID],"0"),4,"0")
Nice Score - Descending
Present Score="pCat_" + PadLeft(Trim([Present Score]),2,"0")
dir="=="
Present Score="pCat_" + PadLeft(Trim([Present Score]),2,"0")
CPLEX_LP
True
symphony
LP
matrix
{"fileType":"CPLEX_LP","filePath":"","solver":"symphony","inputMode":"matrix","maximize":true,"problemType":"LP"}
0
[]
[]
landing
Matrix Input Mode
pCat_01
==
0
pCat_02
==
0
pCat_03
==
0
pCat_04
==
0
pCat_05
==
0
pCat_06
==
0
pCat_07
==
0
pCat_08
==
0
pCat_09
==
0
pCat_10
==
0
pCat_11
==
0
pCat_12
==
0
pCat_13
==
0
pCat_14
==
0
pCat_15
==
0
pCat_16
==
0
pCat_17
==
0
pCat_18
==
0
pCat_19
==
0
pCat_20
==
0
default
constraints
Warning
All
ByName
#3
#1
#2
C:\Users\069301\AppData\Local\Temp\Engine_10448_7ed4cbb695a641d682df40d91f669f76_\Engine_28080_6f87a7d61fc148509f11b30f047c1790_.yxdb
C:\Users\069301\AppData\Local\Temp\Engine_10448_7ed4cbb695a641d682df40d91f669f76_\Engine_28080_0feb7ad0986a40dd8bf7c929ba0da373_.yxdb
C:\Users\069301\AppData\Local\Temp\Engine_10448_7ed4cbb695a641d682df40d91f669f76_\Engine_28080_c375f98326d349caa668dc1ff60ced6e_.yxdb
C:\Users\069301\AppData\Local\Temp\Engine_10448_7ed4cbb695a641d682df40d91f669f76_\Engine_28080_61bb46cc28ed492c89085c6a120fa117_.yxdb
C:\Users\069301\AppData\Local\Temp\Engine_10448_7ed4cbb695a641d682df40d91f669f76_\Engine_28080_5b40253156de46bdb79daa7c34b43032_.yxdb
Single
Report
Remove
Prefix
Count_
Warn
C:\Users\069301\AppData\Local\Temp\Engine_10448_7ed4cbb695a641d682df40d91f669f76_\Engine_28080_7c96c6574d6e4a90bfe435240a906dcc_.yxdb
rhs=IIF(IsEmpty([calcRHS]),[defaultRHS],[calcRHS])
weight
<=
422
default
constraints
Simple
Weight
>
0
[Weight] > 0
Horizontal
Santalytics Part 3 - optimize a hub