parameters {
  computationType OPF
  withAdequacyResults true
  withRedispatchingResults true
}

for (l in network.branches){
branch(l.id){
baseCaseFlowResults true
maxThreatFlowResults true
branchRatingsBaseCase 190
branchRatingsOnContingency 190
}
} 


generator("SO_G1") {
  adequacyDownCosts 'others_cost_down' // Cost of ramping down for the adequacy phase
  adequacyUpCosts 'others_cost_up' // Cost of ramping up for the adequacy phase
  redispatchingDownCosts 'others_redisp_cost_down' // Cost of ramping down for the OPF simulation
  redispatchingUpCosts 'others_redisp_cost_up' // Cost of ramping up for the OPF simulation
}

generator("SO_G2") {
  adequacyDownCosts 'others_cost_down'
  adequacyUpCosts 'others_cost_up'
  redispatchingDownCosts 'others_redisp_cost_down'
  redispatchingUpCosts 'others_redisp_cost_up'
}

generator("N_G") {
  adequacyDownCosts 'solar_cost_down'
  adequacyUpCosts 'solar_cost_up'
  redispatchingDownCosts 'solar_redisp_cost_down'
  redispatchingUpCosts 'solar_cost_up'
}

generator("SE_G") {
  adequacyDownCosts 'wind_cost_down'
  adequacyUpCosts 'wind_cost_up'
  redispatchingDownCosts 'wind_redisp_cost_down'
  redispatchingUpCosts 'wind_cost_up'
}

for (g in network.generators){
if (g.id.contains('BAT')) {
generator(g.id){
adequacyDownCosts 'bat_cost_down'
adequacyUpCosts 'bat_cost_up'
redispatchingDownCosts 'bat_redisp_cost_down'
redispatchingUpCosts 'bat_redisp_cost_up'
}
}
}