psr-factory 4.1.0b2__py3-none-win_amd64.whl → 4.1.0b4__py3-none-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
psr/cloud/cloud.py CHANGED
@@ -328,7 +328,7 @@ class Client:
328
328
  _hide_password(xml_content)
329
329
  raise CloudInputError(
330
330
  f"Invalid XML content.\n"
331
- f"Contact PSR support with following data:\n\n{xml_content}\n\nsuporte@psr-inc.com"
331
+ f"Contact PSR support at psrcloud@psr-inc.com with following data:\n\n{xml_content}\n\n"
332
332
  )
333
333
 
334
334
  def _get_clusters_by_user(self) -> list:
@@ -631,7 +631,7 @@ class Client:
631
631
  xml_str = _xml_to_str(xml)
632
632
  raise CloudError(
633
633
  f"Case id not found on returned XML response.\n"
634
- f"Contact PSR support with following data:\n\n{xml_str}\n\nsuporte@psr-inc.com"
634
+ f"Contact PSR support at psrcloud@psr-inc.com with following data:\n\n{xml_str}\n\n"
635
635
  )
636
636
 
637
637
  case_id = int(id_parameter.text)
@@ -679,7 +679,7 @@ class Client:
679
679
  xml_str = _xml_to_str(xml)
680
680
  raise CloudError(
681
681
  f"Status not found on returned XML response.\n"
682
- f"Contact PSR support with following data:\n\n{xml_str}\n\nsuporte@psr-inc.com"
682
+ f"Contact PSR support at psrcloud@psr-inc.com with following data:\n\n{xml_str}\n\n"
683
683
  )
684
684
  try:
685
685
  status = ExecutionStatus(int(parameter_status.text))
@@ -687,12 +687,35 @@ class Client:
687
687
  xml_str = _xml_to_str(xml)
688
688
  raise CloudError(
689
689
  f"Unrecognized status on returned XML response.\n"
690
- f"Contact PSR support with following data:\n\n{xml_str}\n\nsuporte@psr-inc.com"
690
+ f"Contact PSR support at psrcloud@psr-inc.com with following data:\n\n{xml_str}\n\n"
691
691
  )
692
692
 
693
693
  self._logger.info(f"Status: {STATUS_MAP_TEXT[status]}")
694
694
  return status, STATUS_MAP_TEXT[status]
695
695
 
696
+ def list_download_files(self, case_id: int) -> List[str]:
697
+ xml_files = self._make_soap_request(
698
+ "prepararListaArquivosRemotaDownload",
699
+ "listaArquivoRemota",
700
+ additional_arguments={
701
+ "cluster": self.cluster["name"],
702
+ "filtro": "(.*)",
703
+ "diretorioRemoto": str(case_id),
704
+ },
705
+ )
706
+
707
+ files = []
708
+
709
+ for file in xml_files.findall("Arquivo"):
710
+ file_info = {
711
+ "name": file.attrib.get("nome"),
712
+ "filesize": file.attrib.get("filesize"),
713
+ "filedate": file.attrib.get("filedate"),
714
+ }
715
+ files.append(file_info)
716
+
717
+ return files
718
+
696
719
  def download_results(
697
720
  self,
698
721
  case_id: int,
@@ -816,7 +839,9 @@ class Client:
816
839
  initial_date_iso = since.strftime("%Y-%m-%d %H:%M:%S")
817
840
 
818
841
  xml = self._make_soap_request(
819
- "listarFila", "dados", adition_arguments={"dataInicial": initial_date_iso}
842
+ "listarFila",
843
+ "dados",
844
+ additional_arguments={"dataInicial": initial_date_iso},
820
845
  )
821
846
 
822
847
  return self._cases_from_xml(xml)
@@ -830,7 +855,9 @@ class Client:
830
855
  def get_cases(self, case_ids: List[int]) -> List["Case"]:
831
856
  case_ids_str = ",".join(map(str, case_ids))
832
857
  xml = self._make_soap_request(
833
- "listarFila", "dados", adition_arguments={"listaRepositorio": case_ids_str}
858
+ "listarFila",
859
+ "dados",
860
+ additional_arguments={"listaRepositorio": case_ids_str},
834
861
  )
835
862
  return self._cases_from_xml(xml)
836
863
 
@@ -851,18 +878,18 @@ class Client:
851
878
  budgets.sort()
852
879
  return budgets
853
880
 
854
- def _make_soap_request(self, service: str, nome: str, **kwargs) -> ET.Element:
881
+ def _make_soap_request(self, service: str, name: str = "", **kwargs) -> ET.Element:
855
882
  portal_ws = zeep.Client(self.cluster["url"] + "?WSDL")
856
883
  section = str(id(self))
857
884
  password_md5 = _md5sum(self.username + self.__password + section).upper()
858
- addition_arguments = kwargs.get("adition_arguments", "")
885
+ additional_arguments = kwargs.get("additional_arguments", None)
859
886
  parameters = {
860
887
  "sessao_id": section,
861
888
  "tipo_autenticacao": "portal",
862
889
  "idioma": "3",
863
890
  }
864
- if addition_arguments:
865
- parameters.update(addition_arguments)
891
+ if additional_arguments:
892
+ parameters.update(additional_arguments)
866
893
 
867
894
  # FIXME make additional arguments work as a dictionary to work with this code
868
895
  xml_input = create_case_xml(parameters)
@@ -871,22 +898,26 @@ class Client:
871
898
  xml_output_str = portal_ws.service.despacharServico(
872
899
  service, self.username, password_md5, xml_input
873
900
  )
874
- except zeep.exceptions.Fault:
901
+ except zeep.exceptions.Fault as e:
902
+ # Log the full exception details
903
+ self._logger.error(f"Zeep Fault: {str(e)}")
875
904
  raise CloudError(
876
- "Failed to connect to PSR Cloud service. Contact PSR support: suporte@psr-inc.com"
905
+ "Failed to connect to PSR Cloud service. Contact PSR support: psrcloud@psr-inc.com"
877
906
  )
878
-
879
907
  # Remove control characters - this is a thing
880
908
  xml_output_str = xml_output_str.replace("", "")
881
909
 
882
910
  xml_output = ET.fromstring(xml_output_str)
883
- xml_output = next(
884
- (
885
- ET.fromstring(child.text)
886
- for child in xml_output
887
- if child.attrib.get("nome") == nome
888
- )
889
- )
911
+
912
+ if name:
913
+ for child in xml_output:
914
+ if child.attrib.get("nome") == name:
915
+ xml_output = ET.fromstring(child.text)
916
+ break
917
+ else:
918
+ raise ValueError(
919
+ f"Invalid XML response from PSR Cloud: {xml_output_str}. Please contact PSR support at psrcloud@psr-inc.com"
920
+ )
890
921
  return xml_output
891
922
 
892
923
  def _get_cloud_versions_xml(self) -> ET.Element:
psr/cloud/version.py CHANGED
@@ -2,4 +2,4 @@
2
2
  # Unauthorized copying of this file, via any medium is strictly prohibited
3
3
  # Proprietary and confidential
4
4
 
5
- __version__ = "0.3.0"
5
+ __version__ = "0.3.1"
psr/factory/__init__.py CHANGED
@@ -2,6 +2,6 @@
2
2
  # Unauthorized copying of this file, via any medium is strictly prohibited
3
3
  # Proprietary and confidential
4
4
 
5
- __version__ = "4.1.0b2"
5
+ __version__ = "4.1.0b4"
6
6
 
7
7
  from .api import *
psr/factory/api.py CHANGED
@@ -257,6 +257,23 @@ def _get_context(models_or_context: Union[str, list, dict, "Context", None],
257
257
  value.set(context)
258
258
  return value
259
259
 
260
+ def _get_arg_object(arg: Union[dict, "Value", "DataObject", None]) -> "Value":
261
+ if isinstance(arg, dict):
262
+ value = Value()
263
+ value.set(arg)
264
+ return value
265
+ elif isinstance(arg, Value):
266
+ return arg
267
+ elif isinstance(arg, DataObject):
268
+ value = Value()
269
+ value.set(arg)
270
+ return value
271
+ elif arg is None:
272
+ return Value()
273
+ else:
274
+ raise TypeError("Unexpected type for argument.")
275
+
276
+
260
277
 
261
278
  class _BaseObject:
262
279
  def __init__(self):
@@ -545,6 +562,7 @@ class ValueDict(_BaseObject):
545
562
  class Value(_BaseObject):
546
563
  def __init__(self):
547
564
  super().__init__()
565
+ _check_loaded()
548
566
  self._hdr = factorylib.lib.psrd_new_value()
549
567
 
550
568
  def __del__(self):
@@ -1270,32 +1288,33 @@ class Study(_BaseObject):
1270
1288
 
1271
1289
  @staticmethod
1272
1290
  def load(study_path: Union[str, pathlib.Path], profile_or_context: Union[str, Context, None],
1273
- options: Optional[DataObject] = None):
1291
+ options: Optional[Union[dict, "Value", "DataObject"]] = None):
1274
1292
  if not isinstance(options, (DataObject, type(None))):
1275
1293
  raise TypeError("options must be a DataObject or None.")
1294
+ _check_initialized()
1276
1295
  study_path = str(study_path)
1277
1296
  context = _get_context(profile_or_context, None)
1278
1297
  err = Error()
1279
- options_handler = options.handler() if options is not None else None
1298
+ options_value = _get_arg_object(options)
1280
1299
  study = Study()
1281
1300
  study._hdr = factorylib.lib.psrd_study_load(_c_str(study_path),
1282
1301
  _bytes(study_path),
1283
- options_handler,
1302
+ options_value.handler(),
1284
1303
  context.handler(),
1285
1304
  err.handler())
1286
1305
  if err.code != 0:
1287
1306
  raise FactoryException(err.what)
1288
1307
  return study
1289
1308
 
1290
- def save(self, output_path: Union[str, pathlib.Path], options: Optional[DataObject] = None):
1309
+ def save(self, output_path: Union[str, pathlib.Path], options: Optional[Union[dict, Value, DataObject]] = None):
1291
1310
  if not isinstance(options, (DataObject, type(None))):
1292
1311
  raise TypeError("options must be a DataObject or None.")
1293
1312
  output_path = str(output_path)
1294
1313
  _err = Error()
1295
- _options_handler = options.handler() if options is not None else None
1314
+ options_value = _get_arg_object(options)
1296
1315
  factorylib.lib.psrd_study_save(self._hdr, _c_str(output_path),
1297
1316
  _bytes(output_path),
1298
- _options_handler,
1317
+ options_value.handler(),
1299
1318
  _err.handler())
1300
1319
  if _err.code != 0:
1301
1320
  raise FactoryException(_err.what)
@@ -2091,16 +2110,16 @@ class DataFrame(_BaseObject):
2091
2110
  factorylib.lib.psrd_free_table(self._hdr)
2092
2111
 
2093
2112
  @staticmethod
2094
- def load_from_file(input_file: Union[str, pathlib.Path], options: Optional[DataObject] = None) -> "DataFrame":
2113
+ def load_from_file(input_file: Union[str, pathlib.Path], options: Optional[Union[dict, Value, DataObject]] = None) -> "DataFrame":
2095
2114
  input_file = str(input_file)
2096
2115
  _check_initialized()
2097
2116
  _err = Error()
2098
2117
  table = DataFrame()
2099
- options_handler = options.handler() if options is not None else None
2118
+ options_value = _get_arg_object(options)
2100
2119
  factorylib.lib.psrd_table_load(table.handler(),
2101
2120
  _c_str(input_file),
2102
2121
  _bytes(input_file),
2103
- options_handler,
2122
+ options_value.handler(),
2104
2123
  _err.handler())
2105
2124
  if _err.code != 0:
2106
2125
  raise FactoryException(_err.what)
@@ -2119,13 +2138,13 @@ class DataFrame(_BaseObject):
2119
2138
  return df_builder.build_from_polars(dataframe_like)
2120
2139
  raise ImportError("Pandas or polars is not available. Please install pandas to use this feature.")
2121
2140
 
2122
- def save(self, output_file: Union[str, pathlib.Path], options: Optional[DataObject] = None):
2141
+ def save(self, output_file: Union[str, pathlib.Path], options: Optional[Union[dict, Value, DataObject]] = None):
2123
2142
  output_file = str(output_file)
2124
2143
  _err = Error()
2125
- options_handler = options.handler() if options is not None else None
2144
+ options_value = _get_arg_object(options)
2126
2145
  factorylib.lib.psrd_table_save(self._hdr, _c_str(output_file),
2127
2146
  _bytes(output_file),
2128
- options_handler,
2147
+ options_value.handler(),
2129
2148
  _err.handler())
2130
2149
  if _err.code != 0:
2131
2150
  raise FactoryException(_err.what)
@@ -2174,6 +2193,10 @@ def _initialize():
2174
2193
  "INDEX_STARTS_AT_ZERO": True,
2175
2194
  "NAME": "Python",
2176
2195
  "VERSION": f"{sys.version}",
2196
+ "EXE": f"{sys.executable}",
2197
+ "LIB": f"{factorylib.get_lib_path()}",
2198
+ "BASE_PREFIX": f"{sys.base_prefix}",
2199
+ "REAL_PREFIX": f"{sys.prefix}",
2177
2200
  }
2178
2201
  for prop, value in map_prop_values.items():
2179
2202
  _value = Value()
psr/factory/factory.dll CHANGED
Binary file
psr/factory/factory.pmd CHANGED
@@ -2493,6 +2493,7 @@ DEFINE_MODEL MODL:Optgen_RestricaoCapacidade
2493
2493
  PARM INTEGER FlagIncremental
2494
2494
  PARM INTEGER PenaltyFlag
2495
2495
  PARM INTEGER SystemCodePu
2496
+ PARM REFERENCE SystemElement PSRSystem
2496
2497
  END_MODEL
2497
2498
  //--------------------------------------------------------------------------------------------------
2498
2499
  // Modelo para Restricao de Precedencia
@@ -2806,8 +2807,8 @@ END_MODEL
2806
2807
  //--------------------------------------------------------------------------------------------------
2807
2808
  // Modelo para Solicitacao
2808
2809
  //--------------------------------------------------------------------------------------------------
2809
- DEFINE_MODEL MODL:Optmain_Solicitacao
2810
- PARM STRING Name
2810
+ DEFINE_CLASS PSRMaintenanceSolicitation
2811
+ PARM STRING Name @id
2811
2812
  PARM INTEGER UnitCode
2812
2813
  PARM INTEGER MinDateDay
2813
2814
  PARM INTEGER MinDateMonth
@@ -2823,66 +2824,66 @@ DEFINE_MODEL MODL:Optmain_Solicitacao
2823
2824
  PARM INTEGER Fix
2824
2825
  PARM INTEGER FixOuter
2825
2826
  PARM REFERENCE Plant
2826
- END_MODEL
2827
+ END_CLASS
2827
2828
 
2828
2829
  //--------------------------------------------------------------------------------------------------
2829
2830
  // Modelo para Grupo Exclusivo
2830
2831
  //--------------------------------------------------------------------------------------------------
2831
- DEFINE_MODEL MODL:Optmain_Excl
2832
- PARM STRING SetName
2832
+ DEFINE_CLASS PSRMaintenanceExclusive
2833
+ PARM STRING SetName @id
2833
2834
  VECTOR REFERENCE PlantsThermal
2834
2835
  VECTOR REFERENCE PlantsHydro
2835
2836
  VECTOR REFERENCE PlantsGnd
2836
- END_MODEL
2837
+ END_CLASS
2837
2838
 
2838
2839
  //--------------------------------------------------------------------------------------------------
2839
2840
  // Modelo para Grupo Compartilhado
2840
2841
  //--------------------------------------------------------------------------------------------------
2841
- DEFINE_MODEL MODL:Optmain_Shared
2842
- PARM STRING SetName
2842
+ DEFINE_CLASS PSRMaintenanceShared
2843
+ PARM STRING SetName @id
2843
2844
  VECTOR REFERENCE PlantsThermal
2844
2845
  VECTOR REFERENCE PlantsHydro
2845
2846
  VECTOR REFERENCE PlantsGnd
2846
- END_MODEL
2847
+ END_CLASS
2847
2848
 
2848
2849
  //--------------------------------------------------------------------------------------------------
2849
2850
  // Modelo para Grupo Associado
2850
2851
  //--------------------------------------------------------------------------------------------------
2851
- DEFINE_MODEL MODL:Optmain_Ass
2852
- PARM STRING SetName
2852
+ DEFINE_CLASS PSRMaintenanceAssociation
2853
+ PARM STRING SetName @id
2853
2854
  VECTOR REFERENCE Solicitations
2854
- END_MODEL
2855
+ END_CLASS
2855
2856
 
2856
2857
  //--------------------------------------------------------------------------------------------------
2857
2858
  // Modelo para Restricoes de Solicitacoes Exclusivas
2858
2859
  //--------------------------------------------------------------------------------------------------
2859
- DEFINE_MODEL MODL:Optmain_ExclSol
2860
- PARM STRING SetName
2860
+ DEFINE_CLASS PSRMaintenanceExclusiveSol
2861
+ PARM STRING SetName @id
2861
2862
  VECTOR REFERENCE Solicitations
2862
- END_MODEL
2863
+ END_CLASS
2863
2864
 
2864
2865
  //--------------------------------------------------------------------------------------------------
2865
2866
  // Modelo para Periodos Restritos
2866
2867
  //--------------------------------------------------------------------------------------------------
2867
- DEFINE_MODEL MODL:Optmain_StageCstr
2868
+ MERGE_CLASS PSRPlant StageCstr
2868
2869
  VECTOR DATE RestDate
2869
2870
  VECTOR INTEGER RestrictedStages INDEX RestDate
2870
- END_MODEL
2871
+ END_CLASS
2871
2872
 
2872
2873
  //--------------------------------------------------------------------------------------------------
2873
2874
  // Modelo para Reserva Minima
2874
2875
  //--------------------------------------------------------------------------------------------------
2875
- DEFINE_MODEL MODL:Optmain_MinRes
2876
+ MERGE_CLASS PSRSystem MinRes
2876
2877
  VECTOR DATE MinResDate
2877
2878
  VECTOR REAL MinimumReserve INDEX MinResDate
2878
- END_MODEL
2879
+ END_CLASS
2879
2880
 
2880
2881
  //--------------------------------------------------------------------------------------------------
2881
2882
  // Modelo para Demanda Instantanea
2882
2883
  //--------------------------------------------------------------------------------------------------
2883
- DEFINE_MODEL MODL:Optmain_InstDem
2884
- VECTOR REAL InstantDemand
2885
- END_MODEL
2884
+ MERGE_CLASS PSRSystem InstDem
2885
+ VECTOR REAL InstantDemand
2886
+ END_CLASS
2886
2887
 
2887
2888
  //--------------------------------------------------------------------------------------------------
2888
2889
  // Modelo para Parametros de Opcoes
@@ -2914,31 +2915,33 @@ DEFINE_MODEL MODL:Optmain_Options
2914
2915
  PARM INTEGER RFBF
2915
2916
  PARM INTEGER ASNM
2916
2917
  PARM INTEGER ASDT
2918
+ PARM INTEGER TUNE
2919
+ PARM INTEGER NCVR
2917
2920
  END_MODEL
2918
2921
 
2919
2922
  //--------------------------------------------------------------------------------------------------
2920
2923
  // Modelo para Restricoes de Precedencia
2921
2924
  //--------------------------------------------------------------------------------------------------
2922
- DEFINE_MODEL MODL:Optmain_Prec
2923
- PARM STRING PrecName
2925
+ DEFINE_CLASS PSRMaintenancePrecedence
2926
+ PARM STRING PrecName @id
2924
2927
  VECTOR INTEGER DelayMin
2925
2928
  VECTOR INTEGER DelayMax
2926
2929
  VECTOR REFERENCE Solicitations
2927
- END_MODEL
2930
+ END_CLASS
2928
2931
 
2929
2932
  //--------------------------------------------------------------------------------------------------
2930
2933
  // Modelo para Fatores de Unidades
2931
2934
  //--------------------------------------------------------------------------------------------------
2932
- DEFINE_MODEL MODL:Optmain_UnitFactors
2935
+ MERGE_CLASS PSRPlant UnitFactors
2933
2936
  VECTOR REAL UnitFactors
2934
- END_MODEL
2937
+ END_CLASS
2935
2938
 
2936
2939
  //--------------------------------------------------------------------------------------------------
2937
2940
  // Modelo para Mapeamento de Unidades
2938
2941
  //--------------------------------------------------------------------------------------------------
2939
- DEFINE_MODEL MODL:Optmain_UnitCodes
2942
+ MERGE_CLASS PSRPlant UnitCodes
2940
2943
  VECTOR INTEGER UnitCodes
2941
- END_MODEL
2944
+ END_CLASS
2942
2945
  //--------------------------------------
2943
2946
  //--- Modelo de Avaliacao Economica ---
2944
2947
  //--------------------------------------
@@ -4103,6 +4106,7 @@ DEFINE_MODEL MODL:SDDP_V10.2_Hidro
4103
4106
  VETOR DATE Data @addyear_modification
4104
4107
  VETOR INTEGER Existing INDEX Data
4105
4108
  VETOR INTEGER Unidades INDEX Data
4109
+ VETOR REAL MinGen INDEX Data
4106
4110
  VETOR REAL PotInst INDEX Data
4107
4111
  VETOR REAL FPMed INDEX Data
4108
4112
  VETOR REAL Qmin INDEX Data
@@ -4245,6 +4249,10 @@ DEFINE_MODEL MODL:SDDP_V10.2_Hidro
4245
4249
  PARM INTEGER SingleReserveInfo
4246
4250
  PARM INTEGER SingleReserveUnit
4247
4251
 
4252
+ PARM REAL MinTurbiningPenalty
4253
+ VETOR DATE DataMinTurbining @chronological @addyear_chronological
4254
+ VETOR REAL MinTurbining INDEX DataMinTurbining
4255
+
4248
4256
  PARM REAL MaxTurbiningPenalty
4249
4257
  VETOR DATE DataMaxTurbining @chronological @addyear_chronological
4250
4258
  VETOR REAL MaxTurbining INDEX DataMaxTurbining
@@ -4998,7 +5006,7 @@ DEFINE_MODEL MODL:SDDP_WaterWay
4998
5006
  PARM REAL FlowMax
4999
5007
  VETOR DATE DataFlowMaximum
5000
5008
  VETOR REAL FlowMaximum INDEX DataFlowMaximum
5001
- PARM INTEGER TravelTime
5009
+ PARM REAL TravelTime
5002
5010
  PARM INTEGER Disabled
5003
5011
  END_MODEL
5004
5012
 
@@ -5238,6 +5246,39 @@ DEFINE_MODEL MODL:SDDP_Execution_Options
5238
5246
  PARM INTEGER HIRS
5239
5247
  PARM INTEGER FINJ
5240
5248
  PARM INTEGER ETYP
5249
+ PARM INTEGER RFCF
5250
+ PARM INTEGER RFIT
5251
+ PARM INTEGER PFCF
5252
+ PARM INTEGER PENL
5253
+ PARM INTEGER LSFI
5254
+ PARM INTEGER FIXL
5255
+ PARM INTEGER HCMT
5256
+ PARM REAL MXFT
5257
+ PARM INTEGER HLFR
5258
+ PARM INTEGER LSUP
5259
+ PARM INTEGER PVNC
5260
+ PARM INTEGER HMEM
5261
+ PARM INTEGER HTPP
5262
+ PARM INTEGER FSCN
5263
+ PARM INTEGER SKPS
5264
+ PARM REAL MMPP
5265
+ PARM INTEGER FMIP
5266
+ PARM INTEGER MUPR
5267
+ PARM INTEGER MXBD
5268
+ PARM REAL TOLR
5269
+ PARM INTEGER IGMR
5270
+ PARM REAL GCTE
5271
+ PARM INTEGER LCIR
5272
+ PARM INTEGER VSEC
5273
+ PARM INTEGER SRPD
5274
+ PARM INTEGER LSST
5275
+ PARM REAL LLSF
5276
+ PARM INTEGER GLLS
5277
+ PARM INTEGER LSAL
5278
+ PARM INTEGER PTOU
5279
+ PARM INTEGER SHOT
5280
+ PARM INTEGER FCFO
5281
+ PARM INTEGER HYRM
5241
5282
 
5242
5283
  PARM REAL NCPL_MIPR
5243
5284
  PARM REAL NCPL_LTOL
@@ -5281,10 +5322,13 @@ END_MODEL
5281
5322
  // Generic variable
5282
5323
  //--------------------------------------------------------------------------------------------------
5283
5324
  DEFINE_MODEL PSRGenericVariable
5284
- PARM STRING unit
5285
- PARM INTEGER resol
5325
+ PARM STRING unit
5326
+ PARM INTEGER resol
5286
5327
  PARM INTEGER type // 0 continuous, 1 binary
5328
+ PARM INTEGER UseCostAndBounds //determines if following values are used
5287
5329
  PARM REAL cost
5330
+ PARM REAL UpperBound
5331
+ PARM REAL LowerBound
5288
5332
  END_MODEL
5289
5333
 
5290
5334
  //--------------------------------------------------------------------------------------------------
@@ -5295,6 +5339,7 @@ DEFINE_MODEL PSRHydroUnit
5295
5339
  VETOR INTEGER Nunits INDEX Data
5296
5340
  VETOR REAL MinTurb INDEX Data
5297
5341
  VETOR REAL MaxTurb INDEX Data
5342
+ VETOR REAL MinGen INDEX Data
5298
5343
  VETOR REAL MaxGen INDEX Data
5299
5344
  VETOR INTEGER Existing INDEX Data
5300
5345
  END_MODEL
@@ -5329,10 +5374,10 @@ END_MODEL
5329
5374
  DEFINE_MODEL MODL:SDDP_Area
5330
5375
  DIMENSION block
5331
5376
 
5332
- //--- Importação da Area do ---
5333
- VETOR DATE DateTransfer @addyear_modification
5334
- VETOR REAL MaxImport DIM(block) INDEX DateTransfer
5335
- VETOR REAL MaxExport DIM(block) INDEX DateTransfer
5377
+ VETOR DATE DateMinTransfer @addyear_modification
5378
+ VETOR DATE DateMaxTransfer @addyear_modification
5379
+ VETOR REAL MinTransfer DIM(block) INDEX DateMinTransfer
5380
+ VETOR REAL MaxTransfer DIM(block) INDEX DateMaxTransfer
5336
5381
  END_MODEL
5337
5382
 
5338
5383
  //----------------------------------------------------------------------
@@ -5694,6 +5739,7 @@ DEFINE_MODEL MODL:SDDP_FlowController
5694
5739
  VETOR REAL Xmax INDEX Data
5695
5740
  VETOR REAL Rn INDEX Data
5696
5741
  VETOR REAL Re INDEX Data
5742
+ VETOR REAL MaxPower INDEX Data
5697
5743
 
5698
5744
  PARM INTEGER Location
5699
5745
  PARM INTEGER FlowControlType
@@ -5759,8 +5805,8 @@ DEFINE_MODEL MODL:SDDP_DCBus
5759
5805
  PARM REAL BaseVoltage
5760
5806
  PARM REAL GroundResistance
5761
5807
 
5762
- VETOR DATE DataVoltage
5763
- VETOR REAL Voltage DIM(block) INDEX DataVoltage
5808
+ VETOR DATE DateVolt
5809
+ VETOR REAL Volt DIM(block) INDEX DateVolt
5764
5810
 
5765
5811
  MERGE_MODEL Sddp_Georeference
5766
5812
  END_MODEL
@@ -5949,6 +5995,7 @@ DEFINE_CLASS PSRGenerationOfferHydroPlant
5949
5995
  VECTOR DATE Date @addyear_modification
5950
5996
  VECTOR REAL Price INDEX Date
5951
5997
  VECTOR REAL Quantity INDEX Date
5998
+ PARM REFERENCE Plant PSRHydroPlant
5952
5999
  END_CLASS
5953
6000
 
5954
6001
  DEFINE_CLASS PSRGenerationOfferThermalPlant
@@ -5958,6 +6005,7 @@ DEFINE_CLASS PSRGenerationOfferThermalPlant
5958
6005
  VECTOR DATE Date @addyear_modification
5959
6006
  VECTOR REAL Price INDEX Date
5960
6007
  VECTOR REAL Quantity INDEX Date
6008
+ PARM REFERENCE Plant PSRThermalPlant
5961
6009
  END_CLASS
5962
6010
 
5963
6011
  DEFINE_CLASS PSRGenerationOfferRenewablePlant
@@ -5967,6 +6015,7 @@ DEFINE_CLASS PSRGenerationOfferRenewablePlant
5967
6015
  VECTOR DATE Date @addyear_modification
5968
6016
  VECTOR REAL Price INDEX Date
5969
6017
  VECTOR REAL Quantity INDEX Date
6018
+ PARM REFERENCE Plant PSRGndPlant
5970
6019
  END_CLASS
5971
6020
 
5972
6021
  //----------------------------------------------------------------------