Exemplo n.º 1
0
 arrival.clear()
 depart.clear()
 distance.clear()
 demand.clear()
 charge_power=np.empty([1,1])
 installed_chargers.clear()
 installed_cost.clear()
 TFC=np.empty([1,1])
 EV_samples.clear()
 list_data.clear()
 
 #create a scenario data
 arrival, depart, distance, demand, charge_power,installed_chargers,\
          installed_cost,TFC, EV_samples = dataFile(number_of_EVs,
                                                    number_of_timeslot,
                                                    Charger_Type,
                                                    charger_cost,
                                                    slot)
          # arrival,
          # depart,
          # distance,
          # demand,
          # charge_power,
          # installed_chargers,
          # installed_cost,
          # TFC,
          # EV_samples)
 
 
 """
 Calling the model creator function based on generated data
Exemplo n.º 2
0
number_of_scenarios = 100

number_of_timeslot = 24 * slot

Charger_Type = [4, 8, 19]  #type of chargers to install

charger_cost = [1000, 1500, 2200]  #cost of installation
"""
Initializing required data for creating scenario files
"""

#Find the max number of requiredd chargers as CS capacity
count = np.zeros(len(Charger_Type), dtype=np.int8)

for i in range(500):
    installed_chargers = dataFile(number_of_EVs, number_of_timeslot,
                                  Charger_Type, charger_cost, slot)

    for i in range(len(Charger_Type)):
        max_i = installed_chargers.count(Charger_Type[i])
        if count[i] < max_i:
            count[i] = max_i

#using next two variables for creating scenarios data files
number_of_Chargers = sum(count)

chargers_cost = []
installed_chargers = []
for i in range(len(Charger_Type)):
    for j in range(count[i]):
        chargers_cost.append(charger_cost[i])
        installed_chargers.append(Charger_Type[i])