Ask Your Question
0

Retrieving CON from Composite Load Model (CMLD)

asked 2019-06-18 12:58:12 -0500

boat14 gravatar image

Retrieving CON from Composite Load Model (CMLD)

Any tips on my code to retrieve some CON data from a Composite Load Model (CMLD)?

I'm hoping to retrieve the CON data so that I can programmatically iterate through some progressive parameter changes.

The problem is on my psspy.slmodind() call, the API documentation only has two options for STRING1 for the type of load model desired, 'CHARAC' and 'RELAY'. I think I need one for the CMLD but I'm not 100% sure.

I get an ierr 3: No model of type 'STRING1' for this load; 'IVAL' unchanged.

Here's the code (not working):

# Define CON start
ierr, con_index = psspy.slmodind(
 ctype='AREA',
 ibus=106,
 id='CMLDARU2',
 string1='CHARAC',      # This is the problem argument
 string2='CON'
)

# Define NCON start
ierr, con_num = psspy.slmodind(
 ctype='AREA',
 ibus=106,
 id='CMLDARU2',
 string1='CHARAC',      # This is the problem argument
 string2='NCON'
)

# Get total CON range
max_con_index = con_index + con_num

# Retrieve data from CON array
psspy.dlst(
 ntype=1,
 atype=[1],
 first=[con_index],
 last=[max_con_index]
)
edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2019-06-18 14:39:18 -0500

perolofl gravatar image

updated 2019-06-19 00:04:06 -0500

Argument id should be the id of the load, not the model name (CMLDARU2). Normally, the load id ’*’ is used to catch all loads in the area. The load id for the model is seen in the DYRE record for the model.

Edit: Example:

ierr, con_index = psspy.slmodind('AREA', 106, '*', 'CHARAC', 'CON')

to return the starting CON-index for the load characteristic model used for area 106

edit flag offensive delete link more

Comments

Thanks, I don't have enough points to upvote, but this solved the problem.

boat14 gravatar imageboat14 ( 2019-06-19 07:53:30 -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

1 follower

Stats

Asked: 2019-06-18 12:58:12 -0500

Seen: 23 times

Last updated: Jun 19