Exemple #1
0
 def test_add_truck(self):
     order_probability = 300
     var_food_zone = FoodZone(order_probability)
     price = 3000
     making_time = 60
     var_truck = FoodTruck(price, making_time)
     var_food_zone.add_truck(var_truck)
     self.assertIn(var_truck, var_food_zone.food_trucks) # var_truck이 food_truck에 있나
Exemple #2
0
 def test_add_truck(self):
     order_probability = 300
     var_food_zone = FoodZone(order_probability)
     price = 3000
     making_time = 60
     var_truck = FoodTruck(price, making_time)
     var_food_zone.add_truck(var_truck)
     self.assertIn(var_truck, var_food_zone.food_trucks)
Exemple #3
0
def main():
    order_probability = 300
    open_seconds = 60*60*6*20*12
    food_list = [(2000, 60)]
    food_zone1 = FoodZone(order_probability)

    for price, making_time in food_list:
        food_zone1.add_truck(FoodTruck(price, making_time))

    start_simulation(food_zone1, open_seconds)
    print('----# Food zone 결과(영업 시간: {0:.1f}, 손님 확률: 대략 {1}초당 1명) #----'.format(
            open_seconds/(60*60), order_probability))
    print_food_zone_result(food_zone1, open_seconds)