-
Notifications
You must be signed in to change notification settings - Fork 0
datagen.py
Uzair edited this page Oct 31, 2022
·
1 revision
Creates a csv file with a START node at (0,0), a TARGET at (20, 20), and NUM_VERTICES obstacle nodes inside x, y ∈ [3, 17].
numpy is used for generating a 2x5 matrix of random floats.
Two parameters are set after the imports for easy access to changing those values:
NUM_VERTICES and FILENAME
-
NUM_VERTICESis the number of vertices that should be generated. This is not necessarily the number of vertices in the convex hull that is the restricted region, as some points will be enclosed within the convex hull. -
FILENAMEis the name of the file to save the test data to. Does not include the file extension.csv.
START and TARGET are always at (0, 0) and (20, 20), and the range of possible values for x and y is always [3, 17] currently. Changing these values is trivial if required.