i want to create a counter for the time how long unit is off and a counter for a time how long unit is off, i have three binary variables status, on status and off status
I tried with repeat but syntax error always coming, i tried with for loop ,no errors, but when i checkthe value display
x_gen_on,it shows #empty
can some one help me
param x_gen_on{s in SCN, g in MPC_GEN_ID, t in TME} default 0 ;
for{s in SCN, g in MPC_GEN_ID, t in TME}{
if V_Gen_Startup[s,g,t]==1
then let x_gen_on[s,g,t]:=x_gen_on[s,g,t] + 1;
else if V_Gen_Status[s,g,t]==1 then continue;
else if V_Gen_shutdown[s,g,t]==1 then break;
}