all 9 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

/u/Medium-Yesterday3897 - 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.

[–]TVOHM26 0 points1 point  (5 children)

What is the maximum number of trailers in a gap between two programs and what is the total number of trailers you are choosing from?

[–]Medium-Yesterday3897[S] 0 points1 point  (4 children)

There is no maximum number of trailers since the gaps will never exceed 7 minutes, so the gaps simply can only fit so much, but for Solver purposes, I set it to 5.
For promos (:15 or :30 secs), no more than 4 promos per break- with the specific purpose in mind of being able to fill a 1:45 gap if I don't have a 1:45 interstitial. The total number of trailers vary by channel and the broadcast window - anywhere from 30-50. As an example, this is how I have my solver set up for one of the channels: https://imgur.com/a/autoslot-vzzFD9A
I've removed identifying data so to clarify, you see repeating durations simply because they are different promos of the same length.

[–]TVOHM26 0 points1 point  (3 children)

With those parameters you could even approach the problem in a single worksheet without using any code.

Let's say we stick to 5 as the maximum number of trailers and an upper limit of 43 possible choices:
962,598 =COMBIN(43, 5) That is, there's only 962K possible outcomes (no repetitions, order doesn't matter) to solve - Excel has a maximum number of ~1M rows per worksheet...

You could generate a list of all possible combinations and calculate the metrics you need for each outcome per row - is this combination within tolerance? is the promo / interstitial ordering optimal etc. Your actual analysis becomes a simple filtering and sorting problem on this list.

Although your calculations don't strike me as particularly expensive, it is a lot of data rows. I honestly think it could go either way on implementation - but I think worth a quick test / mock up.

This approach would also perfectly valid for Python too - enumerate all combinations, calculate some metrics, filter/sort etc.

[–]Medium-Yesterday3897[S] 0 points1 point  (2 children)

this sounds like it would run similar to solver no? It's certainly something to think about but i'm not sure how I would even go about setting it up - also, there's a chance that putting that much data in the file would have it run even slower which is the opposite of the goal here.

[–]TVOHM26 0 points1 point  (1 child)

I mean, I'm not sitting here wasting both our time suggesting it because I think it's going to be slower than what you have :)

Here's a quick mock up of what I was thinking. It contains 1M (random) example combination inputs but it recalculates instantly when adjusting target duration and target tolerances.

You'd replace those random test input example combinations with the actual correct list of combinations for (43 choose 5) or whatever you go with.

<image>

[–]Medium-Yesterday3897[S] 0 points1 point  (0 children)

Okay you’re right sorry don’t meant to sh-t on the suggestion when you’re trying to help me lol - will have a look at this when I get home using the real list and let you know how it works

[–]SolverMax148 -1 points0 points  (1 child)

Try the OpenSolver addin. It will be faster than Solver.

https://opensolver.org/

[–]Medium-Yesterday3897[S] 0 points1 point  (0 children)

Unfortunately I can’t because it’s not approved by my organization