So far, I am reading grid data – here bus data – from an excel file using "amplxl.dll".
…
The data is defined as:
param ntmc > 0 default 1; # number of time steps e.g. 3
set TMC = {1..ntmc};
set MPC_BUS_ID;
param mpc_bus_vm {MPC_BUS_ID} default 0;
var v_bus_vm {tc in TMC, b in MPC_BUS_ID} default mpc_bus_vm[b];
param filename_GRID symbolic = "./DATA/GridData.xlsx";
table mpc_bus IN "amplxl" (filename_GRID) "mpc_bus": MPC_BUS_ID <- [mpc_bus_id], mpc_bus_vm;
tread table mpc_bus;
This approach works fine, even without knowing the number of buses in advance.
Now, I want to read several grid layouts, e.g. dealing about three time steps including grid modifications, which results into a different number of buses depending on the time step. So, “time step 1” must store e.g. 200 buses, “time step 2” 205 buses and the third time step “time step 3” maybe only 190 buses.
How can such data be arranged and read from Excel? Also accessing other data via, an multi-dimensional approach like
display v_bus_vm {tc in TMC, b in MPC_BUS_ID[tc]};
If possible, there shall be simply different Excel tables dealing with the different time steps. The content of these tables shall be as now (key-word “mpc_bus_id” in cell A1).
I tried an approach using a two-dimensional set
set MPC_BUS_ID{TMC};
but already failed trying to access the data from Excel.
Best regards,
Lothar
So far, I am reading grid data - here bus data - from an excel file using "amplxl.dll".
--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ampl/5323a21e-e3ab-4434-91dc-b281174e1647n%40googlegroups.com.