Veda2.0 Released!


How to model a storage
#16
Ok, so you are not familiar with the model periods.  TIMES supports flexible model periods, and in large models that is very useful for reducing the model size.  Therefore, many models use mostly 5-year periods or even 10-year periods farther in the future.

So, you are missing the point that in your model (derivative of Demo 4) the period 2006, which is labelled according to the Milestone year 2006, represents two years, 2006 and 2007.  Any demand defined for 2006 must be satisfied in two years, 2006 and 2007.  Because the demand has been set at 3.6, and there is no direct supply in the period 2006, that same demand in the two years 2006 and 2007 must be satisfied through the storage charged in 2005.  Consequently, the storage must be charged enough in 2005 to satisfy the two years' demand within the next period. Otherwise things would become inconsistent.

The storage level therefore has to be 6 at the beginning of 2006, and 3 at the beginning of 2007, and is zero at the end of 2007.  The storage is discharged by 3 units in both 2006 and 2007.  Is that clear now?  Would you now agree that the results are as expected?

Of course you could also define all periods to represent a single year each, and then you could set the demand in 2007 to zero. I guess you thought the demand would be zero in 2007, even though the period 2006 included 2007? But anyway, the model period definition is very basic stuff, which I think should have been clear if you had read the documentation.
Reply
#17
(21-06-2021, 09:53 PM)Antti-L Wrote: Ok, so you are not familiar with the model periods.  TIMES supports flexible model periods, and in large models that is very useful for reducing the model size.  Therefore, many models use mostly 5-year periods or even 10-year periods farther in the future.

So, you are missing the point that in your model (derivative of Demo 4) the period 2006, which is labelled according to the Milestone year 2006, represents two years, 2006 and 2007.  Any demand defined for 2006 must be satisfied in two years, 2006 and 2007.  Because the demand has been set at 3.6, and there is no direct supply in the period 2006, that same demand in the two years 2006 and 2007 must be satisfied through the storage charged in 2005.  Consequently, the storage must be charged enough in 2005 to satisfy the two years' demand within the next period. Otherwise things would become inconsistent.

The storage level therefore has to be 6 at the beginning of 2006, and 3 at the beginning of 2007, and is zero at the end of 2007.  The storage is discharged by 3 units in both 2006 and 2007.  Is that clear now?  Would you now agree that the results are as expected?

Of course you could also define all periods to represent a single year each, and then you could set the demand in 2007 to zero. I guess you thought the demand would be zero in 2007, even though the period 2006 included 2007? But anyway, the model period definition is very basic stuff, which I think should have been clear if you had read the documentation.

Thank you for the clarification. With 2007, that's great. 

In this chat, please, do not assume that VEDA documentation is easy for a beginner or that one has not read it because the "basics" was not understood... As as example, related to periods, in DEMO 1, it is specified 2 periods (Figure 39 of Documentation part IV) - the first with 1 year, the second with 2 years. The Demand is defined for 2005 only (Fig. 49 of Documentation part IV), which I assumed to be for the period 1, since 2005 is the start year (Figure 39 of Documentation part IV). Then, the results show outputs for 2005 and for 2006 (Fig. 60 Documentation part IV) and a text above figure 59: "The demand and supply balance of COA is constant between 2005 and 2006, as described above in Section 3.1.4.5. ". Section 3.1.4.5 brings Figure 49 mentioned above... Thus, for a me, as a beginner user, there are questions everywhere in the documentation. Some basics in DEMO 1 is still unclear for me. For instance, I still trying to understand the output in 2006 in this DEMO 1. 

Related to the flow, I believe got it. I really appreciate the help. 

This brings us to the other questions:

Q2) About FLO_FUNC(r,y,'STORAGE','DEMMIC1','DUMNRG','ANNUAL') = Value:  ---  Must the order of the columns in excel correspond to the order of the parameters in the function? Ex.: In the excel file, Comm-OUT appears before the CommGrp. So, line 19 (range B19 to P19)  in "VT_REG_PRI_V04-corrected.xlsx" is created to match the parameters order of the function FLO_FUNC. Is it right?


In the sheet "DemTechs_TPS": 
Q3) In cell O25, the storage capacity was set to 2. But, there was 6 units of AIRSTOCK in the flow. Could you give a little word about it? 

Q4) CAEXSTORAGE has no auxiliary commodities. Why cell O24 empty is not empty

Q5) When should I use the column "Output"? If the Output is empty, does that mean a default equals to 1?
I used the column "INPUT" and "OUTPUT" based on the explanations in https://forum.kanors-emr.org/showthread.php?tid=965&highlight=two+inputs. I am not sure if I understood it well. I have understood that the numbers describing the amount of inputs and outputs should be specified.  Documentation does not help a lot about it (Figure OUTPUT.png)


Attached Files Thumbnail(s)
   
Reply
#18
> Must the order of the columns in excel correspond to the order of the parameters in the function? Ex.: In the excel file, Comm-OUT appears before the CommGrp. So, line 19 (range B19 to P19)  in "VT_REG_PRI_V04-corrected.xlsx" is created to match the parameters order of the function FLO_FUNC. Is it right?

AFAIK, the order of the columns in the Excel file does not matter (I am not a VEDA expert, but this I do know).  It is only important that the first CG in FLO_FUNC goes into CommGrp column and the second in a commodity column. (If many commodity columns are filled, then the VEDA Attributes master should tell which one is taken.)

> In the sheet "DemTechs_TPS":
Q3) In cell O25, the storage capacity was set to 2. But, there was 6 units of AIRSTOCK in the flow. Could you give a little word about it?


Cell O25 defines NCAP_AFC(ACT).  NCAP_AFC defines availability factors.  Specifically, NCAP_AFC(ACT) defines an availability factor for the storage level (for the amount stored). See the  documentation, Section 4.3.7 Availability factors for storage processes.  The value 2 tells that the storage level can be at most 2 × capacity × PRC_CAPACT (for an IPS), i.e. two times the nominal maximum annual output. This is just an example number fitting the process operation with an output capacity of 3.  (But actually, the CAEXSTORAGE process did not have any capacity variable because it has no capacity-related costs or bounds; the CAEXSTORAG2 process does have a fixed cost and thus also capacity.)

> Q4) CAEXSTORAGE has no auxiliary commodities. Why cell O24 empty is not empty?

Cell O24 defines NCAP_AFC(AIRSTOCK).  NCAP_AFC defines availability factors.  Specifically, NCAP_AFC(AIRSTOCK) defines an availability factor for the output commodity AIRSTOCK.  The value 1 tells that the maximum output level can be at most 1 × capacity × PRC_CAPACT.  This is just an example number fitting the process operation with an output capacity of 3.

> Q5) When should I use the column "Output"? If the Output is empty, does that mean a default equals to 1?

Use Input/Output when you want to define an input/output flow in proportion to the activity.  They cannot be used for PCG commodities (it will be ignored). And they can only be used for normal processes.
Reply
#19
I acknowledge that you have made some useful feedback by bringing up issues related to the digestibility of the ETSAP-TIMES documentation.

If you have any concrete suggestions for improving the documentation, please let ETSAP know. In general, you can perhaps best do that by emailing the ETSAP support (check the ETSAP site).

I have myself had no role in writing Part IV (the VEDA-related doc), which you seemed have most issues about, and so I would myself not be addressing those about Part IV. But concerning Part II of the documentation ("reference manual"), please let me know if you have any suggestions for improvements. You could present them here if you like, but maybe better on the ETSAP Forum.
Reply
#20
(22-06-2021, 03:38 AM)Antti-L Wrote: I acknowledge that you have made some useful feedback by bringing up issues related to the digestibility of the ETSAP-TIMES documentation.

If you have any concrete suggestions for improving the documentation, please let ETSAP know. In general, you can perhaps best do that by emailing the ETSAP support (check the ETSAP site).

I have myself had no role in writing Part IV (the VEDA-related doc), which you seemed have most issues about, and so I would myself not be addressing those about Part IV. But concerning Part II of the documentation ("reference manual"), please let me know if you have any suggestions for improvements. You could present them here if you like, but maybe better on the ETSAP Forum.

Thank you Antti-L. I really appreciate the help.
Reply
#21
Hi Anttti_L,

I have a new issue related to the one before. I would like to implement a similar storage system, a adiabatic CAES like the one in the figure "system.jpg". I put the excel file also attached. The only modifications are in sheet "DemTechs_TPS". 

My difficulties are :

a) to implement a device with 2 inputs and 2 outputs, named CONV1_ACAES (here I used the ideas from https://forum.kanors-emr.org/showthread.php?tid=965&highlight=two+inputs, but I not sure if the columns input and output were modelled correctly. Actually, I have the error during the solving process in fig. error.png. ) 

b) to verify if a storage with 2 input and 2 outputs can be modelled putting both ressources in the PrimaryCG. 

Could you please give me a help to model the system?

thank you,
cordially,


Attached Files Thumbnail(s)
       

.xlsx   VT_REG_PRI_V04.xlsx (Size: 176.37 KB / Downloads: 1)
Reply
#22
Ok, I see that you would like some further help on storage modeling, addressing me specifically.

However, I myself find the information you have given somewhat insufficient for helping you efficiently.  Please note that the Forum users who give this kind of help are fellow modelers helping others voluntarily on their free time.  And so, it would be thoughtful of you, if you would try and help the helpers by providing all the information relevant to resolving your questions. Therefore, before trying to answer your questions, could you please first clarify the following:

1. You have an error during the solving process, but you are not providing the listing file (*.LST), which would reveal the cause of the error.  Could you please provide the listing file (zipped) whenever you ask about any such issue.

2. Use the latest version of the TIMES code to avoid any confusion that may be caused by using older versions:  Your screenshot show that you are using TIMES v4.5.2.  Could you please upgrade to the current version, v4.5.6?  Use the VEDA update tool, or use Manual download Link

3. It  seems that you may be wishing to define the PCG (primary group) of a storage process in such a way that it contains two commodities (AIRSTOCK, HEAT), both of type NRG, and there seems to be no other NRG commodities in the process topology.  Yet, you are not defining NRG as the PCG, but instead, you have written "AIRSTOCK, HEAT" in the PCG column of the FI_Process table.  Could you please explain the reason for putting "AIRSTOCK, HEAT" as the PCG group name?  Have you defined a commodity group having such a name in SysSettings?

4. Any storage process in TIMES includes only a single "pool" for the quantity stored.  Can you explain how your storage process (with AIRSTOCK, HEAT as both inputs, outputs, and members of the PCG?) is supposed to operate: Should it really be charged with heat and air in free proportions, the mixture then being stored in the storage pool for years?  And the discharge is again heat and air, in free proportions, from the single storage pool?  I can understand that e.g. in an integrated electrolyzer+storage process both hydrogen and electricity might be two inputs that can be charged basically in free proportions (but electricity flow limited by the electrolyzer capacity), and the stored quantity would be hydrogen, but such a process would have a single discharge commodity: hydrogen.  Do you really mean that air and heat could also be substituted like that, and even concerning the discharge outputs?

5. I can see you have defined NCAP_AFC(ACT)= 10^6.  Could you please explain what is the motivation for such a huge number?
Reply
#23
(05-07-2021, 07:43 PM)Antti-L Wrote: Ok, I see that you would like some further help on storage modeling, addressing me specifically.

However, I myself find the information you have given somewhat insufficient for helping you efficiently.  Please note that the Forum users who give this kind of help are fellow modelers helping others voluntarily on their free time.  And so, it would be thoughtful of you, if you would try and help the helpers by providing all the information relevant to resolving your questions. Therefore, before trying to answer your questions, could you please first clarify the following:

1. You have an error during the solving process, but you are not providing the listing file (*.LST), which would reveal the cause of the error.  Could you please provide the listing file (zipped) whenever you ask about any such issue.

2. Use the latest version of the TIMES code to avoid any confusion that may be caused by using older versions:  Your screenshot show that you are using TIMES v4.5.2.  Could you please upgrade to the current version, v4.5.6?  Use the VEDA update tool, or use Manual download Link

3. It  seems that you may be wishing to define the PCG (primary group) of a storage process in such a way that it contains two commodities (AIRSTOCK, HEAT), both of type NRG, and there seems to be no other NRG commodities in the process topology.  Yet, you are not defining NRG as the PCG, but instead, you have written "AIRSTOCK, HEAT" in the PCG column of the FI_Process table.  Could you please explain the reason for putting "AIRSTOCK, HEAT" as the PCG group name?  Have you defined a commodity group having such a name in SysSettings?

4. Any storage process in TIMES includes only a single "pool" for the quantity stored.  Can you explain how your storage process (with AIRSTOCK, HEAT as both inputs, outputs, and members of the PCG?) is supposed to operate: Should it really be charged with heat and air in free proportions, the mixture then being stored in the storage pool for years?  And the discharge is again heat and air, in free proportions, from the single storage pool?  I can understand that e.g. in an integrated electrolyzer+storage process both hydrogen and electricity might be two inputs that can be charged basically in free proportions (but electricity flow limited by the electrolyzer capacity), and the stored quantity would be hydrogen, but such a process would have a single discharge commodity: hydrogen.  Do you really mean that air and heat could also be substituted like that, and even concerning the discharge outputs?

5. I can see you have defined NCAP_AFC(ACT)= 10^6.  Could you please explain what is the motivation for such a huge number?

Thank you for the reply.

However, I myself find the information you have given somewhat insufficient for helping you efficiently.  Please note that the Forum users who give this kind of help are fellow modelers helping others voluntarily on their free time.  And so, it would be thoughtful of you, if you would try and help the helpers by providing all the information relevant to resolving your questions. Therefore, before trying to answer your questions, could you please first clarify the following:

Oh really sorry for that.
Please, if you are not free to help, let it go. 
Actually, I still learning veda/times and it includes to also learning the meaning of your questions in such a way to help the helpers. 

1. You have an error during the solving process, but you are not providing the listing file (*.LST), which would reveal the cause of the error.  Could you please provide the listing file (zipped) whenever you ask about any such issue.

Thank you for the comment. Files provided. 

2. Use the latest version of the TIMES code to avoid any confusion that may be caused by using older versions:  Your screenshot show that you are using TIMES v4.5.2.  Could you please upgrade to the current version, v4.5.6?  Use the VEDA update tool, or use Manual download Link
ok.

3. It  seems that you may be wishing to define the PCG (primary group) of a storage process in such a way that it contains two commodities (AIRSTOCK, HEAT), both of type NRG, and there seems to be no other NRG commodities in the process topology.  Yet, you are not defining NRG as the PCG, but instead, you have written "AIRSTOCK, HEAT" in the PCG column of the FI_Process table.  Could you please explain the reason for putting "AIRSTOCK, HEAT" as the PCG group name?  Have you defined a commodity group having such a name in SysSettings?

As you have done in cell AA20 with one commodity, I just tried to include now 2 commodities in the PCG (cell AA26) without changing anything in SysSettings. Initially, I tried to put NRG in that cell  (no success). Then I tried another idea based on the dummy you show me before - no success (I attached this file here).

4. Any storage process in TIMES includes only a single "pool" for the quantity stored.  Can you explain how your storage process (with AIRSTOCK, HEAT as both inputs, outputs, and members of the PCG?) is supposed to operate: Should it really be charged with heat and air in free proportions, the mixture then being stored in the storage pool for years?  And the discharge is again heat and air, in free proportions, from the single storage pool?  I can understand that e.g. in an integrated electrolyzer+storage process both hydrogen and electricity might be two inputs that can be charged basically in free proportions (but electricity flow limited by the electrolyzer capacity), and the stored quantity would be hydrogen, but such a process would have a single discharge commodity: hydrogen.  Do you really mean that air and heat could also be substituted like that, and even concerning the discharge outputs?

Can you explain how your storage process (with AIRSTOCK, HEAT as both inputs, outputs, and members of the PCG?)  
Do you really mean that air and heat could also be substituted like that, and even concerning the discharge outputs? 
My storage has 2 inputs, 2 outputs with efficiency 1 for both ressources - it can be any ressource. I would like to know how to model it in veda.  Actually, I tried also the file attached, without success. 

Should it really be charged with heat and air in free proportions, the mixture then being stored in the storage pool for years?  
For now, yes. In the future, I will play with lower time slices. 

And the discharge is again heat and air, in free proportions, from the single storage pool? 
Yes. 

And the discharge is again heat and air, in free proportions, from the single storage pool?  I can understand that e.g. in an integrated electrolyzer+storage process both hydrogen and electricity might be two inputs that can be charged basically in free proportions (but electricity flow limited by the electrolyzer capacity), and the stored quantity would be hydrogen, but such a process would have a single discharge commodity: hydrogen. 

ok

Do you really mean that air and heat could also be substituted like that, and even concerning the discharge outputs? 
I do not understand this question.  H2 could be used to provide heat for the baby system I am trying to model. However, I am not defining an electrolyzer, for now. 

5. I can see you have defined NCAP_AFC(ACT)= 10^6.  Could you please explain what is the motivation for such a huge number?
For now,  I have no constraint on it. In addition, I am trying to test what happens in the matrix of Ax<=b with number from 10^(-6) to 10^6. But, this is beyond the syntaxe of veda. You can put it = 1000 if you want. There is no problem.


Attached Files
.zip   DemoS_004 - Copy4.zip (Size: 5.75 KB / Downloads: 1)
.xlsx   VT_REG_PRI_V04.xlsx (Size: 176.44 KB / Downloads: 1)
Reply
#24
Thanks for these clarifications.

The listing files in the ZIP reveal that you have not defined any commodity group named "AIRSTOCK, HEAT", and therefore you will of course get a GAMS domain violation error because you have defined PCG="AIRSTOCK, HEAT".  So, it is due to your modeling error.

> As you have done in cell AA20 with one commodity, I just tried to include now 2 commodities in the PCG (cell AA26) without changing anything in SysSettings. Initially, I tried to put NRG in that cell  (no success). Then I tried another idea based on the dummy will show me - no success (I attached this file here).

As mentioned many times already, if you want to define 2 commodities in the PCG, you must define the PCG accordingly, defining it as a group which contains those 2 commodities.  Using NRG would be the easiest way here, and I just verified that it works as expected, see the file attached. I am afraid don't understand the final remark : "Then I tried another idea based on the dummy will show me - no success (I attached this file here)."  I could not see any dummy approach.

Therefore, if you claim that there is "no success" when using a proper group name (NRG), I am very confused. Please elaborate in detail what you mean by no success.  If you try the attached, are you still getting "no success", and if so, what do you mean by that?

.xlsx   VT_REG_PRI_V04.xlsx (Size: 171.76 KB / Downloads: 1)
Reply
#25
Additional remark concerning domain violations:
If you have upgraded to TIMES v4.5.6, you should notice that if you do have domain violations in your model, the GAMS run still completes normally, unlike with TIMES v4.5.2.  This is because many TIMES users want that the model should be run to completion regardless of domain violations, as in many cases such violations can be considered harmless.  The GAMS warnings are still issued and you can also see a warning in QA_Check.log that domain violations have been filtered out.  Due to changes in GAMS v34.3 (which you are using), this more "user friendly" handling of domain violations did not work in TIMES v4.5.2 under GAMS v34.3, but works again in v4.5.6.

In your case, however, the domain violation was not harmless but a serious modeling error, which prevented your storage process from working.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)