Skip to content

Commit

Permalink
specifying the number of timestamps in the static inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
tareknrel committed Sep 12, 2022
1 parent ca39349 commit 62c3121
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions LocalFeeder/component_definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
{"type": "", "port_id": "feeder_file"},
{"type": "", "port_id": "start_date"},
{"type": "", "port_id": "run_freq_sec"},
{"type": "", "port_id": "number_of_timesteps"},
{"type": "", "port_id": "start_time_index"}
],
"dynamic_inputs": [],
Expand Down
2 changes: 1 addition & 1 deletion LocalFeeder/sender_cosim.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def get_phase(name):
current_hour = 0
current_second = 0
current_index = config.start_time_index
for request_time in range(0, 30):
for request_time in range(0, int(config.number_of_timesteps)):
while granted_time < request_time:
granted_time = h.helicsFederateRequestTime(vfed, request_time)

Expand Down
1 change: 1 addition & 0 deletions test_system.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"feeder_file": "gadal-ieee123/qsts/master.dss",
"start_date": "2017-01-01 00:00:00",
"run_freq_sec": 900,
"number_of_timesteps": 36,
"start_time_index": 0
}
},
Expand Down

0 comments on commit 62c3121

Please sign in to comment.