Changing pgen of all the machines at once and solve case for different pgen
I am learning python and I have some problems for programming what I want I would like to know how to change the power of all the machines (except from one of them which has Pgen>10 MW) at once. I have tried using machinedata2 , but I don't know the way to change all the machines' pgen I would like to solve the case for diferent values of power but changing the power of all the machines at once. Anybody of you could help me? Thank you!!

Comments
I also try to change all the machine's Pgen, but if I change a large of data input the case may blown up or terminated!
You are going to have to adjust either increase load, or decrease generation in other areas. It is likely blowing up because your swing bus(es) are going negative and having to suck up the extra generation you are providing and voltage is likely tanking near the swing gen.
First of all apologise for the delay in sending the answer. It works great! thanks a lot