Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implicit assumption: time steps are numeric and consecutive #53

Open
3 tasks
ojdo opened this issue Mar 4, 2016 · 2 comments
Open
3 tasks

Implicit assumption: time steps are numeric and consecutive #53

ojdo opened this issue Mar 4, 2016 · 2 comments
Assignees

Comments

@ojdo
Copy link
Contributor

ojdo commented Mar 4, 2016

The storage state equation def_storage_state (and an upcoming PR #52 for demand side management) assume(s) that time step labels are numeric and allow for arithmetic operations like:

def def_storage_state_rule(m, t, sit, sto, com):
    return (m.e_sto_con[t, sit, sto, com] ==
            m.e_sto_con[t-1, sit, sto, com]

However, nothing in the input prevents time steps to have textual or (in future preferably) datetime type. The code should be changed to remove that assumption.

  • Find out how to idiomatically rewrite the code
  • Roll out change
  • Document it (could be the stem for a future contributor's guide doc/contributing.rst)
@ojdo ojdo added the bug label Mar 4, 2016
@sonercandas
Copy link
Contributor

A new numeric, "timestep indexer" pyomo.Set can be introduced such as:
m.timestepsnum = range(1,len(timesteps))
m.tnum= pyomo.Set(initialize=m.timestepsnum,ordered=True)

and then the required storage/DSM rules and corresponding pyomo variables such as m.e_sto_con can be defined over m.tnum rather than m.tm, regardless of the input timesteps are numeric or not?

@ojdo
Copy link
Contributor Author

ojdo commented Aug 18, 2016

This first needs a minimal prototype that examines which "ripple" effects a change of t = [1, 2, 3, ...] to t = [2001-01-01 00:00, 2001-01-01 01:00, ...] would have on the different model steps:

  • data I/O (guess: positive)
  • model generation (between 'no effect' to 'one more abstraction layer necessary' everything seems possible. Time step weights w and m.dt must be derived and could possibly change per time step. Or not, then this should trigger warnings/errors.)
  • plotting (guess: automagic labelling of x-axis ticks)
  • reporting (guess: should just work)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants