## Available scripting variables: ## inData0 - input DataTable 0 ## inData1 - input DataTable 1 ## outContainer - container housing output DataTable ## ## Example starter script: ## ## dts = inData0.getDataTableSpec() ## inputColumnIndex= dts.findColumnIndex("input_column_name") ## ## iterator = inData0.iterator() ## while iterator.hasNext(): ## row = iterator.next() ## cell = row.getCell(inputColumnIndex) ## ## newStringCell = StringCell("some string") ## newIntCell = IntCell(100) ## newDoubleCell = DoubleCell(99.9) ## ## newRow = AppendedColumnRow(row, [newStringCell, newIntCell, newDoubleCell]) ## outContainer.addRowToTable(newRow) ## ## Default script: ## ## ##dts = inData0.getDataTableSpec() ##Get column headers from Data Table 1 ##outContainer.setDataTableSpec(dts) ## ## Declare forcast array and get each years forecast ##--------------------------------------------------------------------------------------------------------- forecastrow = inData0.iterator().next() ## Local copy of forecast datarow type iterator = inData1.iterator() ##Initiate load duration curve iterator while iterator.hasNext(): ##Open Load Duration Curve loop with exit criteria of all rows complete loadrow = iterator.next() ##Get next (or first) row of load duration curve loadrowkey = loadrow.getKey() ##Capture rowID key of first row loadvalue = loadrow.getCell(0).getDoubleValue() ## Return the value (double type) in column 0 of the load duration curve forecast = [] ## Declare empty list variable to store loads i=0 ##Initialise while loop iterator while i