Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
TelescopeScheduling
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ADS
TelescopeScheduling
Commits
424cb976
Commit
424cb976
authored
2 years ago
by
Sander Boot
Browse files
Options
Downloads
Patches
Plain Diff
added docstring
parent
33e40e9e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
offline.py
+12
-1
12 additions, 1 deletion
offline.py
with
12 additions
and
1 deletion
offline.py
+
12
−
1
View file @
424cb976
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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment