Replies: 2 comments
|
You're right about 1. I'm not sure about 2 - will need to look into the detail of the code. About 3, a lot of MUSE (the whole of it?) was designed in such a way that users will want and be able to expand its functionality (?). This includes creating new types of agents doing stuff differently and accepting different inputs. As far as I know, this has never happened, but the functionality is still there. I would not remove the |
0 replies
|
Okey doke. I'll do that |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I've been looking at the
Agentclass for reasons and noticed that it takeskwargsas an input to__init__(), but only uses this to check if it has a"spend_limit"element:This
if-statement is broken.kwargswill never beNone; if the user doesn't pass any extra arguments it'll be an empty dict instead. It's also not obvious what the intent with it was, because surely you always want to have a default value forspend_limitregardless?...which brings me onto my second concern.
spend_limitappears to be being used without checking whether or not it has this sentinel value of 0 (this should probably beNone), in which case presumably all non-free technologies will be excluded as being above the limit. I found one place where it is used (infilters.py: https://github.com/EnergySystemsModellingLab/MUSE_OS/blob/develop/src/muse/filters.py#L357). I'm guessing that either this functionality is never used or is broken? It's entirely possible that I've misunderstood the code though....I figured we could probably drop the
kwargsand just addspend_limitas an input argument. The problem is that if we do that, then we get a bunch of test failures for tests which seemingly rely on this behaviour of accepting arbitrary keyword args (in particular they seem to often pass atechnologiesargument; there may be others)... but why?! Optimistically we could just remove these unnecessary arguments and it'll just work.Thougts @dalonsoa @tsmbland ?
All reactions