psr-factory 5.0.0b13__py3-none-win_amd64.whl → 5.0.0b15__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 +5 -3
- psr/cloud/version.py +1 -1
- psr/execqueue/client.py +4 -12
- psr/execqueue/server.py +5 -5
- psr/execqueue/watcher.py +5 -1
- psr/factory/__init__.py +1 -1
- psr/factory/factory.dll +0 -0
- psr/factory/factory.pmd +19 -39
- psr/factory/factory.pmk +91 -91
- psr/factory/libcurl-x64.dll +0 -0
- psr/factory/samples/__init__.py +2 -0
- psr/factory/samples/sddp_case01.py +3 -3
- psr/factory/samples/sddp_case21.py +3 -3
- {psr_factory-5.0.0b13.dist-info → psr_factory-5.0.0b15.dist-info}/METADATA +67 -1
- {psr_factory-5.0.0b13.dist-info → psr_factory-5.0.0b15.dist-info}/RECORD +18 -18
- {psr_factory-5.0.0b13.dist-info → psr_factory-5.0.0b15.dist-info}/WHEEL +0 -0
- {psr_factory-5.0.0b13.dist-info → psr_factory-5.0.0b15.dist-info}/licenses/LICENSE.txt +0 -0
- {psr_factory-5.0.0b13.dist-info → psr_factory-5.0.0b15.dist-info}/top_level.txt +0 -0
psr/cloud/cloud.py
CHANGED
@@ -162,8 +162,8 @@ class Client:
|
|
162
162
|
self._logger.info(
|
163
163
|
"Using Python client for PSR Cloud. Some features may not be available."
|
164
164
|
)
|
165
|
-
|
166
|
-
|
165
|
+
else:
|
166
|
+
self._console_path_setup(**kwargs)
|
167
167
|
|
168
168
|
self._credentials_setup(**kwargs)
|
169
169
|
|
@@ -961,7 +961,9 @@ class Client:
|
|
961
961
|
"sessao_id": section,
|
962
962
|
"tipo_autenticacao": "bcrypt",
|
963
963
|
"idioma": "3",
|
964
|
-
"versao_cliente": self._get_console_version().split("-")[0]
|
964
|
+
"versao_cliente": self._get_console_version().split("-")[0]
|
965
|
+
if not self._python_client
|
966
|
+
else "5.4.0",
|
965
967
|
}
|
966
968
|
if additional_arguments:
|
967
969
|
parameters.update(additional_arguments)
|
psr/cloud/version.py
CHANGED
psr/execqueue/client.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import os
|
2
2
|
import zipfile
|
3
3
|
import requests
|
4
|
-
from typing import List, Optional
|
4
|
+
from typing import List, Optional, Tuple
|
5
5
|
|
6
6
|
|
7
7
|
def zip_directory(directory_path, output_zip):
|
@@ -70,21 +70,13 @@ def upload_and_run_file(zip_path: str, server_url: str, cloud_execution: bool =
|
|
70
70
|
return None
|
71
71
|
|
72
72
|
|
73
|
-
def get_execution_status(execution_id: str, server_url: str, cloud_execution: bool = False, return_status_id: bool = False) ->
|
73
|
+
def get_execution_status(execution_id: str, server_url: str, cloud_execution: bool = False, return_status_id: bool = False) -> Tuple[bool, dict]:
|
74
74
|
"""Get the status of an execution."""
|
75
|
-
print("Getting status for execution ID:", execution_id)
|
76
75
|
data = {'cloud_execution': cloud_execution, 'return_status_id': return_status_id}
|
77
76
|
response = requests.get(f"{server_url}/status/{execution_id}", data=data)
|
77
|
+
result = response.status_code == 200
|
78
|
+
return result, response.json()
|
78
79
|
|
79
|
-
if response.status_code == 200:
|
80
|
-
if return_status_id:
|
81
|
-
print("Status ID:", response.json().get('status_id'))
|
82
|
-
return response.json().get('status_id')
|
83
|
-
print("Status:", response.json().get('status'))
|
84
|
-
return response.json().get('status')
|
85
|
-
else:
|
86
|
-
print("Failed to get status:", response.text)
|
87
|
-
return None
|
88
80
|
|
89
81
|
def get_results(execution_id, server_url, cloud_execution=False) -> Optional[List[str]]:
|
90
82
|
"""Download the results of an execution."""
|
psr/execqueue/server.py
CHANGED
@@ -76,7 +76,7 @@ def run_cloud_case(execution_id: str, case_path: str):
|
|
76
76
|
name="LSEG Server "+ execution_id,
|
77
77
|
data_path=case_path,
|
78
78
|
program="SDDP",
|
79
|
-
program_version = "17.
|
79
|
+
program_version = "17.2.12",
|
80
80
|
execution_type="Default",
|
81
81
|
memory_per_process_ratio='2:1',
|
82
82
|
price_optimized=False,
|
@@ -299,13 +299,13 @@ def get_status(execution_id):
|
|
299
299
|
if return_status_id:
|
300
300
|
return jsonify({'status_id': status}), 200
|
301
301
|
if status == db.CloudStatus.ERROR.value:
|
302
|
-
return jsonify({'
|
302
|
+
return jsonify({'message': 'Execution finished with errors'}), 200
|
303
303
|
elif status == db.CloudStatus.RUNNING.value:
|
304
|
-
return jsonify({'
|
304
|
+
return jsonify({'message': 'Execution not finished yet'}), 200
|
305
305
|
elif status == db.CloudStatus.FINISHED.value:
|
306
|
-
return jsonify({'
|
306
|
+
return jsonify({'message': 'Execution finished, but download not yet downloaded from Cloud server'}), 200
|
307
307
|
elif status == db.CloudStatus.RESULTS_AVAILABLE.value:
|
308
|
-
return jsonify({'
|
308
|
+
return jsonify({'message': 'Execution finished and results are available to download'}), 200
|
309
309
|
|
310
310
|
@app.route('/results/<execution_id>', methods=['GET'])
|
311
311
|
def get_results(execution_id: str):
|
psr/execqueue/watcher.py
CHANGED
@@ -73,7 +73,10 @@ def _check_and_download_results():
|
|
73
73
|
rows = cursor.fetchall()
|
74
74
|
for row in rows:
|
75
75
|
record_id, filename, cloud_upload_id = row
|
76
|
-
|
76
|
+
result, response = execqueue.get_execution_status(cloud_upload_id, SERVER_URL, cloud_execution=True, return_status_id=True)
|
77
|
+
status = response.get('status_id', 0)
|
78
|
+
message = response.get('message', None)
|
79
|
+
error = response.get('error', None)
|
77
80
|
if status == "5" or status == 5:
|
78
81
|
files = execqueue.get_results(cloud_upload_id, SERVER_URL, cloud_execution=True)
|
79
82
|
if files:
|
@@ -92,6 +95,7 @@ def _check_and_download_results():
|
|
92
95
|
logging.info(f"Execution {cloud_upload_id} is finished with errors.")
|
93
96
|
cursor.execute("UPDATE processed_files SET downloaded=4 WHERE id=?", (record_id,))
|
94
97
|
conn.commit()
|
98
|
+
|
95
99
|
conn.close()
|
96
100
|
|
97
101
|
|
psr/factory/__init__.py
CHANGED
psr/factory/factory.dll
CHANGED
Binary file
|
psr/factory/factory.pmd
CHANGED
@@ -3113,7 +3113,7 @@ DEFINE_MODEL MODL:Xpress_Controls_Keywords
|
|
3113
3113
|
PARM INTEGER PREPROBING
|
3114
3114
|
PARM INTEGER PREDOMCOL
|
3115
3115
|
PARM INTEGER PREDOMROW
|
3116
|
-
PARM INTEGER
|
3116
|
+
PARM INTEGER HEUREMPHASIS
|
3117
3117
|
PARM INTEGER MAXNODE
|
3118
3118
|
PARM REAL MIPTOL
|
3119
3119
|
PARM REAL MIPABSSTOP
|
@@ -3272,6 +3272,7 @@ DEFINE_MODEL MODL:Optmain_Options
|
|
3272
3272
|
PARM INTEGER NCVR
|
3273
3273
|
PARM INTEGER WSVF
|
3274
3274
|
PARM INTEGER WSLX
|
3275
|
+
PARM INTEGER RFPR
|
3275
3276
|
END_MODEL
|
3276
3277
|
|
3277
3278
|
//--------------------------------------------------------------------------------------------------
|
@@ -4120,8 +4121,6 @@ DEFINE_MODEL MODL:SDDP_V10.2_Sistema
|
|
4120
4121
|
VECTOR REAL CoefVariation DIM(block) INDEX DateCoefVariation
|
4121
4122
|
|
4122
4123
|
MERGE_MODEL Sddp_Georeference
|
4123
|
-
|
4124
|
-
PARM REFERENCE SystemDistributedGeneration PSRTimeSeries
|
4125
4124
|
END_MODEL
|
4126
4125
|
|
4127
4126
|
//--------------------------------------------------------------------------------------------------
|
@@ -4228,8 +4227,6 @@ DEFINE_MODEL MODL:SDDP_V10.2_SegmentoDemanda
|
|
4228
4227
|
VETOR REAL HourDemandPrice INDEX DataHourDemandPrice
|
4229
4228
|
|
4230
4229
|
VETOR REAL HourDemandScen
|
4231
|
-
|
4232
|
-
PARM REFERENCE DemandTimeSeriesTest PSRTimeSeries
|
4233
4230
|
END_MODEL
|
4234
4231
|
|
4235
4232
|
//--------------------------------------------------------------------------------------------------
|
@@ -4384,7 +4381,7 @@ DEFINE_MODEL MODL:SDDP_V10.2_Termica
|
|
4384
4381
|
DIMENSION reserve_price
|
4385
4382
|
|
4386
4383
|
PARM INTEGER ComT
|
4387
|
-
PARM INTEGER ThermalType
|
4384
|
+
PARM INTEGER ThermalType DEFAULT 0
|
4388
4385
|
|
4389
4386
|
VETOR DATE Data @addyear_modification
|
4390
4387
|
VETOR DATE DataCesp
|
@@ -4711,9 +4708,6 @@ DEFINE_MODEL MODL:SDDP_V10.2_Hidro
|
|
4711
4708
|
VETOR DATE LGC_Data @chronological @addyear_chronological
|
4712
4709
|
VETOR REAL LGC_MonthlyPremium INDEX LGC_Data
|
4713
4710
|
|
4714
|
-
PARM REFERENCE MinimumGenerationTimeSeries PSRTimeSeries
|
4715
|
-
PARM REFERENCE MaintenanceScheduleTimeSeries PSRTimeSeries
|
4716
|
-
|
4717
4711
|
END_MODEL
|
4718
4712
|
//--------------------------------------------------------------------------------------------------
|
4719
4713
|
// Modelo para Geracao nao despachavel
|
@@ -4881,6 +4875,7 @@ DEFINE_MODEL MODL:SDDP_V10.2_ReservaGeracao
|
|
4881
4875
|
PARM REAL Penalty DEFAULT -1
|
4882
4876
|
PARM INTEGER Exclusive DEFAULT 0
|
4883
4877
|
PARM INTEGER LimitType DEFAULT 0
|
4878
|
+
PARM INTEGER Sense DEFAULT 0
|
4884
4879
|
PARM INTEGER Type
|
4885
4880
|
PARM INTEGER CompensateNoSel
|
4886
4881
|
PARM INTEGER CompensateSel
|
@@ -5856,6 +5851,14 @@ DEFINE_MODEL MODL:SDDP_Line
|
|
5856
5851
|
VECTOR DATE DateCostToFrom @addyear_chronological
|
5857
5852
|
VECTOR REAL CostToFrom DIM(block) INDEX DateCostToFrom
|
5858
5853
|
|
5854
|
+
PARM INTEGER MaxSecondaryReserveUnit
|
5855
|
+
PARM INTEGER HasMaxSecondaryReserve
|
5856
|
+
VETOR DATE DataMaxSecondaryReserve @chronological @addyear_chronological
|
5857
|
+
VETOR REAL MaxSecondaryReserve DIM(block) INDEX DataMaxSecondaryReserve
|
5858
|
+
PARM INTEGER HasPriceSecondaryReserve
|
5859
|
+
VETOR DATE DataPriceSecondaryReserve @chronological @addyear_chronological
|
5860
|
+
VETOR REAL PriceSecondaryReserve DIM(block) INDEX DataPriceSecondaryReserve
|
5861
|
+
|
5859
5862
|
MERGE_MODEL MODL:SDDP_Asset
|
5860
5863
|
END_MODEL
|
5861
5864
|
//----------------------------------------------------------------------
|
@@ -6447,35 +6450,6 @@ DEFINE_MODEL MODL:SDDP_CircuitSum
|
|
6447
6450
|
END_MODEL
|
6448
6451
|
|
6449
6452
|
|
6450
|
-
//----------------------------------------------------------------------
|
6451
|
-
// Time Series Template model
|
6452
|
-
//----------------------------------------------------------------------
|
6453
|
-
DEFINE_MODEL MODL:SDDP_TimeSeriesTemplate
|
6454
|
-
DIMENSION columns
|
6455
|
-
|
6456
|
-
VECTOR STRING Names DIM(columns)
|
6457
|
-
|
6458
|
-
VECTOR DATE DateStart
|
6459
|
-
VECTOR DATE DateEnd INTERVAL DateStart
|
6460
|
-
VECTOR REAL Values DIM(columns) INDEX DateStart
|
6461
|
-
|
6462
|
-
END_MODEL
|
6463
|
-
//----------------------------------------------------------------------
|
6464
|
-
// Time Series Instance model
|
6465
|
-
//----------------------------------------------------------------------
|
6466
|
-
DEFINE_MODEL MODL:SDDP_TimeSeries
|
6467
|
-
VECTOR DATE DateDefault
|
6468
|
-
VECTOR REAL Default INDEX DateDefault
|
6469
|
-
|
6470
|
-
VECTOR DATE DateGain
|
6471
|
-
VECTOR REAL Gain INDEX DateGain
|
6472
|
-
|
6473
|
-
VECTOR DATE Date
|
6474
|
-
VECTOR REAL Offset INDEX Date
|
6475
|
-
VECTOR REAL Min INDEX Date
|
6476
|
-
VECTOR REAL Max INDEX Date
|
6477
|
-
END_MODEL
|
6478
|
-
|
6479
6453
|
//--------------------------------------
|
6480
6454
|
//--- Modelo para a Carga de Barra ---
|
6481
6455
|
//--------------------------------------
|
@@ -6505,7 +6479,7 @@ DEFINE_MODEL MODL:TSL_Configuration
|
|
6505
6479
|
PARM STRING MainTurbinePath
|
6506
6480
|
PARM STRING MERRAPath
|
6507
6481
|
|
6508
|
-
VECTOR REFERENCE SelectedGndStations
|
6482
|
+
VECTOR REFERENCE SelectedGndStations PSRElement
|
6509
6483
|
|
6510
6484
|
// --- time series flags---
|
6511
6485
|
PARM INTEGER TimeSeriesExecutionFlag
|
@@ -6524,6 +6498,8 @@ DEFINE_MODEL MODL:TSL_GndPlant
|
|
6524
6498
|
PARM REAL DCACRatio
|
6525
6499
|
PARM REAL SystemLosses
|
6526
6500
|
PARM INTEGER UseAzimuth
|
6501
|
+
PARM INTEGER BifacialPanelFlag DEFAULT 0
|
6502
|
+
PARM REAL BifacialityFactor DEFAULT 0.7
|
6527
6503
|
|
6528
6504
|
// --- Eolic ---
|
6529
6505
|
PARM REAL Height
|
@@ -6569,6 +6545,10 @@ DEFINE_MODEL MODL:TSL_TemperaturePoint
|
|
6569
6545
|
PARM INTEGER Type
|
6570
6546
|
END_MODEL
|
6571
6547
|
|
6548
|
+
DEFINE_MODEL MODL:TSL_DlrStation
|
6549
|
+
PARM INTEGER Id
|
6550
|
+
END_MODEL
|
6551
|
+
|
6572
6552
|
DEFINE_MODEL MODL:TSL_Climate_Configuration
|
6573
6553
|
PARM STRING ClimateModel
|
6574
6554
|
|
psr/factory/factory.pmk
CHANGED
@@ -9753,6 +9753,7 @@ Penalty REAL 41,50 AUTOSET(model.parm("Penalty"))
|
|
9753
9753
|
Exclusive INTEGER 52,52 AUTOSET(model.parm("Exclusive"))
|
9754
9754
|
LimitType INTEGER 54,54 AUTOSET(model.parm("LimitType"))
|
9755
9755
|
ReserveAreaCode INTEGER 56,59
|
9756
|
+
Sense INTEGER 61,64 AUTOSET(model.parm("Sense"))
|
9756
9757
|
END_DATA
|
9757
9758
|
|
9758
9759
|
END_BLOCK
|
@@ -12158,7 +12159,7 @@ DEFINE_MASK CSVDATA SDDP_v17.4_cbattery
|
|
12158
12159
|
|
12159
12160
|
DEFINE_HEADER
|
12160
12161
|
$version=2
|
12161
|
-
!Code,Name,Bus,Existing,Emin,Emax,Einic,Pmax,ChargeEffic,DischargeEffic,RegTime,
|
12162
|
+
!Code,Name,Bus,Existing,Emin,Emax,Einic,Pmax,ChargeEffic,DischargeEffic,RegTime,FlagInterStage,ChargeRamp,DischargeRamp,O&MType,O&MCost,RegType,ControlledBusCode,ReactivePowerControlType,MinReactivePower,MaxReactivePower,ReactivePowerFactor,GenDev,MaxDev,DevOpt
|
12162
12163
|
END_HEADER
|
12163
12164
|
|
12164
12165
|
DEFINE_DATA
|
@@ -15338,97 +15339,7 @@ END_DATA
|
|
15338
15339
|
|
15339
15340
|
END_MASK
|
15340
15341
|
//---------------------------------------------------------------------
|
15341
|
-
DEFINE_MASK CSVDATA SDDP_timeseriesdatatable
|
15342
15342
|
|
15343
|
-
DEFINE_HEADER
|
15344
|
-
$version=1
|
15345
|
-
!code,name,filepath
|
15346
|
-
END_HEADER
|
15347
|
-
|
15348
|
-
DEFINE_DATA
|
15349
|
-
Code INTEGER 1
|
15350
|
-
Name STRING 2
|
15351
|
-
FilePath STRING 3
|
15352
|
-
END_DATA
|
15353
|
-
END_MASK
|
15354
|
-
//---------------------------------------------------------------------
|
15355
|
-
DEFINE_MASK CSVDATA SDDP_timeseriesinstance
|
15356
|
-
|
15357
|
-
DEFINE_HEADER
|
15358
|
-
$version=1
|
15359
|
-
!class,code,name,id,index,timeseries,datatable,column
|
15360
|
-
END_HEADER
|
15361
|
-
|
15362
|
-
DEFINE_DATA
|
15363
|
-
ElementClass INTEGER 1
|
15364
|
-
ElementCode INTEGER 2
|
15365
|
-
ElementName STRING 3
|
15366
|
-
ElementId STRING 4
|
15367
|
-
ElementIndex INTEGER 5
|
15368
|
-
TimeSeries STRING 6
|
15369
|
-
DataTable STRING 7
|
15370
|
-
Column STRING 8
|
15371
|
-
END_DATA
|
15372
|
-
END_MASK
|
15373
|
-
//---------------------------------------------------------------------
|
15374
|
-
DEFINE_MASK CSVDATA SDDP_timeseriesdefault
|
15375
|
-
|
15376
|
-
DEFINE_HEADER
|
15377
|
-
$version=1
|
15378
|
-
!class,code,name,id,index,timeseries,date,default
|
15379
|
-
END_HEADER
|
15380
|
-
|
15381
|
-
DEFINE_DATA
|
15382
|
-
ElementClass INTEGER 1
|
15383
|
-
ElementCode INTEGER 2
|
15384
|
-
ElementName STRING 3
|
15385
|
-
ElementId STRING 4
|
15386
|
-
ElementIndex INTEGER 5
|
15387
|
-
TimeSeries STRING 6
|
15388
|
-
DateDefault DATE 7 DD/MM/YYYY AUTOSET
|
15389
|
-
Default REAL 8 AUTOSET
|
15390
|
-
END_DATA
|
15391
|
-
END_MASK
|
15392
|
-
//---------------------------------------------------------------------
|
15393
|
-
DEFINE_MASK CSVDATA SDDP_timeseriesgain
|
15394
|
-
|
15395
|
-
DEFINE_HEADER
|
15396
|
-
$version=1
|
15397
|
-
!class,code,name,id,index,timeseries,date,gain
|
15398
|
-
END_HEADER
|
15399
|
-
|
15400
|
-
DEFINE_DATA
|
15401
|
-
ElementClass INTEGER 1
|
15402
|
-
ElementCode INTEGER 2
|
15403
|
-
ElementName STRING 3
|
15404
|
-
ElementId STRING 4
|
15405
|
-
ElementIndex INTEGER 5
|
15406
|
-
TimeSeries STRING 6
|
15407
|
-
DateGain DATE 7 DD/MM/YYYY AUTOSET
|
15408
|
-
Gain REAL 8 AUTOSET
|
15409
|
-
END_DATA
|
15410
|
-
END_MASK
|
15411
|
-
//---------------------------------------------------------------------
|
15412
|
-
DEFINE_MASK CSVDATA SDDP_timeseriesproperties
|
15413
|
-
|
15414
|
-
DEFINE_HEADER
|
15415
|
-
$version=1
|
15416
|
-
!class,code,name,id,index,timeseries,date,offset,min,max
|
15417
|
-
END_HEADER
|
15418
|
-
|
15419
|
-
DEFINE_DATA
|
15420
|
-
ElementClass INTEGER 1
|
15421
|
-
ElementCode INTEGER 2
|
15422
|
-
ElementName STRING 3
|
15423
|
-
ElementId STRING 4
|
15424
|
-
ElementIndex INTEGER 5
|
15425
|
-
TimeSeries STRING 6
|
15426
|
-
DateProperty DATE 7 DD/MM/YYYY AUTOSET
|
15427
|
-
Offset REAL 8 AUTOSET
|
15428
|
-
Min REAL 9 AUTOSET
|
15429
|
-
Max REAL 10 AUTOSET
|
15430
|
-
END_DATA
|
15431
|
-
END_MASK
|
15432
15343
|
//---------------------------------------------------------------------
|
15433
15344
|
DEFINE_MASK CSVDATA SDDP_georeference_system
|
15434
15345
|
|
@@ -18028,6 +17939,44 @@ $version=1
|
|
18028
17939
|
END_HEADER
|
18029
17940
|
END_MASK
|
18030
17941
|
|
17942
|
+
DEFINE_MASK CSVDATA SDDP_circ_res_sharing_me
|
17943
|
+
|
17944
|
+
DEFINE_HEADER
|
17945
|
+
$version=1
|
17946
|
+
!Code,Year,Block,Value1,Value2,Value3,Value4,Value5,Value6,Value7,Value8,Value9,Value10,Value11,Value12
|
17947
|
+
END_HEADER
|
17948
|
+
|
17949
|
+
DEFINE_MACRO
|
17950
|
+
VAR B 1,12
|
17951
|
+
END_MACRO
|
17952
|
+
|
17953
|
+
DEFINE_DATA
|
17954
|
+
Code INTEGER,1
|
17955
|
+
Year INTEGER,2
|
17956
|
+
Block INTEGER,3
|
17957
|
+
Value($(B)) REAL,4+($(B))
|
17958
|
+
END_DATA
|
17959
|
+
END_MASK
|
17960
|
+
|
17961
|
+
DEFINE_MASK CSVDATA SDDP_circ_res_sharing_se
|
17962
|
+
|
17963
|
+
DEFINE_HEADER
|
17964
|
+
$version=1
|
17965
|
+
!Code,Year,Block,Value1,Value2,Value3,Value4,Value5,Value6,Value7,Value8,Value9,Value10,Value11,Value12,(...),Value52
|
17966
|
+
END_HEADER
|
17967
|
+
|
17968
|
+
DEFINE_MACRO
|
17969
|
+
VAR B 1,52
|
17970
|
+
END_MACRO
|
17971
|
+
|
17972
|
+
DEFINE_DATA
|
17973
|
+
Code INTEGER,1
|
17974
|
+
Year INTEGER,2
|
17975
|
+
Block INTEGER,3
|
17976
|
+
Value($(B)) REAL,4+($(B))
|
17977
|
+
END_DATA
|
17978
|
+
END_MASK
|
17979
|
+
|
18031
17980
|
//---------------------------------------------------------------------
|
18032
17981
|
//---------------------------------------------------------------------
|
18033
17982
|
DEFINE_MASK ROWDATA SDDP_v10.3_cloads
|
@@ -18478,6 +18427,8 @@ END_BLOCK
|
|
18478
18427
|
|
18479
18428
|
END_MASK
|
18480
18429
|
|
18430
|
+
|
18431
|
+
|
18481
18432
|
//---------------------------------------------------------------------
|
18482
18433
|
//---------------------------------------------------------------------
|
18483
18434
|
DEFINE_MASK CSVDATA TSL_rps
|
@@ -18551,6 +18502,55 @@ END_DATA
|
|
18551
18502
|
|
18552
18503
|
END_MASK
|
18553
18504
|
|
18505
|
+
//---------------------------------------------------------------------
|
18506
|
+
//---------------------------------------------------------------------
|
18507
|
+
DEFINE_MASK CSVDATA TSL_dlrstation
|
18508
|
+
|
18509
|
+
DEFINE_HEADER
|
18510
|
+
!ID_TSLDATA,StationCode,StationName
|
18511
|
+
END_HEADER
|
18512
|
+
DEFINE_DATA
|
18513
|
+
Id INTEGER,1
|
18514
|
+
Code INTEGER,2
|
18515
|
+
Name STRING,3
|
18516
|
+
|
18517
|
+
END_DATA
|
18518
|
+
|
18519
|
+
END_MASK
|
18520
|
+
|
18521
|
+
//---------------------------------------------------------------------
|
18522
|
+
//---------------------------------------------------------------------
|
18523
|
+
DEFINE_MASK CSVDATA TSL_gndrps_v2
|
18524
|
+
|
18525
|
+
DEFINE_HEADER
|
18526
|
+
$version=2
|
18527
|
+
cod,sis,name,StationCode,StationName,Traking,Tilt,Azimuth,Height,Turbine,Profile,DownsFlag,DensityCorrectionFlag,DensityCorrection,DCACRatio,SystemLosses,OptmizedAzimuth,BifacialPanelFlag,BifacialityFactor
|
18528
|
+
END_HEADER
|
18529
|
+
DEFINE_DATA
|
18530
|
+
Code INTEGER,1
|
18531
|
+
SystemCode INTEGER,2
|
18532
|
+
Name STRING,3
|
18533
|
+
StationCode INTEGER,4
|
18534
|
+
StationName STRING,5
|
18535
|
+
Traking INTEGER,6 AUTOSET(model.parm("Traking"))
|
18536
|
+
Tilt REAL,7 AUTOSET(model.parm("Tilt"))
|
18537
|
+
Azimuth REAL,8 AUTOSET(model.parm("Azimuth"))
|
18538
|
+
Height REAL,9 AUTOSET(model.parm("Height"))
|
18539
|
+
Turbine STRING,10
|
18540
|
+
Profile STRING,11
|
18541
|
+
DownscalingFlag INTEGER,12 AUTOSET(model.parm("DownscalingFlag"))
|
18542
|
+
DensityCorrectionFlag INTEGER,13 AUTOSET(model.parm("DownscalingFlag"))
|
18543
|
+
DensityCorrection REAL,14 AUTOSET(model.parm("DownscalingFlag"))
|
18544
|
+
DCACRatio REAL,15 AUTOSET(model.parm("DCACRatio"))
|
18545
|
+
SystemLosses REAL,16 AUTOSET(model.parm("SystemLosses"))
|
18546
|
+
UseAzimuth INTEGER,17 AUTOSET(model.parm("UseAzimuth"))
|
18547
|
+
BifacialPanelFlag INTEGER,18 AUTOSET(model.parm("BifacialPanelFlag"))
|
18548
|
+
BifacialityFactor REAL,19 AUTOSET(model.parm("BifacialityFactor"))
|
18549
|
+
|
18550
|
+
END_DATA
|
18551
|
+
|
18552
|
+
END_MASK
|
18553
|
+
|
18554
18554
|
//---------------------------------------------------------------------
|
18555
18555
|
//---------------------------------------------------------------------
|
18556
18556
|
DEFINE_MASK CSVDATA TSL_ceolcstgrid
|
psr/factory/libcurl-x64.dll
CHANGED
Binary file
|
psr/factory/samples/__init__.py
CHANGED
@@ -5,11 +5,11 @@ import os
|
|
5
5
|
import psr.factory
|
6
6
|
|
7
7
|
|
8
|
-
def
|
8
|
+
def _get_case_path() -> str:
|
9
9
|
return os.path.join(os.path.splitext(os.path.basename(__file__))[0], "")
|
10
10
|
|
11
11
|
|
12
|
-
def create_case01(legacy: bool) -> psr.factory.Study:
|
12
|
+
def create_case01(legacy: bool = False) -> psr.factory.Study:
|
13
13
|
blocks = 1
|
14
14
|
model = "SDDP" if not legacy else "SDDP17"
|
15
15
|
# Create a study object and define its basic settings.
|
@@ -155,7 +155,7 @@ def create_case01(legacy: bool) -> psr.factory.Study:
|
|
155
155
|
|
156
156
|
|
157
157
|
if __name__ == "__main__":
|
158
|
-
case_path =
|
158
|
+
case_path = _get_case_path()
|
159
159
|
os.makedirs(case_path, exist_ok=True)
|
160
160
|
print("Creating example case... ", end="")
|
161
161
|
study = create_case01(False)
|
@@ -5,11 +5,11 @@ import os
|
|
5
5
|
import psr.factory
|
6
6
|
|
7
7
|
|
8
|
-
def
|
8
|
+
def _get_case_path() -> str:
|
9
9
|
return os.path.join(os.path.splitext(os.path.basename(__file__))[0], "")
|
10
10
|
|
11
11
|
|
12
|
-
def create_case21(legacy: bool) -> psr.factory.Study:
|
12
|
+
def create_case21(legacy: bool = False) -> psr.factory.Study:
|
13
13
|
# Create a study object and define its basic settings.
|
14
14
|
blocks = 1
|
15
15
|
model = "SDDP" if not legacy else "SDDP17"
|
@@ -232,7 +232,7 @@ def create_case21(legacy: bool) -> psr.factory.Study:
|
|
232
232
|
|
233
233
|
|
234
234
|
if __name__ == "__main__":
|
235
|
-
case_path =
|
235
|
+
case_path = _get_case_path()
|
236
236
|
os.makedirs(case_path, exist_ok=True)
|
237
237
|
print("Creating example case... ", end="")
|
238
238
|
study = create_case21(False)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: psr-factory
|
3
|
-
Version: 5.0.
|
3
|
+
Version: 5.0.0b15
|
4
4
|
Summary: PSR database management module.
|
5
5
|
Author-email: "PSR Inc." <psrfactory@psr-inc.com>
|
6
6
|
License-Expression: MIT
|
@@ -55,3 +55,69 @@ Requires-Dist: pefile; extra == "all"
|
|
55
55
|
Requires-Dist: boto3; extra == "all"
|
56
56
|
Requires-Dist: botocore; extra == "all"
|
57
57
|
Dynamic: license-file
|
58
|
+
|
59
|
+
PSR Factory (version 4.0.37)
|
60
|
+
============================
|
61
|
+
|
62
|
+
Factory is a library that helps to manage SDDP cases.
|
63
|
+
It contains functions that create, load, and save studies, and also functions that create,
|
64
|
+
access, and modify objects in a study.
|
65
|
+
|
66
|
+
|
67
|
+
Installation
|
68
|
+
------------
|
69
|
+
|
70
|
+
### System-wide installation
|
71
|
+
|
72
|
+
Open the command prompt and run the following command:
|
73
|
+
|
74
|
+
```bash
|
75
|
+
pip install psr_factory-4.0.37-py3-none-win_amd64.whl
|
76
|
+
```
|
77
|
+
|
78
|
+
Factory will be available to all Python scripts in your system after importing it:
|
79
|
+
|
80
|
+
```python
|
81
|
+
import psr.factory
|
82
|
+
```
|
83
|
+
|
84
|
+
### Local/project-specific usage
|
85
|
+
|
86
|
+
Copy the folder `psr` and its contents to your project folder or a specific folder (e.g., `C:\path\to\factory`). Then, in your Python script, add the following lines:
|
87
|
+
|
88
|
+
```python
|
89
|
+
import sys
|
90
|
+
sys.path.append(r"C:\path\to\factory")
|
91
|
+
import psr.factory
|
92
|
+
```
|
93
|
+
|
94
|
+
|
95
|
+
Usage sample
|
96
|
+
------------
|
97
|
+
|
98
|
+
```python
|
99
|
+
import psr.factory
|
100
|
+
|
101
|
+
study = psr.factory.load_study(r"C:\temp\my\study")
|
102
|
+
system_1 = study.find("System.*")[0]
|
103
|
+
|
104
|
+
battery = psr.factory.create("Battery")
|
105
|
+
battery.code = 1
|
106
|
+
battery.name = "Battery 1"
|
107
|
+
battery.set("InstalledCapacity", 10.0)
|
108
|
+
battery.set("RefSystem", system_1)
|
109
|
+
study.add(battery)
|
110
|
+
|
111
|
+
study.save(r"C:\temp\my\updated_study")
|
112
|
+
```
|
113
|
+
|
114
|
+
|
115
|
+
Full documentation
|
116
|
+
------------------
|
117
|
+
|
118
|
+
The full documentation and reference is available at [https://docs.psr-inc.com/factory/](https://docs.psr-inc.com/manual/factory/).
|
119
|
+
|
120
|
+
Releases
|
121
|
+
--------
|
122
|
+
|
123
|
+
New releases can be found in the release notes at [https://psrenergy-docs.github.io/factory/releases.html](https://psrenergy-docs.github.io/factory/releases.html).
|
@@ -3,38 +3,38 @@ psr/apps/apps.py,sha256=V8Ewht7P1I-3sSkV3dnbxbLjF2slxPjcmtzmVaLjiNY,6746
|
|
3
3
|
psr/apps/version.py,sha256=vs459L6JsatAkUxna7BNG-vMCaXpO1Ye8c1bmkEx4U4,194
|
4
4
|
psr/cloud/__init__.py,sha256=inZMwG7O9Fca9hg1BhqYObOYtTTJOkpuTIuXnkHJZkI,246
|
5
5
|
psr/cloud/aws.py,sha256=ro8kBNVxpGDXgZ5haceqX-MAD-0F5KFDJJ4M6rRvwS8,9915
|
6
|
-
psr/cloud/cloud.py,sha256
|
6
|
+
psr/cloud/cloud.py,sha256=RNFUXCAj4IRAMWUUyiEeZfwOqVVZdN28UZPLPSbm-5Y,59207
|
7
7
|
psr/cloud/data.py,sha256=oDJyzcNsA7aAYi_qJKCUjCeGZvN-25E8KjZ-5RamNLE,4160
|
8
8
|
psr/cloud/desktop.py,sha256=JFroCMEFV1Nz3has74n7OVrGCg2lS7Ev5bcjdw2hRxY,2980
|
9
9
|
psr/cloud/log.py,sha256=Dvhz1enIWlFWeaRK7JAAuZVPfODgoEIRNcHEmbEliyQ,1366
|
10
10
|
psr/cloud/status.py,sha256=vcI4B9S6wCt9maT5NNrVwYaEgGIvy6kkC1UVpJjYbtw,3607
|
11
11
|
psr/cloud/tempfile.py,sha256=1IOeye0eKWnmBynK5K5FMWiTaEVhn4GbQ8_y0THEva0,3893
|
12
|
-
psr/cloud/version.py,sha256=
|
12
|
+
psr/cloud/version.py,sha256=jwq5nQsan38iZF0lj5GFK7l9EIe4aSF1NzdcupAfHP4,192
|
13
13
|
psr/cloud/xml.py,sha256=ac2lyflOQm8khPvJn0zmI26I4sfUDY6A_OTsxzbMQEs,1896
|
14
|
-
psr/execqueue/client.py,sha256=
|
14
|
+
psr/execqueue/client.py,sha256=EjhXXWZli8MZP1rkKuYA1EL-VxO4aAUYZKsRa1mrG6Q,4374
|
15
15
|
psr/execqueue/config.py,sha256=3KVwASOgRlymOSPeabotgBdLVB5sPKnPQ9og2q3LQfw,1418
|
16
16
|
psr/execqueue/db.py,sha256=0pH5ksXChz6PR_GQs6OPokK3zVkY1-OZRAqYbVIEh9k,8281
|
17
|
-
psr/execqueue/server.py,sha256=
|
18
|
-
psr/execqueue/watcher.py,sha256=
|
19
|
-
psr/factory/__init__.py,sha256=
|
17
|
+
psr/execqueue/server.py,sha256=IwqVq0hTMAqAyvCF7FXQsf8i82NyWq2BjnZFDOjwg9s,13936
|
18
|
+
psr/execqueue/watcher.py,sha256=34TdU6quJIjWoOBlIbP1fA6fxaX5WmV1tAhvrIL30Uo,5213
|
19
|
+
psr/factory/__init__.py,sha256=3FZ_2un2wbep3zmXTR8RmbWZiqG914IRpuZxWPGPH0c,219
|
20
20
|
psr/factory/api.py,sha256=S7xoNxSKkyPEGtOLa_jBah59Edn39_wtoVQUrwrA6uk,100481
|
21
|
-
psr/factory/factory.dll,sha256=
|
22
|
-
psr/factory/factory.pmd,sha256=
|
23
|
-
psr/factory/factory.pmk,sha256=
|
21
|
+
psr/factory/factory.dll,sha256=H9Y85_SnrGwiGN21wfy3BYx3v9ZmpFOU5gPLjvCQ5iQ,18266448
|
22
|
+
psr/factory/factory.pmd,sha256=0bMTABqJvBVpHQLLVg5E-EJCbiST5mGjQnTgrXgYpyI,243155
|
23
|
+
psr/factory/factory.pmk,sha256=2kvj37seFO_POOqRIdOZuWRs4wSZuWT7z1LuaXi6qbg,579764
|
24
24
|
psr/factory/factorylib.py,sha256=-8wOx9h5oys0ZbG12OptwjzJVrgc48AgiAkBJJPKfio,27829
|
25
|
-
psr/factory/libcurl-x64.dll,sha256=
|
25
|
+
psr/factory/libcurl-x64.dll,sha256=E3rWQwQR-0-CxqJMpTF3PRS-P_6I-9so2hOTzRfKbMA,5317968
|
26
26
|
psr/factory/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
27
|
-
psr/factory/samples/__init__.py,sha256=
|
28
|
-
psr/factory/samples/sddp_case01.py,sha256=
|
29
|
-
psr/factory/samples/sddp_case21.py,sha256
|
27
|
+
psr/factory/samples/__init__.py,sha256=xxOch5Fokzjy571a6OHD87FWM17qKgvfcbr8xn-n36I,80
|
28
|
+
psr/factory/samples/sddp_case01.py,sha256=eLhtOAS2STl9-H7Nr5VUG4ATO0bVcn-CJtCn3Rf-vpI,5044
|
29
|
+
psr/factory/samples/sddp_case21.py,sha256=Eymn3q0uyaGSmZaTr0Yk2q9yf1-enqdoUFXPwuQ1YOk,8807
|
30
30
|
psr/psrfcommon/__init__.py,sha256=WXR560XQllIjtFpWd0jiJEbUAQIyh5-6lwj-42_J95c,200
|
31
31
|
psr/psrfcommon/psrfcommon.py,sha256=NABM5ahvyfSizDC9c0Vu9dVK1pD_vOzIGFHL1oz2E1o,1464
|
32
32
|
psr/psrfcommon/tempfile.py,sha256=5S13wa2DCLYTUdwbLm_KMBRnDRJ0WDlu8GO2BmZoNdg,3939
|
33
33
|
psr/runner/__init__.py,sha256=kI9HDX-B_LMQJUHHylFHas2rNpWfNNa0pZXoIvX_Alw,230
|
34
34
|
psr/runner/runner.py,sha256=L_YOCArpkr_O-UJH6aT3K46NlEYT_o7LA1Ldk81BULQ,27326
|
35
35
|
psr/runner/version.py,sha256=mch2Y8anSXGMn9w72Z78PhSRhOyn55EwaoLAYhY4McE,194
|
36
|
-
psr_factory-5.0.
|
37
|
-
psr_factory-5.0.
|
38
|
-
psr_factory-5.0.
|
39
|
-
psr_factory-5.0.
|
40
|
-
psr_factory-5.0.
|
36
|
+
psr_factory-5.0.0b15.dist-info/licenses/LICENSE.txt,sha256=N6mqZK2Ft3iXGHj-by_MHC_dJo9qwn0URjakEPys3H4,1089
|
37
|
+
psr_factory-5.0.0b15.dist-info/METADATA,sha256=jc4ppv3v5A_ZPesDAyd6hDMhpqiHcrSG8rJSNcYc5rU,3957
|
38
|
+
psr_factory-5.0.0b15.dist-info/WHEEL,sha256=ZjXRCNaQ9YSypEK2TE0LRB0sy2OVXSszb4Sx1XjM99k,97
|
39
|
+
psr_factory-5.0.0b15.dist-info/top_level.txt,sha256=Jb393O96WQk3b5D1gMcrZBLKJJgZpzNjTPoldUi00ck,4
|
40
|
+
psr_factory-5.0.0b15.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|