Showing posts with label Solver. Show all posts
Showing posts with label Solver. Show all posts

Second best choice with Solver

Solver is usually used to find the "best" solution. We aim to maximize value in a knapsack problem, or maybe minimize the scheduling time required for a set of jobs to be completed on some machines, and so on.

But what if we would like to know the second, or third best choice? Maybe we can gain some insights into our problem exploring suboptimal solutions. There are some caveats, but with a bit of VBA this is a feasible problem (pun intended).

Switching from Solver to OpenSolver

I was solving a very simple model found in a forum: given a total cost in € (or $\$$, if you are reading from across the ocean) for a set of projects, and the hourly cost of 3 technician involved, find the integer number of hours each one should spend on it. The aim is minimizing the wasted time, that is, solve the following

$$
 \min \left| TC - \sum_{i=1}^{3} c_{i} k_{i} \right| \; \; s.t. k_{i} \in \mathbb{N}
$$

The problem was to be solved for a number of rows, with different costs.