I am using stochastic programming for energy trading in electricity market. I have 10 electricity price scenarios, each having a length of 24 (hourly electricity price for a day). So have a price scenario vector of size 24 X 10. Each of the scenarios is having a probability of occurrence, so I have a probability vector of size 10. I want to solve the problem using EMP.
How do I define this random variable with associated probabilities in stage 2 of EMP annotation? Can I use gdxin to read the data from a gdx file?
Note:- I have 3 such random variables, each with length 24 and 10 scenarios. I have generated these variables using MATLAB. I use wgdx to create and load data in a gdx file. So, it is more convenient for me to use gdxin.
Hi,
I figured out that I can assign probability to a random vector using jrandvar (joint random variable), but it is a tedious task as I had to enter the name of all vector elements A(‘t1’), A(‘t2’),…, A(‘t24’) and then enter whole 24 x 10 matrix with probability matrix as first column.
It is quite difficult if I need to change data.
Is there a way that I can read data (inside EMP annotation) from an external source?
Instead of thinking of the EMP info file as independent of your GAMS model - and using data from an external source in this file - you should think of this file as an extension of your GAMS model. If you use the put facility you can easily take data that is in your GAMS model and send it to the EMP info file. IMHO that’s the easiest way to do this.
You can read all about put files in the GAMS documentation: