Ask Your Question
1

RDCH to BAT_*

asked 2013-04-19 07:02:56 -0500

jsexauer gravatar image

Does anyone know of clever way to convert an idv like:

RDCH
1
111,BUS_INFO
222,BUS_INFO
0
111,LOAD_INFO
Q

into something like:

BAT_BUS_DATA,111,BUS_INFO
BAT_BUS_DATA,111,BUS_INFO
BAT_LOAD_DATA_3,111,LOAD_INFO
edit retag flag offensive close merge delete

Comments

1

Along these lines - it would be useful to have some kind of converter which takes specific contingencies from a CON file and creates IDEVs for more detailed analysis. I made a script which does this (not very robust) but does anyone have a "clever" solution for this (rather than recording)?

cajief gravatar imagecajief ( 2013-04-23 09:28:55 -0500 )edit

H @cajief, so your IDEV would apply the contingency as batch commands?

JervisW gravatar imageJervisW ( 2013-04-26 01:02:55 -0500 )edit

Yeah that's the idea. IDEV or Python, just something so that you can easily investigate contingencies of interest in isolation. Some CON files I've used have up to the max number of elements (18 I think) per contingency and it's a PITA to disable each element, especially for N-1-1.

cajief gravatar imagecajief ( 2013-05-09 10:55:38 -0500 )edit

It would be great to have. The solution would be similar to jsexauer's though. Writing a parser for a CON file would also be a pain.

JervisW gravatar imageJervisW ( 2013-05-10 05:54:59 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-04-22 02:42:26 -0500

JervisW gravatar image

By far the cleverest would be if recording would work, but it doesn't. And the LOAD_INFO format is subtly different between RDCH and BATCH commands

I, ID, STATUS, AREA, ZONE, PL, QL, IP, IQ, YP, YQ, OWNER, SCALE

versus

# owner and scale are part of the INTGAR values, not at the end.
BAT_LOAD_DATA_3 I 'ID' INTGAR(1)...INTGAR(5) REALAR(1)...REALAR(6)

That would make writing a parser for this decidedly not clever looking and rather tedious.

I'm curious, how did you end up doing it?

edit flag offensive delete link more

Comments

1

Yea, I tried the recording thing too, but sadly that doesn't work. I never did resolve this. I've just decided to go a different direction. If I get bored write a parser.

jsexauer gravatar imagejsexauer ( 2013-04-23 14:24:23 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Stats

Asked: 2013-04-19 07:02:56 -0500

Seen: 865 times

Last updated: Apr 22 '13