Skip to content
Snippets Groups Projects
Commit 424cb976 authored by Sander Boot's avatar Sander Boot
Browse files

added docstring

parent 33e40e9e
No related branches found
No related tags found
No related merge requests found
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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment