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
    This is a pertinent question, which I have yet to address in my projects.
    I looked at the per-tech constraints and couldn't find what you're looking for (which does not mean it is not there)
    lblabr
    @lblabr

    in your case, you have a 11 kW battery (rated capacity, fixed value), which can only operate at power levels >= 2.4 kW (power operation, which varies in time) and <= its rated capacity.

    what do you mean with rated capacity, the capacity of the battery is 13,1kWh

    so charging may operate at a power level 2.4kW ... 11kW, charging duration the 13,1kWh depends an Charging level
    Rodrigo Amaro e Silva
    @ramaroesilva
    you're right, I meant "rated power".
    lblabr
    @lblabr
    okay, understud the contraints have a mor or less universal meaning depending on tec
    tech ?
    Rodrigo Amaro e Silva
    @ramaroesilva
    so energy_cap_max/min/equal refers to allowed rated power, not operation power
    28 replies
    lblabr
    @lblabr
    okay
    should we open a thread ?
    Rodrigo Amaro e Silva
    @ramaroesilva
    also, for clarification, installed capacity can refer to the rated power of a generator (which I understand that for batteries is confusing)
    lblabr
    @lblabr
    could we discuss in theread ? pls look to your message with replies
    Rodrigo Amaro e Silva
    @ramaroesilva
    ok. just to conclude the "naming" topic, for calliope nomenclature you have:
    • energy_cap: in kW (the battery rated power)
    • storage_cap: in kWh (the battery capacity)
    lblabr
    @lblabr
    you are right
    lblabr
    @lblabr
    image.png
    Rodrigo Amaro e Silva
    @ramaroesilva
    @lblabr, if you have fixed your issue could you write a short text here explaining again your problem and how you fixed it?
    lblabr
    @lblabr
    this way is already descibed at github and also a way with a group contraint is mentioned
    Rodrigo Amaro e Silva
    @ramaroesilva
    @lblabr could you add that information to your github issues and close them (if both are already addressed)? thanks!
    Mark Geiger
    @MarkGeiger_gitlab

    Hi there,

    my names Mark, I am new here. Currently, I am about to finalize my research proposal for my PhD, for which I will at some point create an energy system model. Which is why I stumbled upon calliope.

    So far I still did not understand what calliope is really doing. I get that I can build my model (regions, demands for power / electricity, supply / energy production and transmission lines). But what is the part of the solver? What does it solve?

    Thanks!

    10 replies
    Graeme Hawker
    @GraemeHawker

    Hi everyone, I'm trying to update my old models to the latest functionality and I'm a little confused over how 'export' now works. Let's say I have some excess free power available in a model (e.g. some wind power that is beyond what is required to meet the demand in the model), and I want to be able to convert this spare energy into another carrier which has an external value. For the sake of an example, we have a machine which converts power into magic beans which are worth $1000/kWh of beans. I could state this as follows:

    magic_bean_maker:
            essentials:
                name: 'Magic bean maker'
                color: '#3B61E3'
                parent: conversion
                carrier_in: power
                carrier_out: magic_beans
                export_carrier: magic_beans
            constraints:
                energy_eff: 1.0
                lifetime: 25
            costs:
                monetary:
                    interest_rate: 0.10
                    energy_cap: 0  # USD per kW
                    om_con: 0
                    export: -1000

    However, when I put this into a model with energy_cap_equals: 1000 at a location with free power, despite there being no cost to producing beans and a clear negative cost to exporting them, no beans are produced. Is this because there is no demand for beans defined anywhere in the model, and the framework can only optimise for carriers with a demand?

    Graeme Hawker
    @GraemeHawker
    Minimal(ish) example model for the Missing Bean Problem: https://github.com/GraemeHawker/calliope_examples/tree/main/model_1
    Rodrigo Amaro e Silva
    @ramaroesilva
    I've configured exportation the same way you did for a PV generator (i.e. without having to conver its carrier) and it worked.
    I'll try to take a look at your repo later this week :-)
    Graeme Hawker
    @GraemeHawker
    Thanks rodrigo, yes it works as expected for a supply tech with a demand for the same carrier, but not in this conversion case. Working through the code I think this is because if a carrier does not have a demand in the model then it is not included in the pyomo problem construction? (I appreciate doing otherwise could lead to unbounded problems) If I create proxy demand/supply techs to effectively hack the same thing (ie there is a demand for the export carrier at least as great as the maximum output, and a competing unconstrained supply tech with om_con at what would be the export price) then this comes to the expected solution - but this is not a desirable way of doing it because it skews all the cost results.
    Adam A/S
    @AdamEaCSIII

    Hi everyone,
    I am hoping to model electric vehicles (EV) as storage . I was trying to do so by using a storage technology with storage_cap_max being input as a time-series representing whether the electric parking spot is occupied or not:

    battery:
        essentials:
            name: 'Battery storage'
            color: '#3B61E3'
            parent: storage
            carrier: electricity
        constraints:
            energy_cap_max: 22  # kW
            storage_cap_max: df=EV_max_charge:EV_0

    However, it does not seem to work, ignoring the max capacity.

    In other words, is it possible to input storage_cap_max as a time-series?
    Or is there a better way to do this?

    Cheers!

    1 reply
    Rodrigo Amaro e Silva
    @ramaroesilva
    hi @AdamEaCSIII
    as far as I know, both energy_cap and storage_cap cannot be modelled as timeseries
    take a look at "file_allowed" to understand which parameters allow for timeseries
    https://calliope.readthedocs.io/en/stable/user/config_defaults.html#config-reference-model
    Rodrigo Amaro e Silva
    @ramaroesilva
    something that I thought on was to model availability with one of the efficiency parameters (directly in the storage or in a link connecting the storage to the rest of the grid)
    where available time periods have efficiency = 1 and 0 for the remainder
    if you have pre-defined values for the energy_cap and storage_cap of the EV, define them explicitly in the yaml.
    otherwise, leave it empty so that calliope optimizes those parameters
    Rodrigo Amaro e Silva
    @ramaroesilva
    has anyone ever tried implementing a costs.monetary.purchase>0 constraint for a storage technology ?

    when I do it, the model crashes sending this message

    Malformed term in expression
    [2021-03-10 11:52:18] DEBUG Neighboring tokens: " inf x1224 +1 x835 <= 0 c_u_x3558_: "
    [2021-03-10 11:52:18] DEBUG
    [2021-03-10 11:52:18] DEBUG Unable to read file

    1 reply
    Rodrigo Amaro e Silva
    @ramaroesilva
    on another issue, is it possible to define someting like a "location_group"?
    for cases when several locations share some characteristics
    Adam A/S
    @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
    Adam A/S
    @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