Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a database of shapes, each shape has a color and value.

There are only 6 types of shapes and each shape can be used only once for a combination. Each shape in the database also has a different value and a different color of the shape. There are eight colors total, each color requires 2 or 4 of the shapes to be that color (ie. blue requires 2 blues and red requires 4 reds). I am trying to build an optimizer to analyze the data to show me the highest value for a combination of shapes that still follow the color requirements.

It's for a work issue actually, I'm an Army Criminal Intelligence analyst trying to use excel to perform this kind of rudimentary analysis.

My data:

Oval blue 21
Square brown 16
Circle Red 15
Diamond brown 13
Circle brown 13
Triangle white 13
Square green 12
Square Red 12
Diamond brown 12
Diamond green 12
Oval Red 12
Square Red 11
Rectangle Red 30
Rectangle Red 30
Rectangle Red 30
Rectangle Red 30
Rectangle Red 30
Rectangle brown 30
Rectangle green 30
Rectangle green 30
Rectangle yellow 30
Square Red 11
Rectangle Red 11
Oval Red 11
Square Red 11
Triangle Red 11
Square Red 10
Square Red 10
Diamond brown 10
Square brown 9
Circle green 9
Oval Red 9
Square Red 9
Diamond Red 8
Triangle Red 8
Circle green 8
Circle blue 8
Oval green 8
Oval Red 8
Oval Red 8
Square Red 7
Diamond brown 7
Diamond Red 7
Circle Red 7
Diamond blue 7
Square Red 7
Diamond Red 7
Circle brown 6
Circle Red 6
Square brown 5
Square brown 5
Square brown 5
Square brown 5
Diamond brown 5
Diamond brown 5
Diamond brown 5
Diamond blue 5
Diamond Red 5
Triangle brown 5
Triangle brown 5
Triangle brown 5
Triangle green 5
Triangle blue 5
Triangle Red 5
Circle brown 5
Circle brown 5
Circle green 5
Circle green 5
Circle Red 5
Oval brown 5
Oval brown 5
Oval Red 5
Square green 5
Square Red 5
Diamond brown 5
Circle brown 5
Circle brown 5
Circle green 5
Oval green 5
Square green 5
Oval brown 5
Square green 4
Square green 4
Diamond brown 4
Diamond blue 4
Diamond Red 4
Triangle brown 4
Circle brown 4
Circle brown 4
Circle Red 4
Circle Red 4
Oval brown 4
Oval brown 4
Diamond brown 4
Triangle brown 4
Square green 4
Square Red 4
Diamond brown 4
Diamond brown 4
Diamond green 4
Triangle green 4
Triangle blue 4
Circle brown 4
Oval Red 4
Square Red 4
Diamond green 4
Diamond Red 4
Circle Red 4
Circle Red 4
Diamond green 4
Oval Red 4
Diamond Red 4


What I have tried:

I have tried manually looking....
Posted
Updated 12-Feb-18 8:25am
v3
Comments
David_Wimbley 12-Feb-18 0:50am    
Do you even have the schema done? If so can you post it with some sample data? Otherwise this reeks of a homework problem and the only answer your going to get is to talk to your teacher.
Patrice T 12-Feb-18 2:24am    
Use Improve question to update your question.
So that everyone can pay attention to this information.
Member 13673454 12-Feb-18 9:44am    
Completed, thank you for the advice.

1 solution

If you would like to calculate the number of possible combinations, use COMBIN function - Office Support[^]

Take a look here too: How to list / generate all possible combinations in Excel?[^]
 
Share this answer
 
Comments
Member 13673454 13-Feb-18 18:59pm    
Wouldn't that just tell me the possible combinations of the items? And sadly I only have google docs at the moment, not Microsoft Excel.
Maciej Los 14-Feb-18 0:15am    
Follow the links. There you'll find what you need.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900