mapToGenerators{
timeSeriesName 'SO_G1'
filter {generator.id=='SO_G1'}
}

mapToGenerators{
timeSeriesName 'SO_G2'
filter {generator.id=='SO_G2'}
}

mapToGenerators{
timeSeriesName 'SE_G'
filter {generator.id=='SE_G'}
}

mapToGenerators{
timeSeriesName 'N_G'
filter {generator.id=='N_G'}
}

for (g in network.generators) {
    if (g.id.contains('BAT')) {
        mapToGenerators {
            variable minP
            timeSeriesName g.id + '_minP'
            filter { generator.id == g.id }
        }
        
        mapToGenerators {
            variable maxP
            timeSeriesName g.id + '_maxP'
            filter { generator.id == g.id }
        }
        
        mapToGenerators {
            variable targetP
            timeSeriesName g.id + '_targetP'
            filter { generator.id == g.id }
        }
    }
}

mapToLoads{
timeSeriesName 'SE_L1'
filter {load.id=='SE_L1'}
}

timeSeries['nul']=0

mapToLoads{
timeSeriesName 'nul'
filter {load.id in ['SE_L2','SO_L']}
}

network.getTwoWindingsTransformer('NE_NO_1').phaseTapChanger.tapPosition=17

mapToHvdcLines{
timeSeriesName 'nul'
filter {hvdcLine.id in ['HVDC1','HVDC2'] }
}
