Skip to content

Commit

Permalink
transport-service: boost transport generation to 60 days and make mor…
Browse files Browse the repository at this point in the history
…e room in individual transports

Signed-off-by: Paweł Cichowski <[email protected]>
  • Loading branch information
pcichowski committed May 21, 2024
1 parent 4a9fa48 commit 69e9d07
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void run(String... args) {
int randomSeed = 12345678;
Random random = new Random(randomSeed);

int numberOfDays = 10;
int numberOfDays = 60;

// generate transport for each course and every day of two months
for (int day = 0; day < numberOfDays; day++) {
Expand Down Expand Up @@ -123,7 +123,7 @@ public void run(String... args) {
}

private void createReservationsForTransport(Random random, TransportCourseDto planeCourse, int capacity, TransportDto transportDto) {
int numberOfReservationsToMake = random.nextInt(0, 10) > 6 ? capacity : (int) (capacity * 0.8);
int numberOfReservationsToMake = random.nextInt(0, 10) > 7 ? capacity : (int) (capacity * 0.6);

while (numberOfReservationsToMake > 0) {
int occupiedSeats = random.nextInt(1, 8);
Expand Down

0 comments on commit 69e9d07

Please sign in to comment.