I am reading parameter from an excel-file using amplxl.dll. Partly, the parameter data (columns in excel) contain empty data.
set MPC_BRA_ID default {};
param bra_type{MPC_BRA_ID} symbolic default ‘’;
param bra_tap_pos{MPC_BRA_ID}; # no default here so far
table tmp_table IN “amplxl” (filename_GRID) “mpc_bra”: MPC_BRA_ID ← [mpc_bra_id], bra_type, bra_tap_pos;
read table tmp_table;
As a result, let’s assume five branches, MPC_BRA_ID is a set containing five values. Also bra_type contains five values since every branch has a type information like “line” or “transformer”. Having a look at bra_tap_position, some indices are missing because a value is only defined for a few transformer within the excel file. A lot of cells are simply empty.
e.g.
display bra_tap_pos;
bra_tap_pos [*] =
3 0
5 2
;
I want to create a new set dealing with the branches, which have a tap-position information.
The result shall be: new_set = {3, 5};
Unfortunatelly, “0” is a valid information too. Thus, replacing the empty cell by “0” would mean that the transformer has tap position data.
Evaluating the command
set new_set = {i in MPC_BRA_ID: bra_tap_pos[i]};
contains only the indices which are not “0”.
Is there any possibility to create such a set, without using a default value outside a realistic range (param bra_tap_pos{MPC_BRA_ID} default -9999)?
Best regards,
Lothar