# Add the root folder of Dispa-SET to the path so that the library can be loaded: import sys, os sys.path.append(os.path.abspath('../../Dispa-SET')) # Import Dispa-SET import dispaset as ds # Load the inputs and the results of the simulation inputs, results = ds.get_sim_results(path='../Simulations/bolivia_base_2025', cache=False) # if needed, define the plotting range for the dispatch plot: import pandas as pd rng = pd.date_range(start='2025-01-01', end='2025-12-31', freq='h') # Generate country-specific plots ds.plot_zone(inputs, results, rng=rng) # Bar plot with the installed capacities in all countries: cap = ds.plot_zone_capacities(inputs) # Bar plot with the energy balances in all countries: ds.plot_energy_zone_fuel(inputs, results, ds.get_indicators_powerplant(inputs, results)) # Analyse the results for each country and provide quantitative indicators: r = ds.get_result_analysis(inputs, results) # Plot the reservoir levels ds.storage_levels(inputs, results)
import dispaset as ds # Load the configuration file config = ds.load_config_excel('../ConfigFiles/ConfigEU.xlsx') # Limit the simulation period (for testing purposes, comment the line to run the whole year) config['StartDate'] = (2016, 1, 1, 0, 0, 0) config['StopDate'] = (2016, 1, 7, 0, 0, 0) # Build the simulation environment: SimData = ds.build_simulation(config) # Solve using GAMS: _ = ds.solve_GAMS(config['SimulationDirectory'], config['GAMS_folder']) # Load the simulation results: inputs, results = ds.get_sim_results(config['SimulationDirectory'], cache=False) # Generate country-specific plots ds.plot_zone(inputs, results) # Bar plot with the installed capacities in all countries: cap = ds.plot_zone_capacities(inputs) # Bar plot with the energy balances in all countries: ds.plot_energy_zone_fuel(inputs, results, ds.get_indicators_powerplant(inputs, results)) # Analyse the results for each country and provide quantitative indicators: r = ds.get_result_analysis(inputs, results)
sys.path.append(os.path.abspath('../../Dispa-SET')) # Import Dispa-SET import dispaset as ds # Load the inputs and the results of the simulation inputs, results = ds.get_sim_results( path='../Simulations/bolivia_base_test_2020', cache=False) # if needed, define the plotting range for the dispatch plot: import pandas as pd rng = pd.date_range(start='2020-01-01', end='2020-12-31', freq='h') # Generate country-specific plots ds.plot_zone(inputs, results, z='CE', rng=rng) ds.plot_zone(inputs, results, z='NO', rng=rng) ds.plot_zone(inputs, results, z='OR', rng=rng) ds.plot_zone(inputs, results, z='SU', rng=rng) # Bar plot with the installed capacities in all countries: cap = ds.plot_zone_capacities(inputs) # Bar plot with the energy balances in all countries: ds.plot_energy_zone_fuel(inputs, results, ds.get_indicators_powerplant(inputs, results)) # Analyse the results for each country and provide quantitative indicators: r = ds.get_result_analysis(inputs, results) # Plot the reservoir levels
# Change directory to the root folder of Dispa-SET: import sys,os sys.path.append(os.path.abspath('..')) # Import Dispa-SET import dispaset as ds # Load the configuration file config = ds.load_config('../ConfigFiles/Config_Mid_Term_Scheduling.xlsx') ## Build simulation data with new profiles SimData = ds.build_simulation(config,mts_plot=True,MTSTimeStep=24) #Solve using GAMS: r = ds.solve_GAMS(config['SimulationDirectory'], config['GAMS_folder']) # Load the simulation results: inputs,results = ds.get_sim_results(config['SimulationDirectory'],cache=False) # Generate country-specific plots ds.plot_zone(inputs,results,z='DE') # Bar plot with the installed capacities in all countries: cap = ds.plot_zone_capacities(inputs) # Bar plot with the energy balances in all countries: ds.plot_energy_zone_fuel(inputs,results,ds.get_indicators_powerplant(inputs,results)) # Analyse the results for each country and provide quantitative indicators: r = ds.get_result_analysis(inputs,results)