This page describes the rate limit for different types of models.
The units for the Tyba rate limit is a single design-year. For example, a single-year PV run would be one unit, whereas a 10-year run would be 10 units.
Subject to change
For PV-Only runs
For PV+Storage or Standalone Storage runs
The purpose of the rate limit is to protect against Tyba's servers being overwhelmed, such that they degrade service for other users. We monitor performance closely and seek to deliver as fast and reliable computing as we can. These rate limits will never be used to limit reasonable requests, only to protect against runaway or excessive requests.
Please reach out to us if you would like assistance handling and building your systems around Tyba's rate limit.
def is_ratelimited(response):
return response.status_code==429
def is_unprocessable(response):
return response.status_code==422
def portfolio_schedule(models,save_name):
ids = {}
for project, model in models.items():
print(f"{project} scheduling")
tries = 8
backoff = 2
init = 2
while tries > 0:
res = client.schedule_pv_storage(model)
if is_unprocessable(res):
print("ERROR: could not schedule")
print(res.text)
raise Exception(f"could not process {project}")
if is_ratelimited(res):
print("Call ratelimited...retrying")
time.sleep(init)
init *= backoff
tries -= 1
else:
print(res.text) #this will show the id for that run
run_id = res.json()["id"]
ids[project] = run_id
break
else:
print(f"{project} exceeded tries and has failed.")
return ids