Posts: 1,914
Threads: 25
Likes Received: 50 in 43 posts
Likes Given: 13
Joined: Jun 2010
04-07-2023, 08:42 PM
(This post was last modified: 04-07-2023, 09:34 PM by Antti-L.)
And then you could also easily add postprocess casename.vd to that cmd.file.
Sorry that I forgot to change one leftover "demo5" in the cmd to the case name. I updated the zip file now.
Posts: 9
Threads: 0
Likes Received: 1 in 1 posts
Likes Given: 1
Joined: Oct 2020
07-07-2023, 10:42 AM
(This post was last modified: 07-07-2023, 12:01 PM by rohit.)
(04-07-2023, 02:39 PM)VictorG Wrote: Hello
thank you for your answer. It does not meet my need yet. I will try to be more explicit.
My goal is to automate the postprocess of my vd files, I have a python command I want to execute after every run on the newly created vd.
I have few constraints:
-python procedure called after gdx2veda has created the vd file
-be sure it is the newly vd file that is processed and not an older one
-the procedure is linked to the model and the gams_wrk can be executed on different computers with no extra adjustment of the code as long as the computer has the python script
I thought that the attribute CmdF_bot was well suited for my problem because it can store the information of the modification in the dd files and the cmd is modified automatically each time dd files are generated. However there is a small difficulty here because the regular scenarios in excel contain input data while the casename (prefix of the vd)
is linked to the run manager.
The solution that would fit my need is to have an access to the veda variables of the Run manager with the attribute CmdF_bot. I noticed the %1 flag which corresponds to the case name in the VT_GAMS.CMD in the TIMES source code.
A suggestion would be to have an excel file with the following string 'postprocess %1.vd' for CmdF_bot in an excel file and that is interpreted as writing a line after the gdx2veda in the cmd corresponding to: postprocess casename.vd
I hope it is clearer
Dear Victor,
We have released Veda version v2.14.1.1 which allows you access to case name and vd file name in vtrun.cmd file via $case_name and $vd_file_name variables respectively.
You can use them with
CmdF_bot attribute. This version can be downloaded
here.
Posts: 43
Threads: 4
Likes Received: 0 in 0 posts
Likes Given: 3
Joined: Apr 2022
Thank you Antti and Rohit for your help.
I tried both solutions, I have a preference for the one that define the variables in VTRUN.cmd in the first lines because I can keep the date in the name and it does not need an extra file.
Posts: 1,914
Threads: 25
Likes Received: 50 in 43 posts
Likes Given: 13
Joined: Jun 2010
10-07-2023, 11:53 PM
Thanks for the update. Good the hear that you now have a comfortable solution!
Posts: 43
Threads: 4
Likes Received: 0 in 0 posts
Likes Given: 3
Joined: Apr 2022
Following on this thread, would it be possible to implement in veda a new attribute that inserts a line in the VTRUN.cmd before the gams call please ? Something similar to CmdF_bot but that adds a line between the lines that starts with Title and Call. My goal is to do some preprocessing before TIMES starts.
Posts: 1,040
Threads: 41
Likes Received:
16 in 13 posts
Likes Given: 22
Joined: May 2010
Reputation:
16
Sure, the next version will support "CmdF_top".
Posts: 9
Threads: 0
Likes Received: 1 in 1 posts
Likes Given: 1
Joined: Oct 2020
New Veda version 2.16.1.1 supports
"CmdF_top" attribute, and can be downloaded
here.
Posts: 43
Threads: 4
Likes Received: 0 in 0 posts
Likes Given: 3
Joined: Apr 2022
(26-07-2023, 10:29 AM)rohit Wrote: New Veda version 2.16.1.1 supports "CmdF_top" attribute, and can be downloaded here.
Thank you for this new feature, I managed to use it.
Posts: 51
Threads: 19
Likes Received: 0 in 0 posts
Likes Given: 0
Joined: Jul 2020
Dear Forum,
Is there an option under Veda 2.0 enabling to tick or untick the datetime stamp on .vd files, similar to the feature in Veda-FE?
Lucas
Posts: 1,040
Threads: 41
Likes Received:
16 in 13 posts
Likes Given: 22
Joined: May 2010
Reputation:
16
I would consider this feature of putting date stamp on VD file names redundant after introducing the concept of "study".
We will include this option in the next version.