Client API

tyba_client.client

class Ancillary(prices)

_

get_pricing_regions(*, iso, service, market)

_

get_prices(*, iso, service, market, region, start_year, end_year)

_

class LMP(prices)

_

get_all_nodes(*, iso)

_

get_prices(*, node_ids, market, start_year, end_year)

_

class Services(client)

_

get_all_isos()

_

class Client(personal_access_token, host='https://dev.tybaenergy.com', request_args=None)

Tyba valuation client class

schedule(model: StandaloneStorageModel | PVStorageModel | PVGenerationModel | DCExternalGenerationModel | ACExternalGenerationModel)

_

get_status(run_id: str)

_

get_status_v1(run_id: str)

_

wait_on_result(run_id: str, wait_time: int = 5, log_progress: bool = False)

_

wait_on_result_v1(run_id: str, wait_time: int = 5, log_progress: bool = False)

_

exception UnknownRunId

tyba_client.io

pv_module_from_pan(pan_file: str, bifacial_ground_clearance_height=1.0, bifacial_transmission_factor: float = 0.013) PVModuleMermoudLejeune

_

inverter_from_ond(ond_file: str, includes_xfmr: bool = True) ONDInverter

_

solar_resource_from_psm_csv(filename: str, typical: bool = True, monthly_albedo: List[float] | None = None) SolarResource

_

tyba_client.forecast

project_finance

class BaseFinanceInputs

_

field frequency: str [Required]
get_cash_flow() ndarray
class SolarInputs

_

field array_capacity_wdc: float [Required]
field capex_cost_per_wdc: float = 0.8
field opex_cost_per_wdc: float = 0.01
property capex
class SolarFinanceInputs

_

field revenue: ndarray [Required]
property opex
class StorageInputs

_

field capacity_kwh: float [Required]
field capex_cost_per_kwh: float = 200.0
field opex_cost_per_kwh: float = 7.0
property capex
class StorageFinanceInputs

_

field revenue: ndarray [Required]
property opex
class HybridFinanceInputsSingleRev

_

field revenue: ndarray [Required]
field solar: SolarInputs [Required]
field storage: StorageInputs [Required]
property capex
property opex
class HybridFinanceInputs

_

field solar: SolarFinanceInputs [Required]
field storage: StorageFinanceInputs [Required]
property capex
property opex
property revenue
property frequency
get_cash_flow() ndarray
npv(inputs: BaseFinanceInputs | HybridFinanceInputs, annual_discount_rate: float) float

Net Present Value

Parameters:
  • inputs – BaseFinanceInputs

  • annual_discount_rate – in decimal

Returns:

net present value in $

class HybridDetailResults

_

field solar: float [Required]
field storage: float [Required]
field project: float [Required]
hybrid_detailed_npv(inputs: HybridFinanceInputs, annual_discount_rate: float) HybridDetailResults

Net Present Value

Parameters:
  • inputs – HybridDetailFinanceInputs

  • annual_discount_rate – in decimal

Returns:

HybridDetailResults object containing net present values in $

irr(inputs: BaseFinanceInputs | HybridFinanceInputs, guess: float = 0.1, tol: float = 1e-12, maxiter: int = 100) float

Internal Rate of Return

Parameters:
  • inputs – BaseFinanceInputs

  • guess – initial guess of the IRR for the iterative solver

  • tol – required tolerance to accept solution

  • maxiter – maximum iterations to perform in finding a solution

Returns:

average rate of return for given revenue, capex and opex in decimal form

hybrid_detailed_irr(inputs: HybridFinanceInputs, guess: float = 0.1, tol: float = 1e-12, maxiter: int = 100) HybridDetailResults

Internal Rate of Return

Parameters:
  • inputs – HybridDetailFinanceInputs object that contains solar and storage attributes, each with their own revenue: series of revenue generated for each period in $ and an associated frequency capex: total project capital expenditures, in $ annual_opex: annual operating expenses, assumed constant for all years, in $

  • guess – initial guess of the IRR for the iterative solver

  • tol – required tolerance to accept solution

  • maxiter – maximum iterations to perform in finding a solution

Returns:

HybridDetailResults object containing average rates of return