Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Rodrigo Amaro e Silva
    @ramaroesilva
    for cases when several locations share some characteristics
    AdamEaCSIII
    @AdamEaCSIII

    Hi @ramaroesilva,
    Thank you for your in-depth replies. Thanks to them as well as previous conversations above I have managed to solve the problem.
    In case anyone is interested, here is a quick explanation:

    To model these time dependant batteries, I used unique energy carriers with their respective conversion, supply and demand technologies for each electric vehicle parking spot (time-dependant battery).
    The time series could be linked to the supply and demand to represent a car arriving and leaving, and the parking occupancy schedules could be used to deactivate the batteries when no car is present.
    The ev charging capacity is 'offloaded' to the conversion techs so that the battery can be instantly charged or discharged when a car arrives or leaves.
    There is a scrappy example in this thread.

    3 replies
    AdamEaCSIII
    @AdamEaCSIII
    On a different note, is there a simple way to dynamically edit the model (yaml files) from a python script?
    Using ruamel.yaml.dump as shown in https://yaml.readthedocs.io/en/latest/example.html should be possible, but seems a bit clunky.
    Is there maybe a way native to Calliope?
    4 replies
    Rodrigo Amaro e Silva
    @ramaroesilva
    since you showed yourself @brynpickering, it would be super cool if in a future release you could make costs.purchase work with constraints.units_min/max as it does with constraints.energy_cap_min/max
    2 replies
    Guy
    @guylr
    Hi, I don't know if I'm doing something incorrectly but if I set a purchase cost for transmission lines and run the model I get purchased=0 as a result for them. Those transmission lines are being used since they have production/consumption on them. Is the issue maybe that the transmission objects don't have any energy_cap values set? I've left everything as default and only cost provided is the purchase cost.
    Rodrigo Amaro e Silva
    @ramaroesilva
    Hi @guylr. Could you clarify what you mean with "I get purchased = 0" and how you reached that conclusion?
    Guy
    @guylr
    Hi, @ramaroesilva I produced the result CSVs and in results_purchased.csv all components, including the transmission component, have the value 0 under the column purchased. And I can also see that the cost of transmission component doesn't have the purchase cost on it.
    lblabr
    @lblabr
    Hi togehter, more and more sun is shining in germany, yeah!!! i would like to charge my battery more or less on the efficient import power
    more or less, if the charging power is high, also the system efficency of whole system is high, is there a way to model that ? efficiency or costs change with charging power ?
    with less sun i woul like to charge all sun power, with much sun, i would like to charge above 1000W, should i create two batteries with different costs ?
    b-jesse
    @b-jesse

    Hello all
    I have a problem with my model that I can not get fixed even after extensive troubleshooting. I do not even know how this can happen. In my model, electricity is generated in the transmission lines. It drives me crazy. My model is a relatively complex model with many regions, carriers and techniques and running in plan mode. But for debugging, I lowered the complexibilty and even then the problem occurs.
    My links.yaml file looks something like this:

    links:
    ...
       AMPR4,AMPR5:
            techs:
                Interconnector:
                    constraints:
                        energy_cap_equals: 6500000.0

    In my techs.yaml the interconnectors are defined like this

    techs:
    ...
       Interconnector:
            constraints:
                energy_cap_max: inf
                energy_eff: 1.0
            costs:
                monetary:
                    om_prod: 0.0
            essentials:
                carrier: ELC
                color: '#190707'
                name: 'Interconnectors'
                parent: transmission

    I don't see any difference here from the model in the tutorial. However, I get a solution that is calculated quickly but is unfortunately wrong.
    When I look at carrier_prod and carrier_con for the interconnectors, I see the following.
    carrier_con

    AMPR4::Interconnector:AMPR5::ELC  AMPR5::Interconnector:AMPR4::ELC
    timesteps                                                                                
    2050-01-01 00:00:00                       -6.500000e+06                               0.0
    2050-01-01 01:00:00                       -4.191075e+06                               0.0
    2050-01-01 02:00:00                       -4.315738e+06                               0.0
    2050-01-01 03:00:00                        0.000000e+00                               0.0
    2050-01-01 04:00:00                        0.000000e+00                               0.0

    carrier_prod

    AMPR4::Interconnector:AMPR5::ELC  AMPR5::Interconnector:AMPR4::ELC
    timesteps                                                                                 
    2050-01-01 00:00:00                            6500000.0                         6500000.0
    2050-01-01 01:00:00                                  0.0                         6500000.0
    2050-01-01 02:00:00                                  0.0                         6500000.0
    2050-01-01 03:00:00                                  0.0                         6500000.0
    2050-01-01 04:00:00                            6500000.0                         6500000.0

    According to this, I see two problems. On the one hand the line is used in both directions at the same time and on the other hand the use of the line generates electricity.
    carrier_con.sum()

    AMPR4::Interconnector:AMPR5::ELC   -2.217436e+10
    AMPR5::Interconnector:AMPR4::ELC   -6.269706e+08

    carrier_prod.sum()

    AMPR4::Interconnector:AMPR5::ELC    3.499195e+10
    AMPR5::Interconnector:AMPR4::ELC    5.625508e+10

    Does anyone have any idea what this could be? Thanks for your feedback

    4 replies
    lblabr
    @lblabr
    @b-jesse first off all you may have a look to: force_asynchronous_prod_con
    1 reply
    this prevents production/consumption in the same timeslot
    lblabr
    @lblabr

    Hi @All,

    the online documentation tells the following:

    "By default, only the monetary cost class is used in the objective function, i.e., the default objective is to minimize total costs."

    I read the discription about objective_function and that stuff, i did not really understud all of them or how to use... i would like to optimze (miximize) the earnings, how to do that ?

    i have a simple model:
    more ore less only demand, exept two supplys (grid and PV generator) grid costs are variable, from my point of view it makes sense, to use battery stored energy (costs 14..16ct/kWh in happy hour, not the whole day) in time of pv-production and export (feed in tariff 27ct/kWh) all of the pv generation. how to achive an optimzation on earnings ? minimzie costs work, but i don't have a starting point how to maximize earnings optimum on earnings (revneue (export ??) - costs) maximize export, does not help

    8 replies
    lblabr
    @lblabr
    image.png
    b-jesse
    @b-jesse
    @lblabr @ramaroesilva Thank you both for your feedback. I actually found my mistake in a totally different technology. I'm still not sure how my transmission lines were able to produce electricity (as energy_prod was greater than energy_con), but that's doesn't occur anymore after fixing my technology. I haven't used force_asynchronous_prod_con yet, but I will use it if the problem with using the lines in both ways happens again.
    2 replies
    b-jesse
    @b-jesse

    I have another question. Is there any way to model a time-dependent storage? For example, I have a battery that looks like this

    techs:
        example_storage:
        essentials:
            name: 'example storage
            color: '#000000'
            parent: 'storage'
            carrier: ELC
        constraint:
            energy_cap_equals: 1000
            energy_eff: 1.0
            lifetime: 10
            storage_cap_max: inf
        costs:
            monetary:
                interest_rate: 0.05
                om_prod: 1
                energy_cap: 100
                storage_cap: 10

    However, energy_cap_equals is time-dependent. Is there a constraint I can use or any other way to model this? Similar to resource but for energy_cap?

    2 replies
    lblabr
    @lblabr
    could you explain your usecase of an time dependent storage a liitle more in detail ?
    Rodrigo Amaro e Silva
    @ramaroesilva
    I agree with the need to be clearer about your goal, as energy_cap_equals corresponds to the rated capacity of a given equipment
    b-jesse
    @b-jesse

    I want to model a demand response technique like load shift. However, the available load that can be shifted is time-dependent.
    As an example:
    Company 1 cannot shift load between 0 and 8 am,
    between 8 am and 12 pm, it can shift 4 MW
    between 12 and 4 pm, it can shift 6 MW
    between 4 and 8 pm, it can shift 3 MW
    and between 8 pm and 0 am it can shift 1 MW.

    But in my model, there are many more different possible states. So I don't want to model all possible states as a separate technology.

    10 replies
    Andrea B.
    @abart89

    Hi @All! I have used calliope in the past to analyze planning questions but now I am considering it for its operational mode for scenario analysis in existing districts.

    In particular, I'd like to test how systems of given sizes/design behave under different load curves and environmental conditions. For these reasons, I had some doubts regarding how the receding horizon in the operational mode works, with its two parameters horizon and window.

    To understand if I got it correctly: the energy systems "see" parameters for #horizon timesteps in advance (e.g reading them from the external files provided) and the dispatch variables for #window timesteps are computed, then the horizon recedes for #window timesteps? Basically an optimization over the window horizon's timesteps

    Thanks in advance!

    jalomim
    @jalomim
    image.png
    image.png
    image.png
    image.png

    Hi @All!
    I have started using Calliope very recently and I am using it to support a DSO supporting a local DSO in planning the development of their electric and thermal grids. Just as described in the documentation for "demand_share_per_timestep_decision" (https://calliope.readthedocs.io/en/stable/user/advanced_constraints.html) I would am trying to use this constraint to make sure the relative share of heating technologies supplying the low temperature (ltheat) demand in different locations is consistent.
    When I use the "group_share" constraint the model runs smoothly but does not provide the per time-step capabilities, however the "group_constraint" fails.

    For example, I have defined the constraints of the Air-to-Water Heat Pump as in the attached snapshots:
    I would be very grateful if you could please give me a hint as to why I am having this error (and why it is seems to be considering diesel when I specify the technology AWHP and the carrier (ltheat) ?

    3 replies
    AdamEaCSIII
    @AdamEaCSIII
    Hi all, a simple question:
    Is there an easy way for a supply to have multiple carriers as outputs?
    I want to model photovoltaic thermal hybrid collectors (PVT) which output both electricity and heat.
    I can do this by combining a supply with a conversion tech with a unique carrier, but I was hoping to avoid this.
    I suppose it can also be done using the Pyomo backend, but I have no experience there yet.
    What would you recommend?
    Thanks!
    1 reply
    b-jesse
    @b-jesse

    Hello again.
    I have a question about the group_constraints:
    My group_constraint looks something like this

    group_constraints:
        elc_prod_region1:
            locs: ['region1']
            carrier_prod_min:
                ELC: 10000000

    I thought so I can force that region1 must be generated at least 10000000 units of electricity. However, I get the following error message

    [2021-04-16 16:00:00] WARNING Warning: Possible issues found during model processing:
     * Unrecognised group constraint `carrier_prod_min`in group `elc_prod_region1` will be ignored - possibly a misspelling?
    
    Error in print_warning_and_raise_errors:
    Errors during model processing:
     * Invalid carrier tier found at group_constraints.elc_prod_region1.carrier_prod_min_ELC. Only `carrier_`+ [`in`, `out`, `in_2`, `out_2`, `in_3`, `out_3`] is valid.

    So I changed my code to this:

    group_constraints:
        elc_prod_region1:
            locs: ['region1']
            carrier_prod_min:
                carrier_out:
                     ELC: 10000000

    The model is now running, but I am not sure if it will really do what I want. I'm afraid that the constraint only considers technologies that have an input and only the output ELC. So supply, supply_plus, and conversion_plus are ignored. Has anyone already had experience with this and can tell me if this constraint as I have it now takes into account all power generating techniques. I have the constraint from here:
    https://calliope.readthedocs.io/en/stable/user/advanced_constraints.html#group-constraints

    Thanks, everybody

    3 replies
    lblabr
    @lblabr
    are there big difference betwee sense mode minimize and maximize ? the calculation time for minimize is something about 10s with maximize still runs since minutes > 15
    and ongoing
    what informtions you may need to help (model, timeseries, ???) ?
    18 replies
    DEickholt
    @DEickholt

    Hi everyone,

    I am currently looking at different open-source energy modelling tools with the goal of designing minigrids (small stand-alone energy grids without a connection to the main grid). A lot of tools should theoretically work for this purpose, but do not support it explicitly. Therefore, the selection is difficult.

    The long-term goal is to implement e-mobility and vehicle-to-grid options as well. This will be used to analyse possible synergies between new minigrids and e-mobility in rural African villages.

    Since you are all experienced with Calliope already i would really appreciate a short opinion whether you think it is the right tool for this job. If you have any other suggestions I would appreciate those as well.

    Thank you very much and best regards.

    3 replies
    AdamEaCSIII
    @AdamEaCSIII

    Hi everyone,
    I am trying to prevent a conversion tech from operating on certain hours of the year using both the 'energy_prod' and 'energy_con' constraints and a time series csv file. Running it doesn't show any errors, but it does not seem to be constrained properly as it is operating at the times it should be disabled. I tried using 0 and 1 as well as TRUE and FALSE in the csv, but both don't seem to constrain it.
    If anyone has any pointers of what may be going on, I'd really appreciate it.

    The conversion tech looks something like this:

    e_x_conversion:
    essentials:
    name: e-x conversion
    color: '#65AFC5'
    parent: conversion
    carrier_in: electricity
    carrier_out: x
    constraints:
    energy_cap_max: 22
    energy_prod: file=Y:(path).csv:column
    energy_con: file=Y:(path).csv:column

    3 replies
    Francesco Lombardi
    @FLomb

    Hi everyone,

    I am currently looking at different open-source energy modelling tools with the goal of designing minigrids (small stand-alone energy grids without a connection to the main grid). A lot of tools should theoretically work for this purpose, but do not support it explicitly. Therefore, the selection is difficult.

    The long-term goal is to implement e-mobility and vehicle-to-grid options as well. This will be used to analyse possible synergies between new minigrids and e-mobility in rural African villages.

    Since you are all experienced with Calliope already i would really appreciate a short opinion whether you think it is the right tool for this job. If you have any other suggestions I would appreciate those as well.

    Thank you very much and best regards.

    Hi @DEickholt , yes I think Calliope is particularly suited for this kind of job, more so than other options, because it was conceived originally precisely to be easily adaptable to multiple scales, including the local scale. On the Calliope model gallery you can see some examples of district-scale systems, and some more are available in the list of publications. I have myself used it in the past to model a district-scale energy system, for which Calliope allowed me to have a lot more versatility than other commercial software I used in the past

    4 replies
    Francesco Lombardi
    @FLomb

    Hi everyone,
    I am trying to prevent a conversion tech from operating on certain hours of the year using both the 'energy_prod' and 'energy_con' constraints and a time series csv file. Running it doesn't show any errors, but it does not seem to be constrained properly as it is operating at the times it should be disabled. I tried using 0 and 1 as well as TRUE and FALSE in the csv, but both don't seem to constrain it.
    If anyone has any pointers of what may be going on, I'd really appreciate it.

    The conversion tech looks something like this:

    e_x_conversion:
    essentials:
    name: e-x conversion
    color: '#65AFC5'
    parent: conversion
    carrier_in: electricity
    carrier_out: x
    constraints:
    energy_cap_max: 22
    energy_prod: file=Y:(path).csv:column
    energy_con: file=Y:(path).csv:column

    hi, never tried myself to constrain simultaneously consumption and production, so not sure, I should try; but what are you exactly trying to model? that could help figuring out if there are other/better options anyway

    Rodrigo Amaro e Silva
    @ramaroesilva
    lightly off-topic, open position for MSc graduates on exploring calliope for a EU project (@FLomb and @luzgui involved)
    http://www.eracareers.pt/opportunities/index.aspx?task=global&jobId=134543
    2 replies
    FAYDI
    @FAYDI
    Hi,
    I am a new user of calliope and I would like to know, if possible, which transmission I have to choose for special gas (oxygen or hydrogen) from a conversion_plus tech to storage tech.
    Many thanks !!
    Francesco Lombardi
    @FLomb
    Hi @FAYDI, I would say there is only one archetype of transmission technology, which is then free for you to customise at your need. For instance, you can impose transmission capacity limits, transmission costs and/or a transmission efficiency which are tailored to your specific type of transmission (i.e. a pipeline for specific types of gases). Does this answer your question?
    FAYDI
    @FAYDI
    Hi @FLomb, thank you for your answer! So, is it just like heat_pipes but customized for a specific gas distribution ?
    Rodrigo Amaro e Silva
    @ramaroesilva
    Exactly @FAYDI. For me, the beauty of calliope is its extreme flexibility
    While the customization implies some work for the modeller, the freedom entailed is great
    FAYDI
    @FAYDI
    Thanks!! Yes, indeed, this flexibility allows to do a very interessting combination of technologies. It's really great
    FAYDI
    @FAYDI
    Hi, I have another question if somebody could help. Is it possible to force a technology to supply or convert the carrier in specific time (for example during the night) ?
    n-stolz
    @n-stolz

    Hi everyone,
    I am trying to model the European energy-system using the euro-calliope model. In my project I will run a model in planning mode, followed by a run in "operate mode" with the capacity obtained by the planning run.
    Unfortunately I am running into a pretty annoying issue when trying to run the model in operation mode. The model does not run, as it is unfeasible. Saving the model as a .lp file, I discovered that the issue comes from this biofuel constraint in Italy:

    c_e_balance_supply_plus_constraint(ITAbiofuel_2016_01_01_00_0000):
    +1 carrier_prod(ITA
    biofuelelectricity_2016_01_01_00_00_00)
    -1 resource_con(ITA
    biofuel_2016_01_01_00_00_00)
    +1 storage(ITA__biofuel_2016_01_01_00_00_00)
    = 2058

    I don't know why 2058 is the constraint here, it is zero for all other timesteps of this technology and all other loc_techs.

    If I remove biofuel from Italy, the constraint of biofuel in Slovenia (which was 0 when biofuel was allowed in Italy) changes and makes the model unfeasible again. This time the constraint making the model unfeasible is:

    c_e_balance_supply_plus_constraint(SVNbiofuel_2016_01_02_12_0000):
    +1 carrier_prod(SVN
    biofuelelectricity_2016_01_02_12_00_00)
    -1 resource_con(SVN
    biofuel_2016_01_02_12_00_00)
    +1 storage(SVN__biofuel_2016_01_02_12_00_00)
    = 2932.8656850801376

    After removing biofuel from Slovenia, however, the model runs and produces an output.

    My first thought was that there seems to be an issue with the biofuel technology class or the way I link the constraints to the planning part of the model. But there is still biofuel capacity in other countries which is used in the operation mode and all links between the two models are automized, so the way constraints are implemented must be exactly the same for Italy and Slovenia compared to other locations.

    I hope I described my issue in an comprehensible way, if not please let me know.

    Is this issue familiar to anyone? Does anyone know were I could change anything to not run into this problem?
    I am very confused, because there are 34 locations and around 14 technologies that work and the issue only arises at these two instances.

    I would be incredibly grateful if anyone could give me a hint what is going wrong!

    Many thanks!!

    Francesco Lombardi
    @FLomb

    Hi, I have another question if somebody could help. Is it possible to force a technology to supply or convert the carrier in specific time (for example during the night) ?

    @FAYDI yes, that's possible, particularly for supply techs. You could, for instance, set the resource of the technology as a time series (rather than 'inf', if you have a dispatchable supply plant). The time series should then have: resource = a very high value, or inf, during daylight hours; resource = 0 otherwise

    Rodrigo Amaro e Silva
    @ramaroesilva
    @n-stolz, can't you get the outputs you're looking for from the first "planning" run?personally, I have no experience with the "operation" mode.
    n-stolz
    @n-stolz
    @ramaroesilva I need the production time series and unmet demand time series for every location. Can I get that from the planning run?
    Rodrigo Amaro e Silva
    @ramaroesilva
    yes, I'm sure of this. take a look at the documentation on how to store calliope outputs as .csv or .nc (netcdf)
    n-stolz
    @n-stolz
    @ramaroesilva Thank you very much, I found what I was looking for in the planning model!