Esempio n. 1
0
                run_sim_state(integration_period, input_generators)
                # run_sim(integration_period, input_generators)

                # pickle run_perams
                with open(OUTPUT_PICKLE, 'wb') as fd:
                    pickle.dump(
                        {
                            'integeration_period': integration_period,
                            'device_map': device_map
                        }, fd)

                # write info file
                write_to_ifile(OUTPUT_CSV, integration_period,
                               input_generators)
                # write copy of the pickle file
                write_to_peramfile(OUTPUT_CONFIG, integration_period,
                                   device_map)

                print("CSV File Input Gen:")
                print(input_generators)
                print("Integration Period:")
                print(integration_period)
                print("Device Map:")
                print(device_map)

                # Quit the Program after Simulation
                exit(0)

            elif inp == 'q':
                exit(0)

            print()
Esempio n. 2
0
                               str(batch_csv_data[bindex][0]) + OUTPUT_PICKLE),
                              'wb') as fd:
                        pickle.dump(
                            {
                                'integeration_period': integration_period,
                                'device_map': device_map
                            }, fd)

                    # write info file
                    write_to_ifile(
                        'simulationfiles/scheduleobjects/csvs/' +
                        str(batch_csv_data[bindex][0]) + OUTPUT_CSV,
                        integration_period, input_generators)
                    # write copy of the pickle file
                    write_to_peramfile(
                        'simulationfiles/scheduleobjects/csvs/' +
                        str(batch_csv_data[bindex][0]) + OUTPUT_CONFIG,
                        integration_period, device_map)

                    print("CSV File Input Gen:")
                    print(input_generators)
                    print("Integration Period:")
                    print(integration_period)
                    print("Device Map:")
                    print(device_map)
                    #exit()
                    device_map = {}
                    bindex = bindex + 1
                # Quit the Program after Simulation
                #subprocess.call(['./CalculationEngineBATCH.py', str(batch_file_name)], shell=True)
                sys.argv = ['', str(batch_file_name)]
                runpy.run_path('./CalculationEngineBATCH.py',