by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Francesco Lombardi
    @FLomb
    Hi @jvValdes , I guess that for transmission techs it would be a bit weird to have both om_con and om_prod, because of the bi-directionality of the flows. Anyway, nothing should prevent you from setting a negative om_prod for any technology (in the urban_scale example PV has a negative om_prod, for instance). This might work well enough for your case, 'cause basically you would have a revenue for each time an energy flow is transmitted from one location to another. You just have to take care when post-processing the results and be sure about which node is earning the revenue (if that is important to you). Let me know if that works
    jvValdes
    @jvValdes
    Hi Francesco,
    Thanks for your help! Yes, I am mainly interested in the energy flows between locations and the lcoe for each location. I followed your advice and modified the model including a negative cost for the om_prod in the transmission lines below the cost of the national_grid. To double check I also do the same in the urban_scale model including in transmission lines: om_prod = -0.099, which is slightly bellow the cost of the national grid. Is that what you meant?
    I run the models and exported the results. When I examine the results_carrier_con for the power grid, the results are extraordinary high and negative for all locations, same for results_carrier_prod. Actually the transmission lines are used until the energy_cap_max is reached. I am not sure if that behaviour is normal. I expected to obtain (lower) negative values only for the locations where the carrier is consumed in the file results_carrier_con and (lower) positive values for the Locations where the carrier is produced in the results_carrier_prod. Finally, when I check the results_cost_var file the negative costs are also incurred in all Locations. I am fairly new to Calliope and I am not understanding these results. Do they make sense to you? Thanks!
    Francesco Lombardi
    @FLomb
    Hi @jvValdes , it's hard to tell not knowing precisely the structure of your model, but clearly if it doesn't make sense to you then it is probably wrong. From what you say (e.g. "results are extraordinarily high") it seems that setting a revenue for transmission leads to a weird and unwanted behaviour. This could be due to the fact that overproducing electricity with some technology for the sake of trading it leads to revenues that exceed the costs of production; could that be?
    jvValdes
    @jvValdes

    Hi @FLomb. yes the system is overproducing electricity, but I am not sure from where/why. The electricity flows between nodes are higher than the electricity produced in the whole system. That is why the results are so weird to me. Let me introduce this toy model. I am actually using a reduced version of the urban scale model with only two nodes. The only differences are the following. First, as you suggested, I added a om_prod to the power_lines:

        power_lines:
            essentials:
                name: 'Electrical power distribution'
                color: '#6783E3'
                parent: transmission
                carrier: electricity
            constraints:
                energy_cap_max: 2000
                energy_eff: 0.98
                lifetime: 25
            costs:
                monetary:
                    interest_rate: 0.10
                    energy_cap_per_distance: 0.01
                    om_prod: -0.05 # the cost/profit are below the 10p/kWh electricity price of supply_grid_power

    Second, I reduced the number and complexity of locations:

        X1:
            techs:
                chp:
                supply_grid_power:
                supply_gas:
                demand_electricity:
                    constraints.resource: file=demand_power.csv
            available_area: 500
            coordinates: {x: 2, y: 7}
    
        X2:
            techs:
                supply_grid_power:
                demand_electricity:
                    constraints.resource: file=demand_power.csv
            coordinates: {x: 8, y: 7}
    
        N1:
            coordinates: {x: 5, y: 7}
    links:
        X1,X2:
            techs:
                power_lines:

    This model does not produce meaningfull results. When I say meaningful, I mean that the energy produced match the demand and that I can identify the source/end of each flow in the results_carrier_con and results_carrier_prod outputs.
    In this model, the power lines flows are equal to the energy_cap_max of the transmissions. The only explanation I find is that the same unit of electricity is continually being sold. Is it possible that in one period the same unit of electricity is traded as many times as posible between the two nodes until reaching the energy_cap_max of the power line? If yes, would not be an option to set an om_con in the power lines to solve the effect of this redundancy?

    Francesco Lombardi
    @FLomb
    Ok, thanks for sharing some more details. First of all, even though this is not related to your main problem, I think you don't need anymore a supply_gas and
    ..and a node N1 if the heat pipes and the heat demand are removes
    removed*
    but maybe you were only sharing part of the techs? anyway, it seems plausible to me that what is happening is that the model is installing extra capacity to overproduce as much as possible and earn (i.e. mimimise total costs) from it. Hence you see flows across transmission lines that equal max transmission capacity in every time step because that is precisely what is happening: always overproducing as much as possible (i.e. as much as transmission cap allows).
    Francesco Lombardi
    @FLomb
    so clearly my suggestion of setting a negative om_prod for transmission techs has not been very smart. And though it might maybe work better in a case in which supply capacity is more constrained, still I am realising that the model would try to move energy from one node to the other even before self-consuming (i.e. one node satisfies the demand of the other, instead of its own, to earn money), which is not what you wanted, I guess
    to summarise, I think you would like to have trading with revenue only "after" self consumption, right? something like the "export" feature of PV in the example urban model, but between nodes instead of generic?
    jvValdes
    @jvValdes
    Hi, yes, sorry. You are right, I did not used the N1. But I think I need to maintain supply_gas in X1 for running the chp.
    jvValdes
    @jvValdes
    You are right, the model will always overproduce a small quantity of energy and trade it between nodes as many times as possible until the maximum capacity is reached. Please note that as the system tries to minimize costs, the quantity of energy overproduced is small compared to the quantity of energy traded. The only penalisation both nodes have is the energy_eff of the transmission lines set to 0.98.
    jvValdes
    @jvValdes
    I would like to have a trade between nodes with revenues, that means that some nodes will compute a cost and other nodes a gain. The export feature is similar, but I am not sure if it would be a solution. With such kind of feature I would not be able to identfy the source of the flows and the required transmission capacities between nodes. Which is one of the features that makes Calliope so attractive. Moreover, it may be necessary to define an extra import feature?
    hardcorejesus
    @hardcorejesus
    Hello everyone, student here writing my master's thesis. I am interested in demand response management using Calliope. Is it possible since demand is used as a fixed input?
    Rodrigo Amaro e Silva
    @ramaroesilva
    @brynpickering, about a past error message reported by Nicolò Stevanato (@Stevogallo) regarding a one_way transmission technology
    in his case "Index '('MTKR::hvdc_220_new:NBOR::power', Timestamp('2035-06-01 00:00:00'))' is not valid for indexed component 'carrier_prod'"
    @luzgui and I tried out this one_way solution ourselves just recently, and in our case we got that error whenever we defined an om_prod or an om_con for the transmission tech
    our interpretation is that the "one_way" makes the con and prod inexistent for the "blocked" direction and thus calliope cannot apply the costs (which are assumed for both directions)
    Bryn Pickering
    @brynpickering
    thanks for the update @ramaroesilva, looks like a bug to create an issue from! I've done so here: calliope-project/calliope#316
    Rodrigo Amaro e Silva
    @ramaroesilva
    Hi everyone. This review work might be of interest for the calliope community:
    https://www.sciencedirect.com/science/article/pii/S1364032120302082
    Rodrigo Amaro e Silva
    @ramaroesilva
    Question for the day: is there any configuration on Calliope where we can define that once a generator is turned on, it can only be turned off after N timesteps of operation?
    Francesco Lombardi
    @FLomb
    hey Rodrigo, I think this is a feature that has been requested a couple of times already, and which is currently - unless I've overlooked some of the recent changes - not available
    or perhaps not precisely, because what was asked before was a general constraint that may allow setting a number of "operating hours" for a given plant over the year, not a "minimum number of operating hours after switch on"
    what you ask is something one could add to the MILP formulation, because clearly it requires having an integer description of generators to be able to figure out which one is on and which one is off
    Rodrigo Amaro e Silva
    @ramaroesilva
    Thanks for the feedback Francesco ;)
    Rodrigo Amaro e Silva
    @ramaroesilva

    Hi everyone.

    Tried to create today a new calliope 0.6.5 environment and when everything was installed, running my code gave the following error:

    "ImportError: pyutilib.enum has been removed.

    Python 3 now has an enum implementation in the standard library (also available for older Python versions as the third-party enum34 PyPI package) that supersedes this library."

    Rodrigo Amaro e Silva
    @ramaroesilva
    With the help of @luzgui, we found out that this happens for version 6.0.0 of pyutilib.
    So I created my calliope environment specifically with pyutilib=5.8.0
    Bryn Pickering
    @brynpickering
    Yeah, seems this is a dependency issue that has been flagged here calliope-project/calliope#318
    We'll probably push a fixed minor release soon, to deal with this. For now, as you say @ramaroesilva, you can install a working environment with: conda create -n calliope -c conda-forge calliope=0.6.5 pyutilib=5.8.0
    Rodrigo Amaro e Silva
    @ramaroesilva
    Thanks Bryn! Btw, I promise I'll start looking first at Calliope's issues to avoid redudant posts here O:)
    Bryn Pickering
    @brynpickering
    haha, it wasn't my aim to guilt trip you into doing so ;)
    It seems that some change in dependencies has led to everyone having this installation problem at the same time
    Rodrigo Amaro e Silva
    @ramaroesilva
    Hi calliope community! Two comments:
    1) in https://calliope.readthedocs.io/en/stable/user/config_defaults.html, "resource_area_per_energy_cap" is described as a boolean although, when defined, it is a float
    2) in the clustering advanced feature support text, it would nice to include "The final time series is then re-scaled to match the mean of the original time series."
    Source: "Dealing with multiple decades of hourly wind and PV time series inenergy models: A comparison of methods to reduce time resolution andthe planning implications of inter-annual variability" from @sjpfenninger
    nakaret-b
    @nakaret-b
    Hello All, I am a graduate student and I have just started to learn Calliope. I have read tutorials in Calliope website but still get confused. I have 3 basic questions 1): how can I open and modify the model? at the moment what I do is go to Calliope folder/example_models/national_scale/ and open by text editor. 2): in the tutorials, there are links to jupyter notebook, the code in this notebook is used to run the model only, am I correct? 3): Do I need to know about coding in Python? I would be great if there is tutorial video in the Youtube for the beginner like me. Thank for advanced.
    Rodrigo Amaro e Silva
    @ramaroesilva

    hi @nakaret-b. my personal take on your questions:

    1) to edit the models you will have to customize the .yaml files (which can be done in any text processor, although I would suggest tools such as Spyder or Atom).

    2) you can edit and run the models in Jupyter Notebook, edit+run in a Python IDE (e.g. Spyder) or edit in a text editor (e.g. Atom) + run in the terminal

    3) I would suggest understanding some basic Python (there are tons of videos/tutorials on the internet) and getting a good grasp on the .yaml sintax (as these are the files that define your model) by trying to understand the examples from the tutorials and documentation

    Cameron Wade
    @_clameron_gitlab
    Hi @sjpfenninger @brynpickering , I'm wondering if there's any plan -- near or long term -- to expanding Calliope to have multiple investment periods? Thanks!
    nakaret-b
    @nakaret-b
    Thank you @ramaroesilva , your answers are very helpful for me. I downloaded a national scale example model- Jupyter notebook(tutorial1 ), then, I run the model on Mac OS, everything is fine and I found that the Calliope model of this example (YAML files) is stored in opt/anaconda3/envs/calliope/lib/python3.8/site-packages/calliope/example_models. There are 2 folders here national_scale and urban_scale. My question is: Can I copy these folders to desktop and run via Jupyter notebook? because I want to edit the YAML files with Spyder but the path to these folders is hidden on Mac so Spyder did not see them. Now I copied them to desktop and can edit via Spyder but I don't know how to code in Notebook to get the model on desktop. I think I need to modify this code "model = calliope.examples.national_scale()" in Jupyter notebook. Please advise.
    Rodrigo Amaro e Silva
    @ramaroesilva
    @_clameron_gitlab, what do you mean?
    @nakaret-b, just as you said, you should first copy the folder to some familiar directory. it should contain the following:
    image.png
    Rodrigo Amaro e Silva
    @ramaroesilva
    for running your custom/personal models, take a look at https://calliope.readthedocs.io/en/stable/user/running.html
    Bryn Pickering
    @brynpickering

    @nakaret-b, @ramaroesilva is right, you just need to have the model in a known directory, then you can load it using calliope.Model(...), as mentioned in https://calliope.readthedocs.io/en/stable/user/running.html. The content of the example model YAML files can also be found in the documentation. You can get away with not knowing Python, by just editing the relevant YAML files and running the model via the command line.

    @_clameron_gitlab, I assume you mean an optimisation that allows technology investment to take place at points in time that aren't the first timestep? E.g. optimising over several years and allowing new investment at the start of each year. We have that on the timeline for development this year. If you have thoughts on what you'd like to see in that feature, or ideas on how it could be well implemented, you can join the discussion on the GitHub issue (calliope-project/calliope#125) :)

    Cameron Wade
    @_clameron_gitlab
    @brynpickering (and @ramaroesilva ) yep, that's exactly what i meant. And thanks for pointing me to the discussion, I'll be happy to join in! I see Tom Brown and the PyPSA developers are also heading in that direction.
    Bryn Pickering
    @brynpickering
    Yep, based on the discussion I read on the openmod mailing list, I expect the result will look similar. The difference will probably be around the chosen simplifications in pypsa/calliope to ensure model tractability