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

IndexError self.tracked_price[0] = self.reward_price[0] #6

Open
corymosiman12 opened this issue Nov 9, 2020 · 0 comments
Open

IndexError self.tracked_price[0] = self.reward_price[0] #6

corymosiman12 opened this issue Nov 9, 2020 · 0 comments

Comments

@corymosiman12
Copy link
Owner

So trying to just get my head back into this. The contents of my config.toml are below. I'm trying to run (what I understand to be):

  • NOT trying to run any RL stuff
  • Just trying to run the original RBO MPC stuff. So I change the run_rbo_mpc param to true and set the others to false

I changed n_nodes=1 as or else it wasn't giving me any useful tracebacks. Anyways:

  1. Updated requirements
  2. Started the redis server: $ redis-server, runs successfully
  3. Try to run: python main.py and get following:

@apigott Thoughts?

cmosiman$ python main.py -u
/Users/cmosiman/.pyenv/versions/dragg/lib/python3.6/site-packages/pandas/compat/__init__.py:120: UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError.
  warnings.warn(msg)
INFO:aggregator:Set the version write out to ['dn-wd-v4', 'dn-wd-v4-avg']
INFO:aggregator:Start: 2015-01-01T00:00:00; End: 2015-01-02T00:00:00; Number of hours: 24
INFO:aggregator:Made it to Aggregator Run
INFO:aggregator:Flushing Redis
INFO:aggregator:Homes looking ok!
INFO:aggregator:Performing baseline run for horizon: 6
multiprocess.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "/Users/cmosiman/.pyenv/versions/dragg/lib/python3.6/site-packages/multiprocess/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/Users/cmosiman/.pyenv/versions/dragg/lib/python3.6/site-packages/multiprocess/pool.py", line 44, in mapstar
    return list(map(*args))
  File "/Users/cmosiman/.pyenv/versions/dragg/lib/python3.6/site-packages/pathos/helpers/mp_helper.py", line 15, in <lambda>
    func = lambda args: f(*args)
  File "/Users/cmosiman/Github/dragg/dragg/mpc_calc.py", line 28, in manage_home
    home.run_home()
  File "/Users/cmosiman/Github/dragg/dragg/mpc_calc.py", line 716, in run_home
    self.solve_type_problem()
  File "/Users/cmosiman/Github/dragg/dragg/mpc_calc.py", line 692, in solve_type_problem
    self.set_environmental_variables()
  File "/Users/cmosiman/Github/dragg/dragg/mpc_calc.py", line 270, in set_environmental_variables
    self.cast_redis_curr_rps()
  File "/Users/cmosiman/Github/dragg/dragg/mpc_calc.py", line 684, in cast_redis_curr_rps
    self.tracked_price[0] = self.reward_price[0]
IndexError: list index out of range
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "main.py", line 7, in <module>
    a.run()
  File "/Users/cmosiman/Github/dragg/dragg/aggregator.py", line 1174, in run
    self.run_baseline()
  File "/Users/cmosiman/Github/dragg/dragg/aggregator.py", line 875, in run_baseline
    self.run_iteration()
  File "/Users/cmosiman/Github/dragg/dragg/aggregator.py", line 819, in run_iteration
    results = pool.map(manage_home, self.as_list)
  File "/Users/cmosiman/.pyenv/versions/dragg/lib/python3.6/site-packages/pathos/multiprocessing.py", line 137, in map
    return _pool.map(star(f), zip(*args)) # chunksize
  File "/Users/cmosiman/.pyenv/versions/dragg/lib/python3.6/site-packages/multiprocess/pool.py", line 266, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/Users/cmosiman/.pyenv/versions/dragg/lib/python3.6/site-packages/multiprocess/pool.py", line 644, in get
    raise self._value
IndexError: list index out of range
[community]
total_number_homes = [ 10, 0,]
homes_battery = [ 0, 0,]
homes_pv = [ 3, 0,]
homes_pv_battery = [ 0, 0,]
overwrite_existing = true
house_p_avg = 1.0

[simulation]
start_datetime = "2015-01-01 00"
end_datetime = "2015-01-02 00"
loop_days = true
random_seed = 12
n_nodes = 1
load_zone = "LZ_HOUSTON"
check_type = "all"
run_rbo_mpc = true
run_rl_agg = false
run_rl_simplified = false
checkpoint_interval = "daily"

[rl]
version = [ "dn-wd-v4", "dn-wd-v4-avg"]

[rl.parameters]
learning_rate = [ 0.01,]
discount_factor = [ 1.0,]
batch_size = [ 4, 32,]
exploration_rate = [ 0.01,]
twin_q = false

[rl.utility]
rl_agg_action_horizon = [ 6, 4,]
rl_agg_forecast_horizon = 1
base_price = 0.1
action_space = [ -1.0, 1.0,]
hourly_steps = [ 1,]
minutes_per_step = 120
tou_enabled = false

[rl.simplified]
response_rate = 0.3
offset = 0.2

[home.hvac]
r_dist = [ 6.8, 9.199999999999999,]
c_dist = [ 4.25, 5.75,]
p_cool_dist = [ 3.5, 3.5,]
p_heat_dist = [ 3.5, 3.5,]
temp_sp_dist = [ 18, 22,]
temp_deadband_dist = [ 2, 3,]

[home.wh]
r_dist = [ 18.7, 25.3,]
c_dist = [ 4.25, 5.75,]
p_dist = [ 2.5, 2.5,]
sp_dist = [ 45.5, 48.5,]
deadband_dist = [ 9, 12,]
size_dist = [ 200, 300,]

[home.battery]
max_rate = 5
capacity = 13.5
cap_bounds = [ 0.15, 0.85,]
charge_eff = 0.95
discharge_eff = 0.99
cons_penalty = 0.005

[home.pv]
area = 32
efficiency = 0.2

[home.hems]
prediction_horizon = [ 6,]
price_uncertainty = 0.3
sub_subhourly_steps = [ 4,]
solver = "GLPK_MI"

[rl.utility.tou]
shoulder_times = [ 9, 21,]
shoulder_price = 0.09
peak_times = [ 14, 18,]
peak_price = 0.13

[home.wh.waterdraws]
n_big_draw_dist = [ 2, 5,]
n_small_draw_dist = [ 0, 0,]
big_draw_size_dist = [ 25, 40,]
small_draw_size_dist = [ 7.5, 15.0,]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant