×
Menu
Index

6.1.17 TariffsEngine

Support for tariffs engine.
 
Basic usage:
 
  import iesve
 
  strProjectFolder = 'C:\\MyProject'
  strAPSFile = 'C:\\MyProject\\vista\\a_tariff analysis.aps'
  strAPSComparisonFiles = 'C:\\MyProject\\vista\\prb.aps'
  strInfoMessage = iesve.TariffsEngine.String()
  strError = iesve.TariffsEngine.String()
  eUnitsSystem = iesve.TariffsEngine.EUnitsSystem.UNITS_SYSTEM_METRIC (default)
                iesve.TariffsEngine.EUnitsSystem.UNITS_SYSTEM_IP
  eMode = iesve.TariffsEngine.EModes.MODE_NORMAL (default)
                    iesve.TariffsEngine.EModes.MODE_UPDATE_XML_FILE_TARIFFS_NODE
                    iesve.TariffsEngine.EModes.MODE_CHECK_UTILITIES_VARIABLES
  eComputeCosts  -  iesve.TariffsEngine.EComputeCosts.COMPUTE_COSTS_NO
                                      iesve.TariffsEngine.EComputeCosts.COMPUTE_COSTS_YES
 
  te = iesve.TariffsEngine(strProjectFolder, strAPSFile, strAPSComparisonFiles, strInfoMessage, strError,  eUnitsSystem, eMode, eComputeCosts)
 
  if (strError.Empty() == False) :
    print(strError.GetString())
  else:
    print("Init ok")
 
    if (strInfoMessage.Empty() == False) :
      print(strInfoMessage.GetString())