Hands On Exercise 3 - Issue Running Custom Simulation

20 views
Skip to first unread message

Harsha Anand

unread,
Jul 23, 2025, 4:27:53 AMJul 23
to MUSE
Hi all,

I'm trying to do the hands on exercise 3 where we edit the csv files and settings.toml to run a custom simulation that includes solarPV. I believe I have followed all the instructions properly but when i run the script I get the following error:

ValueError: Invalid input for linprog: b_ub must not contain values inf, nan, or None

I looked at the other questions here and found someone had something similar but for c rather than b_ub. For them it was suggested they change lpsolver to "adhoc" and then go to the Agent.csv file and update Objsort1 column to TRUE (which it was already so no change made).

However, after running it after making these updates I still get the same error message. Does anyone know how I can resolve this? Happy to share my files if that would be helpful.

Thanks for your help!

Best,
Harsha

Tom Bland

unread,
Jul 23, 2025, 7:35:56 AMJul 23
to MUSE
Hi Harsha,

Thanks for getting in touch, and sorry for the trouble.

I've had a look at this and, while I was unable to reproduce your error while following the exercise, I did get a different error. To get everything working, make sure you're doing the following:
- use Python version 3.12
- use MUSE v1.2.1 (as instructed in exercise 1)
- DOWNGRADE XARRAY. This is crucial as there appears to be a bug in later versions of xarray that breaks things in MUSE. You want version 2024.11 (pip install xarray==2024.11). Unfortunately I only became aware of this after the course was published, so I couldn't add a note about this, but this will be fixed in the next version.

If you're still having problems, you can see the example files here which were used to generate the figures in the exercise. Hopefully your input files should look like this after following the instructions in the exercise.

Don't change the solver to "adhoc". This is a completely different model so it shouldn't be used as a quick fix without good reason.

Let me know how you get on.

Best,
Tom
Reply all
Reply to author
Forward
0 new messages