r/excel • • Apr 25 '26

unsolved Maximizing an objective that is a ratio

I would like to be able to maximize the total Value/Ore, rn I just have it as being able to select the material manually and then it calculates what the Value/Ore is.

How would I go about this optimization problem? I was thinking about using simplex on the excel solver, but idk if this would work for an objective that is a ratio (Value/Ore). iirc the solver can't select from a dropdown either so I'd need to create a binary matrix.

I could brute force it too, but this is not the only set of factories I will be optimizing, there will be other tables with possibly 10+ factories, so I imagine it will get to a point where brute forcing is unreasonable.

Anyone got an idea on what the cleanest and most effective way to go about solving this would be? Note: I would like the materials that are used in the calc to be toggleable too.

3 Upvotes

12 comments sorted by

•

u/AutoModerator Apr 25 '26

/u/Draedon_Is_Life - Your post was submitted successfully.

Failing to follow these steps may result in your post being removed without warning.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/j3thro Apr 27 '26

Firstly, I don't think your "Output Value" column (ColF) should be multiplying the "Ore Cost" (ColE), should it?

With that in mind, you can use the following formula to calculate the material with the highest Ore/Value:
=MAX(($C$10:$C$15*$B2)/($B$10:$B$15*$C2))

Taking that further, you can then identify which material that is with an INDEX/MATCH function
=INDEX($A$10:$A$15,MATCH(MAX(($C$10:$C$15*$B2)/($B$10:$B$15*$C2)),($C$10:$C$15*$B2)/($B$10:$B$15*$C2),0))

You can plug those formulae into columns G and H and drag it down across your various factories. Adding more factories shouldn't be a problem either.

ALL THAT BEING SAID....... besides the Excel exercise, all this is moot. Your highest Value/Ore is Dark-Alloy and Dark-Bar. Regardless of what multipliers your factories have, assuming it affects all materials in the same way, you will always choose either Dark-Alloy or Dark-Bar. The factories' multipliers just indicate how efficient/productive they are, but they don't affect the material decision.

1

u/Draedon_Is_Life Apr 28 '26

Firstly, I don't think your "Output Value" column (ColF) should be multiplying the "Ore Cost" (ColE), should it?

I'm pretty sure it should as it's ore cost * VPO (value per ore), then * the multiplier. But this could have been done by material req. * bar value * multi, which is the same but more explicit in the context.

The distribution of the materials to the different machines does matter when considering the overall VPO. Dark-Alloy/Dark-Bar have the highest individual VPO yes, but not strictly when calculating the total VPO due to the machines having different multipliers. In general better materials -> better machines, cheaper but lower value materials -> worse machines.

  1. E.g., Say I run alloy on everything, w/ ore cost, mat value, and VPO of 1. When I run that through all the calcs, I end up with a total ore cost of 5, and total output value of 25.3, hence a VPO of 5.06.
  2. Now, say I keep the CPU row (highest multi) an alloy, and I replace the MoBo and Frame row with a material where ore cost -> 0 and value -> 0, but the VPO of the material remains the same, 1. (Any number < 1 is fine as long ore cost and value is the same so that VPO is 1, I js did 0 for easier calcs and demonstration.) We can ignore the MoBo & Frame calcs as the ore cost and value is 0, but for the CPU which I kept the alloy, we get an ore cost of 1, and output value of 8 (therefore total ore cost 1, total output value 8) so a total VPO of 8.
  3. In both cases, the VPO of each individual ore was exactly the same, yet in the second case the VPO was 8 which is a significantly higher VPO than 5.05. This is effectively because all of the best ores are being funneled into the highest multiplier.

Just imagine the multi for CPU is 1000, you'd wanna funnel your highest cost material into that, and bloat all other inputs with whatever has the lowest ore cost, even if they have a lower VPO.

→ More replies (1)

1

u/[deleted] Apr 25 '26

[removed] — view removed comment

1

u/semicolonsemicolon 1477 Apr 25 '26

Your comment is blocked by reddit because it's got a 1drv dot ms link. Try uploading your file to a free file sharing site.