Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Retrieving CON from Composite Load Model (CMLD)

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]
)