2050 dip

87 views
Skip to first unread message

Mia McLachlan

unread,
Dec 1, 2021, 3:43:47 AM12/1/21
to MUSE
Hi all, we have now processes the data for all 4 scenarios but we have noticed a strange pattern around 2050. For all scenarios, total capacity significantly dips at 2050. At first we thought this was an issue because we were only running scenarios until 2050 but we have rerun the scenarios until 2065 and we still see this dip. Have you ever seen something like this before? We are not sure whether it's an issue in the modelling or whether this is just the expected behaviour - if so we are not sure why?

Best wishes,
Avi & Mia 
Scenario 4.png
Scenario 2.png
Scenario 3.png
Scenario 1.png

sara giarola

unread,
Dec 1, 2021, 8:02:52 AM12/1/21
to MUSE
Just to conclude, you may need to do a
"git stash" followed by "git pull origin development" to update your local copy of the model.

Mia McLachlan

unread,
Dec 1, 2021, 9:56:16 AM12/1/21
to MUSE
Hi Sara, where/how exactly do we do that?

Thanks, 
Avi & Mia

sara giarola

unread,
Dec 1, 2021, 10:01:14 AM12/1/21
to Mia McLachlan, MUSE
Anaconda command line, as you normally have done for the installation of the model

--
You received this message because you are subscribed to a topic in the Google Groups "MUSE" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/muse-model/B4F4t01ry3o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to muse-model+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/muse-model/69f86cdb-5754-4b40-ba5a-c983718b676bn%40googlegroups.com.

Alexander Kell

unread,
Dec 1, 2021, 10:01:41 AM12/1/21
to MUSE
Hi both,

We have updated MUSE with some recent changes. 

Updating your version of MUSE depends on how you installed it. If you followed the "Users" process, then you need to run:
> python -m pip install git+https://github.com/SGIModel/MUSE_ICL.git#egg=muse --upgrade

Otherwise if you followed the "Developers" process then you should navigate to the place you installed the MUSE source code in anaconda prompt (I think you're using this to run the case studies.) and then follow Sara's instructions above. 

Any questions don't hesitate to get back to us!

Best wishes,
Alex

Mia McLachlan

unread,
Dec 1, 2021, 12:16:35 PM12/1/21
to MUSE
I installed muse directly into C:\Users\mrmia (following the developers process) but when I run "git stash" it says it is not recognised:
(muse) C:\Users\mrmia>git stash
fatal: not a git repository (or any of the parent directories): .git


When I run it within the muse file:
(muse) C:\Users\mrmia>cd\Users\mrmia\muse

(muse) C:\Users\mrmia\muse>git stash
warning: LF will be replaced by CRLF in src/muse/data/example/default/settings.toml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/muse/data/example/default/technodata/gas/CommIn.csv.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/muse/data/example/default/technodata/gas/CommOut.csv.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/muse/data/example/default/technodata/gas/ExistingCapacity.csv.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/muse/data/example/default/technodata/power/CommIn.csv.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/muse/data/example/default/technodata/power/CommOut.csv.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/muse/data/example/default/technodata/power/ExistingCapacity.csv.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/muse/data/example/default/technodata/preset/Residential2020Consumption.csv.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/muse/data/example/default/technodata/residential/CommIn.csv.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/muse/data/example/default/technodata/residential/CommOut.csv.
The file will have its original line endings in your working directory
Saved working directory and index state WIP on development: a74a8f9f Merge pull request #892 from SGIModel/legacy

(muse) C:\Users\mrmia\muse>git pull origin development
remote: Repository not found.
fatal: repository 'https://github.com/SGIModel/StarMuse.git/' not found

The second command does not run. 

Best wishes, 
Mia 

sara giarola

unread,
Dec 1, 2021, 12:43:55 PM12/1/21
to Mia McLachlan, MUSE

First you are pointing to the wrong repo: you have access to SGIModel/MUSE_ICL not StarMuse.
Also, before running the commands you need to be on the folder which is setup to track the remote MUSE_ICL. Also, If you are not in an environment where git is installed, it will not be recognised as a command.

If you are encountering all these problems for updating the local, it may be a good idea to proceed with a full installation. This is explained very well in the user guide.

--
You received this message because you are subscribed to a topic in the Google Groups "MUSE" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/muse-model/B4F4t01ry3o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to muse-model+...@googlegroups.com.

Mia McLachlan

unread,
Dec 1, 2021, 1:19:07 PM12/1/21
to MUSE
Okay thank you, I have reinstalled muse and rerun scenario 1 which gets to 2045 but I am now receiving the following error:

Traceback (most recent call last):
  File "C:\Users\mrmia\anaconda3\envs\muse\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\mrmia\anaconda3\envs\muse\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "c:\users\mrmia\muse1\src\muse\__main__.py", line 54, in <module>
    muse_main()
  File "C:\Users\mrmia\anaconda3\envs\muse\lib\site-packages\click\core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\mrmia\anaconda3\envs\muse\lib\site-packages\click\core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "C:\Users\mrmia\anaconda3\envs\muse\lib\site-packages\click\core.py", line 1404, in invoke    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\mrmia\anaconda3\envs\muse\lib\site-packages\click\core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "c:\users\mrmia\muse1\src\muse\__main__.py", line 51, in muse_main
    MCA.factory(settings).run()
  File "c:\users\mrmia\muse1\src\muse\mca.py", line 336, in run
    _, new_market, self.sectors = self.find_equilibrium(new_market)
  File "c:\users\mrmia\muse1\src\muse\mca.py", line 208, in find_equilibrium
    equilibrium=self.equilibrium,
  File "c:\users\mrmia\muse1\src\muse\mca.py", line 543, in find_equilibrium
    market, equilibrium_sectors = single_year_iteration(market, sectors)
  File "c:\users\mrmia\muse1\src\muse\mca.py", line 453, in single_year_iteration
    market[["supply", "consumption", "prices"]]  # type:ignore
  File "c:\users\mrmia\muse1\src\muse\sectors\sector.py", line 233, in next
    technologies, market, time_period=time_period, current_year=current_year
  File "c:\users\mrmia\muse1\src\muse\sectors\subsector.py", line 73, in invest
    technologies, market, time_period, current_year=current_year
  File "c:\users\mrmia\muse1\src\muse\sectors\subsector.py", line 142, in aggregate_lp
    technologies, agent_market, share, time_period=time_period
  File "c:\users\mrmia\muse1\src\muse\agents\agent.py", line 422, in next
    year=current_year,
  File "c:\users\mrmia\muse1\src\muse\investments.py", line 155, in compute_investment
    **kwargs,
  File "c:\users\mrmia\muse1\src\muse\registration.py", line 172, in decorated
    result = inner_decorated(*args, **kwargs)
  File "c:\users\mrmia\muse1\src\muse\investments.py", line 90, in decorated
    result = function(costs, search_space, technologies, constraints, **kwargs)
  File "c:\users\mrmia\muse1\src\muse\investments.py", line 266, in adhoc_match_demand
    demand.sel(asset=demand.asset.isin(search_space.asset)), decision, max_prod
  File "c:\users\mrmia\muse1\src\muse\demand_matching.py", line 250, in demand_matching
    ds.demand, ds.cost, *(ds[f"constraint{i}"] for i in range(len(constraints)))
  File "c:\users\mrmia\muse1\src\muse\demand_matching.py", line 255, in demand_matching
    return _demand_matching_impl(demand, cost, *constraints)
  File "c:\users\mrmia\muse1\src\muse\demand_matching.py", line 297, in _demand_matching_impl
    for _, same_cost in data.groupby("cost") if cost.dims else [(cost, data)]:
  File "C:\Users\mrmia\anaconda3\envs\muse\lib\site-packages\xarray\core\common.py", line 697, in groupby
    self, group, squeeze=squeeze, restore_coord_dims=restore_coord_dims
  File "C:\Users\mrmia\anaconda3\envs\muse\lib\site-packages\xarray\core\groupby.py", line 389, in __init__
    "Failed to group data. Are you grouping by a variable that is all NaN?"
ValueError: Failed to group data. Are you grouping by a variable that is all NaN?

sara giarola

unread,
Dec 1, 2021, 1:20:58 PM12/1/21
to Mia McLachlan, MUSE
This is very likely dependent on your input data, I am afraid.

Mia McLachlan

unread,
Dec 1, 2021, 4:32:47 PM12/1/21
to MUSE
Problem solved by editing the existing capacity to make it non-zero for future years!
Thank you, that is all working now and the trend looks much more reasonable 

Reply all
Reply to author
Forward
0 new messages