Hello,
I want to change the sequence of the dimensions of the parameter tch from tch (c,*,t) to tch(t,c,*). Is that possible and if how?
Thanks in advance
Change the sequence of the dimensions
Re: Change the sequence of the dimensions
There is no magic to this. Just do it in the declaration and at every place you use tch. There is not automation help to refactor your code this way (neither in the IDE not in Studio). You need to do this manually.
-Michael
-Michael
-
- User
- Posts: 3
- Joined: 5 years ago
Re: Change the sequence of the dimensions
Hi Michael,
thanks for your reply. I must have been unprecise.
Due to the data structure from an Excel input (which I don't want to change), it is not possible to change the declaration. I was wondering whether there is a leaner way than introducing a second parameter tch2(t,c,*) = tch(c,*,t).
thanks for your reply. I must have been unprecise.
Due to the data structure from an Excel input (which I don't want to change), it is not possible to change the declaration. I was wondering whether there is a leaner way than introducing a second parameter tch2(t,c,*) = tch(c,*,t).
Re: Change the sequence of the dimensions
No, unfortunately not. The following code does a fast copy and frees up memory used by tch (if this is not needed anymore):
-Michael
Code: Select all
Parameter tch(c,*,t), tch2(t,c,*);
$gdxin fromExcel
$load tch
option tch2<tch, clear=tch;
-
- User
- Posts: 3
- Joined: 5 years ago
Re: Change the sequence of the dimensions
Too bad. Anyway thanks for your support!