示例#1
0
        
    model_data.append(row)
    
    #print infor about number of scenarios
    if scenario % 200 ==0:
        number_of_EVs +=5
        #check=save_model(model_data,list_row,model_file, data_file)
        #model_data.clear()
        #list_row.clear()
        #progress="Saved Scenarios: "+str(scenario) + "  Number of EVs: "+ str(number_of_EVs-5) +"\n"
        #save_progress(progress)
        # print("solved scenarios:",scenario)
    
    if scenario % 10 ==0:
        #progress="solved Scenarios: "+str(scenario) +"\n"
        check=save_model(model_data,list_row,model_file, data_file)
        model_data.clear()
        list_row.clear()
        progress="Saved Scenarios: "+str(scenario) + "  Number of EVs: "+ str(number_of_EVs-5) +"\n"
        save_progress(progress)
    #     print("solved scenarios: ",scenario)
    
#    gant_chart(model)


"""
All the scenarios executed succesfully
Storing data and results
"""
# print(">>>>>>>>>  time taken:{:0.3f} <<<<<<<".format(time.time()-start_time))
示例#2
0
        #Count number of chargers of each type in the scenario before solving the model
        available_dict[installed_chargers[j - 1]] += 1
        #Count the number of installed chargers after solving model
        if model.q[j] == 1:
            chargers_dict[installed_chargers[j - 1]] += 1

    for i in Charger_Type:
        row.append(available_dict[i])
        row.append(chargers_dict[i])

    model_data.append(row)

    #print infor about number of scenarios
    if scenario % 10 == 0:
        number_of_EVs += 5
        check = save_model(model_data, list_data, file_model, file_data)
        if check:
            model_data.clear()
            list_data.clear()
            print("Saved data for scenario:", scenario)

        # print("solved scenarios:",scenario)

    if scenario % 10 == 0:
        print("solved scenarios:", scenario)

#    gant_chart(model)
"""
All the scenarios executed succesfully
Storing data and results
"""