Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Co tra dis #309

Open
wants to merge 145 commits into
base: CoTraDis_
Choose a base branch
from
Open

Co tra dis #309

wants to merge 145 commits into from

Conversation

sonercandas
Copy link
Contributor

No description provided.

Added modes for on/off and minimum working load processes (and potentially also for combined heat and power)
Added cost type 'Start-up'.
Added onoff_dict and start_price_dict (when onoff mode is active). 
Made min_fraction_dict, r_in_min_fraction and r_out_min_fraction active only if the minfraction mode is active. 
Added cap_block_dict - for the expansion blocks of processes
Added tra_block_dict (when tra mode is active), sto_block_c and sto_block_p  when sto is active - for the expansion blocks of transmission and storage
Added pro_cap_new_block_tuples
Replaced pro_maxgrad_tuples and the related constraints with pro_rampupgrad_tuples and pro_rampdowngrad_tuples and their respective constraints
Added the variable cap_unit for processes expansion
Replaced add_time_variable_efficiency with add_advanced_processes (for tve, onoff and minfraction (and chp))
Eliminated pro_partial_tuples and their respective constraints and put them in AdvancedProcesses.py
Added the def_new_capacity_units constraint for the expansion of processes with expansion blocks
Added the 'Start-up' costs rule
Throughput also gets in the result excel file
Same as in output.py -> throughput gets exported into excel
Same as in output.py -> the throughput gets exported to the result excel file
Deactivated the saving of the solution as an HDF5 format (duality problem for the investment costs since adding the on/off option)
Added sto_block_c_tuples and sto_block_p_tuples
Added cap_sto_c_unit and cap_sto_câp_unit variables
Added def_new_cap_sto_c and def_new_cap_sto_p constraints
Added tra_block_tuples
Added cap_unit_tra variables (two times)
Added def_cap_tra_new constraint (two times, rule only once)
Replaced TimeVarEff with AdvancedProcesses
Changed name
Replaced add_time_variable_efficiency with add_advanced_processes
Modules:
I. tve: same as before + the adapted constraints from onoff

II. onoff: 
    Tuples: pro_on_off_tuples (with input and output), pro_partial_on_off_tuples (with input and output), pro_rampup_start_tuples (for a defined start-time), pro_rampup_divides_minfraction_output_tuples, pro_rampup_not_divides_minfraction_output_tuples, pro_rampup_bigger_minfraction_output_tuples (the three cases for output ramp up), pro_start_up_tuples (for start-up costs).

    Variables: on_off, start_up 

    Constraints: res_throughput_by_on_off_lower, res_throughput_by_on_off_upper (for linking tau and on_off), def_process_on_off_input, def_process_on_off_output, def_partial_process_on_off_input, def_partial_process_on_off_output, res_starting_rampup (for start ramp), res_output_minfraction_rampup + partial equivalent, res_output_minfraction_rampup_rampup + partial equivalent, res_output_rampup + partial equivalent (the three cases for output ramp-up), res_start_ups (for registering a start-up)

III. minfraction:

Tuples: pro_minfraction_tuples (with output), pro_partial_tuples (with input and output) (all moved from model.py)

Constraints: res_throughput_by_capacity_min, def_partial_process_input, def_partial_process_output (all moved from model.py)

(IV. CHP)
Replaced  maxgrad with ramp up, ramp down and start ramp
Replaced max-grad with ramp-up-grad and ramp-down-grad and added starting-time
Added start-price and cap-block
Added capacity blocks for storage and transmission.
Moved process start price from technical parameters
Moved process start price to economic parameters
Start up costs, omicron (on_off), no description
Added documentation for omicron and start-ups
Replaced pro_maxgrad_tuples with pro_rampupgrad_tuples, pro_rampdown_tuples and pro_rampup_start_tuples.
Added the documentation for pro_tuples subtypes (pro_minfraction_tuples, pro_partial_tuples, pro_on_off_tuples, pro_on_off_tuples, pro_partial_on_off_tuples.
Added outputs: still need to do the description for output rampup
Added documentation for the output ramping tuples
Forgot spaces and points
Added documentation for inputs
Added tra_block_tuples with description
Added capacity and power block tuples for storage with description
Added units for new capacities for processes, transmission and storage. To add description!!
Added def_cap_tra_new with definition
TDiaconu and others added 30 commits April 29, 2020 13:56
part load image
Part load.png image
working images
corrected image address
Forgot the empty tuple 
m.pro_rampup_start_tuples = pyomo.Set(
            within=m.stf * m.sit * m.pro,
            doc='Processes with different starting ramp up gradient')
Separated the equations limiting the throughput for minimum load and part load behaviors
…o enable the consideration of reactive power and voltage magnitudes with a new OPF linearization at distribution system level (2) and to reduce the computational complexity with a typeperiod approach combined with timeseries aggregation methods (3):

1. Distribution data are merged with the transmission data (editing mainly in transdisthelper.py):
- approach allows to choose the microgrid types and their number in the excel input sheet - two parameter lists are defined: selection list & multiplicator list
- the distribution grid is constructed with microgrid modules (excel input sheets) and the selection list
- capacities, commodities, demand, areas & voltage are scaled with the multiplicator list (base voltage is scaled with the root function of the multiplicator)
- additional transmission lines are modelled for the reactive power
- reactive output ratios are implemented for processes at distribution system sites
- concatenation of all transmission and distribution subsystem data - automatic indexing of each subsystem

2. ACPF is enabled applying the LinDistFlow model (editing mainly in transmission.py & model.py):
- derivation of general AC code from DC code structure
- definition of AC transmission tuples & sets to apply all relevant existing rules
- implementation of new LinDistFlow model constraints (active and reactive power flows are related to the voltage magnitudes)
- coupling of P & Q with apparent power flow transmission line constraint
- implementation of a voltage rule to hold magnitude within defined permissible voltage range
- implementation of a set containing all slack buses (bus at interface) and introduction of slackbus voltage (& slackbus angle - not mandatory in LinDistFlow but nice to have) constraints
- enabling of ACPF also for systems without microgrids (adjustments in runfunctions.py and in transdisthelper.py in add_reactive_output_ratios to delete duplicated process commodities also when ACPF is desired without microgrids)

3. Enable Typeperiod with time series aggregation method (editing mainly in typeperiod.py)
- implementation of typeday approach according to the urbs branch of Daniel Zinsmeister and changed for typeweek consideration
- the time series aggregation module (tsam) from Kotzur, L., Markewitz, P., Robinius, M., & Stolten, D. (2018) is integrated into the urbs model primarily within the typeperiod.py module to be able to choose typeweeks with machine learning algorithms
- new sets, rules and constraints are introduced to enable seasonal storage within tsam
- cyclicity constraint is adjusted
- timseries input number for tsam is reduced by only processing unique timeseries
- postpone demand shifting after tsam to increase number of unique timeseries

Other:
- adjusted package versions and deprecated code to adapted MIQCP environment
- changed buysell indexing in code to be able to use same processes for different locations analogously to supim comtype
- edited deprecated code in pyomoio.py
- enabled demand shifting between scenarios with crossscenario data
- introduced scenario function to run all 4 scenarios at once
Edited Documentation
deleted unnecessary files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants