changes for temp render

This commit is contained in:
Niclas3006
2026-05-10 05:02:33 +02:00
parent 545f7bf454
commit fbfc2c7ed3
4 changed files with 61 additions and 21 deletions
+14 -7
View File
@@ -16,7 +16,7 @@ import numpy as np
FRAME_MULTIPLIER_VIDEO = 10
def renderTomp4(removeImageSource = True):
def renderTomp4(removeImageSource = False):
img_list_unfiltered = os.listdir(OUTPUT_DIR)
img_list =[]
@@ -84,10 +84,10 @@ def createRandomsListSequence(points:set):#, garages:set
def main():
# seeded randomness
random.seed(0)
random.seed(25)
space = MetricSpace.getPopulatedSpace(10,10)
ammountToKeep = random.randint(20,95)
ammountToKeep = 100#random.randint(50,95)
points = createRandomSubspace(space.points,ammountToKeep)
func = space.distancefunction
@@ -95,7 +95,7 @@ def main():
space = MetricSpace(points,func)
# generate garages
garagesCount = random.randint(3, 8)
garagesCount = 3#random.randint(5, 10)
garages_locations = createRandomSubspace(points, garagesCount)
capactiyPerGarage = math.ceil(50.0/garagesCount)
#create Garage capacity
@@ -103,15 +103,22 @@ def main():
for x in garages_locations:
garages.append(Garage(x,capactiyPerGarage))
garages = [Garage(Point(0,0),1),
Garage(Point(5,9),1),
Garage(Point(8,5),1)]
gMngr = GarageManager(garages)
# initiate solving Algorithm
algo : SolvingAlgorithm = SolvingAlgorithm(space,gMngr)
algo : SolvingAlgorithm = AlgorithmA(space,gMngr)
#algo : SolvingAlgorithm = AlgorithmA(space,gMngr)
# sequence = createRandomsListSequence(points.difference(garages),garages) squence without garages
#sequence = createRandomsListSequence(points)
sequence = createRandomsListSequence(garages) # For algo A
sequence = createRandomsListSequence(points)
#sequence = createRandomsListSequence(garages) # For algo A
sequence = [Car(Point(5,5),0),
Car(Point(9,0),1),
Car(Point(1,1),2)]
fmg = frameGenerator(space,gMngr)
fmg.renderFrame()