diff --git a/offline.py b/offline.py index bfb8b678ab5fd46bc5a64911cdabf4e42c4f25ee..d57d8128be2918f0d18236d5c4f6bea12d0a8d0e 100644 --- a/offline.py +++ b/offline.py @@ -1,9 +1,20 @@ import gurobipy as gp from gurobipy import GRB import copy +from typing import List, Tuple +def Solve(images : List[int], blackouts : List[Tuple[int, int]]): + """This function calculates the total processing time of the telescope problem given the lists of images and blackouts -def Solve(images, blackouts): + This function uses an ILP for solving this problem. + + Args: + images (List[int]): A list with the sizes of the images that will be send between the blackouts + blackouts (List[Tuple(int, int)]): A list with all the blackouts given their start and end time as a tuple + + Returns: + Tuple[int, List[int]]: Returns a tuple with the total amount of time needed, and the start time for each image + """ # if there are no blackouts, just send the images in after eachother, there is no unique optimal solution if not blackouts: