Skip to content

Commit

Permalink
Added AMI on/off button to hostingCap + a test for correct omd file
Browse files Browse the repository at this point in the history
jenny-nyx committed Nov 15, 2023
1 parent fa4f2f0 commit cbc8386
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions omf/models/hostingCapacity.html
Original file line number Diff line number Diff line change
@@ -43,6 +43,13 @@
<p class="inputSectionHeader">AMI-Based Hosting Capacity</p>
</div>
<hr>
<div class="shortInput">
<label class="tooltip">Apply AMI-Based hosting capacity</label>
<select id="runAmiAlgorithm" name="runAmiAlgorithm" value="{{allInputDataDict.runAmiAlgorithm}}" required>
<option value="off" {% if allInputDataDict.runAmiAlgorithm == 'off' %}selected{% endif %}>Off</option>
<option value="on" {% if allInputDataDict.runAmiAlgorithm == 'on' %}selected{% endif %}>On</option>
</select>
</div>
<div class="shortInput">
<label class="tooltip">Meter Data Input File <span class="classic">Import a .csv file that includes the meter data. Format for input columns: busname, datetime, v_reading, kw_reading, kvar_reading. Optional input columns: latitude, longitude, service_tx_name, phase_count (1, 3)</span></label>
<div>{{ insert_file_upload_block('inputDataFileName','inputDataFileContent') }}</div>
2 changes: 1 addition & 1 deletion omf/models/hostingCapacity.py
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ def run_ami_algorithm(modelDir, inputDict, outData):

def run_traditional_algorithm(modelDir, inputDict, outData):
# traditional hosting capacity if they uploaded an omd circuit file and chose to use it.
feederName = [x for x in os.listdir(modelDir) if x.endswith('.omd')][0]
feederName = [x for x in os.listdir(modelDir) if x.endswith('.omd') and x[:-4] == inputDict['feederName1'] ][0]
inputDict['feederName1'] = feederName[:-4]
path_to_omd = pJoin(modelDir, feederName)
tree = opendss.dssConvert.omdToTree(path_to_omd)

0 comments on commit cbc8386

Please sign in to comment.