Device data manipulation related APIs - changgang/steps GitHub Wiki

get_bus_data

Format: get_bus_data(bus, par_type, par_name)
Description: Get bus data.
Args:

(1) bus: bus number.
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.

Rets:

(1) Value of parameter.

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, 0, 0.0, "", or False will be returned.

Example: N/A

get_generator_data

Format: get_generator_data(generator, par_type, par_name)
Description: Get generator data.
Args:

(1) generator: Generator device id in format of (bus, ickt)
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.

Rets:

(1) Value of parameter.

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, 0, 0.0, "", or False will be returned.

Example: N/A

get_wt_generator_data

Format: get_wt_generator_data(wt_generator, par_type, par_name)
Description: Get wind turbine generator data.
Args:

(1) wt_generator: Wind turbine generator device id in format of (bus, ickt)
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.

Rets:

(1) Value of parameter.

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, 0, 0.0, "", or False will be returned.

Example: N/A

get_pv_unit_data

Format: get_pv_unit_data(pv_unit, par_type, par_name)
Description: Get PV unit data.
Args:

(1) pv_unit: PV unit device id in format of (bus, ickt)
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.

Rets:

(1) Value of parameter.

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, 0, 0.0, "", or False will be returned.

Example: N/A

get_energy_storage_data

Format: get_energy_storage_data(energy_storage, par_type, par_name)
Description: Get energy storage data.
Args:

(1) energy_storage: Energy storage device id in format of (bus, ickt)
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.

Rets:

(1) Value of parameter.

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, 0, 0.0, "", or False will be returned.

Example: N/A

get_load_data

Format: get_load_data(load, par_type, par_name)
Description: Get load data.
Args:

(1) load: Load device id in format of (bus, ickt)
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.

Rets:

(1) Value of parameter.

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, 0, 0.0, "", or False will be returned.

Example: N/A

get_fixed_shunt_data

Format: get_fixed_shunt_data(fixed_shunt, par_type, par_name)
Description: Get fixed shunt data.
Args:

(1) fixed_shunt: Fixed shunt device id in format of (bus, ickt)
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.

Rets:

(1) Value of parameter.

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, 0, 0.0, "", or False will be returned.

Example: N/A

get_equivalent_device_data

Format: get_equivalent_device_data(equivalent_device, par_type, par_name)
Description: Get equivalent device data.
Args:

(1) equivalent_device: Equivalent device device id in format of (bus, ickt)
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.

Rets:

(1) Value of parameter.

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, 0, 0.0, "", or False will be returned.

Example: N/A

get_line_data

Format: get_line_data(line, par_type, par_name)
Description: Get tranmission line data.
Args:

(1) line: Transmission line device id in format of (ibus, jbus, ickt)
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.

Rets:

(1) Value of parameter.

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, 0, 0.0, "", or False will be returned.

Example: N/A

get_transformer_data

Format: get_transformer_data(transformer, par_type, side, par_name)
Description: Get transformer data.
Args:

(1) transformer: Transformer device id in format of (ibus, jbus, ickt) or (ibus, jbus, kbus, ickt).
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) side: String of side. One of {"PRIMARY", "SECONDARY", "TERTIARY", "TRANSFORMER"}
(4) par_name: String of parameter name.

Rets:

(1) Value of parameter.

Tips:

kbus can be omitted if kbus=0, a.k.a., (ibus, jbus, 0, ickt) can be simplified as (ibus, jbus, ickt).
The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, 0, 0.0, "", or False will be returned.

Example: N/A

get_hvdc_data

Format: get_hvdc_data(hvdc, par_type, side, par_name)
Description: Get HVDC link data.
Args:

(1) hvdc: HVDC link device id in format of (ibus, jbus, ickt)
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) side: String of side. One of {"RECTIFIER", "INVERTER", "HVDC"}
(4) par_name: String of parameter name.

Rets:

(1) Value of parameter.

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, 0, 0.0, "", or False will be returned.

Example: N/A

get_area_data

Format: get_area_data(area, par_type, par_name)
Description: Get area data.
Args:

(1) area: Area number.
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.

Rets:

(1) Value of parameter.

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, 0, 0.0, "", or False will be returned.

Example: N/A

get_zone_data

Format: get_zone_data(zone, par_type, par_name)
Description: Get zone data.
Args:

(1) zone: Zone number.
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.

Rets:

(1) Value of parameter.

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, 0, 0.0, "", or False will be returned.

Example: N/A

get_owner_data

Format: get_owner_data(owner, par_type, par_name)
Description: Get owner data.
Args:

(1) owner: Owner number.
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.

Rets:

(1) Value of parameter.

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, 0, 0.0, "", or False will be returned.

Example: N/A

set_bus_data

Format: set_bus_data(bus, par_type, par_name, value)
Description: Set bus data.
Args:

(1) bus: bus number.
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.
(4) value: Value of parameter.

Rets: N/A

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, nothing will be done.
The value MUST be consistent with the given parameter type. Otherwise, function may malfunction and package may exist with error.

Example: N/A

set_generator_data

Format: set_generator_data(generator, par_type, par_name, value)
Description: Set generator data.
Args:

(1) generator: Generator device id in format of (bus, ickt).
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.
(4) value: Value of parameter.

Rets: N/A

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, nothing will be done.
The value MUST be consistent with the given parameter type. Otherwise, function may malfunction and package may exist with error.

Example: N/A

set_wt_generator_data

Format: set_wt_generator_data(wt_generator, par_type, par_name, value)
Description: Set wind turbine generator data.
Args:

(1) wt_generator: Wind turbine generator device id in format of (bus, ickt).
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.
(4) value: Value of parameter.

Rets: N/A

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, nothing will be done.
The value MUST be consistent with the given parameter type. Otherwise, function may malfunction and package may exist with error.

Example: N/A

set_pv_unit_data

Format: set_pv_unit_data(pv_unit, par_type, par_name, value)
Description: Set PV unit data.
Args:

(1) pv_unit: PV unit device id in format of (bus, ickt).
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.
(4) value: Value of parameter.

Rets: N/A

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, nothing will be done.
The value MUST be consistent with the given parameter type. Otherwise, function may malfunction and package may exist with error.

Example: N/A

set_energy_storage_data

Format: set_energy_storage_data(energy_storage, par_type, par_name, value)
Description: Set energy storage data.
Args:

(1) energy_storage: Energy storage device id in format of (bus, ickt).
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.
(4) value: Value of parameter.

Rets: N/A

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, nothing will be done.
The value MUST be consistent with the given parameter type. Otherwise, function may malfunction and package may exist with error.

Example: N/A

set_generator_power

Format: set_generator_power(generator, s)
Description: Set generator power.
Args:

(1) generator: Generator device id in format of (bus, ickt).
(2) s: Complex power generation in MVA.

Rets: N/A

Tips: N/A

Example:

set_generator_power((1,"#1"), 100+20j)  
Example: N/A  

set_wt_generator_power

Format: set_wt_generator_power(wt_generator, s)
Description: Set wt generator power.
Args:

(1) wt_generator: WT generator device id in format of (bus, ickt).
(2) s: Complex power generation in MVA.

Rets: N/A

Tips: N/A

Example:

set_wt_generator_power((1,"#1"), 100+20j)  
Example: N/A  

set_pv_unit_power

Format: set_pv_unit_power(pv_unit, s)
Description: Set pv unit power.
Args:

(1) pv_unit: PV unit device id in format of (bus, ickt).
(2) s: Complex power generation in MVA.

Rets: N/A

Tips: N/A

Example:

set_pv_unit_power((1,"#1"), 100+20j)  
Example: N/A  

set_energy_storage_power

Format: set_energy_storage_power(energy_storage, s)
Description: Set energy storage power.
Args:

(1) energy_storage: Energy storage device id in format of (bus, ickt).
(2) s: Complex power generation in MVA.

Rets: N/A

Tips: N/A

Example:

set_energy_storage_power((1,"#1"), 100+20j)  
Example: N/A  

set_load_data

Format: set_load_data(load, par_type, par_name, value)
Description: Set load data.
Args:

(1) load: Load device id in format of (bus, ickt).
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.
(4) value: Value of parameter.

Rets: N/A

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, nothing will be done.
The value MUST be consistent with the given parameter type. Otherwise, function may malfunction and package may exist with error.

Example: N/A

set_load_power

Format: set_load_power(load, sp=None, si=None, sz=None)
Description: Set load power.
Args:

(1) load: Load device id in format of (bus, ickt).
(2) sp: Complex constant power load in MVA.
(3) si: Complex constant current load in MVA.
(4) sz: Complex constant impedance load in MVA.

Rets: N/A

Tips:

If the load component is None, the specific component is ignored.

Example:

set_load_power((1,"#1"), 100+20j) # set constant power part only  
set_load_power((1,"#1"), sz = 60+10j) # set constant impedance part only  
Example: N/A  

set_fixed_shunt_data

Format: set_fixed_shunt_data(fixed_shunt, par_type, par_name, value)
Description: Set fixed shunt data.
Args:

(1) fixed_shunt: Fixed shunt device id in format of (bus, ickt).
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.
(4) value: Value of parameter.

Rets: N/A

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, nothing will be done.
The value MUST be consistent with the given parameter type. Otherwise, function may malfunction and package may exist with error.

Example: N/A

set_equivalent_device_data

Format: set_equivalent_device_data(equivalent_device, par_type, par_name, value)
Description: Set equivalent device data.
Args:

(1) equivalent_device: Equivalent device device id in format of (bus, ickt).
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.
(4) value: Value of parameter.

Rets: N/A

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, nothing will be done.
The value MUST be consistent with the given parameter type. Otherwise, function may malfunction and package may exist with error.

Example: N/A

set_line_data

Format: set_line_data(line, par_type, par_name, value)
Description: Set transmission line data.
Args:

(1) line: Transmission line device id in format of (ibus, jbus, ickt).
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.
(4) value: Value of parameter.

Rets: N/A

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, nothing will be done.
The value MUST be consistent with the given parameter type. Otherwise, function may malfunction and package may exist with error.

Example: N/A

set_transformer_data

Format: set_transformer_data(transformer, par_type, side, par_name, value)
Description: Set transformer data.
Args:

(1) transformer: Transformer device id in format of (ibus, jbus, ickt) or (ibus, jbus, kbus, ickt).
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) side: String of side. One of {"PRIMARY", "SECONDARY", "TERTIARY", "TRANSFORMER"}
(4) par_name: String of parameter name.
(5) value: Value of parameter.

Rets: N/A

Tips:

kbus can be omitted if kbus=0, a.k.a., (ibus, jbus, 0, ickt) can be simplified as (ibus, jbus, ickt).
The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, nothing will be done.
The value MUST be consistent with the given parameter type. Otherwise, function may malfunction and package may exist with error.

Example: N/A

set_hvdc_data

Format: set_hvdc_data(hvdc, par_type, side, par_name, value)
Description: Set HVDC link data.
Args:

(1) hvdc: HVDC link device id in format of (ibus, jbus, ickt).
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) side: String of side. One of {"RECTIFIER", "INVERTER", "HVDC"}
(4) par_name: String of parameter name.
(5) value: Value of parameter.

Rets: N/A

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, nothing will be done.
The value MUST be consistent with the given parameter type. Otherwise, function may malfunction and package may exist with error.

Example: N/A

set_hvdc_power

Format: set_hvdc_power(hvdc, p)
Description: Set HVDC link power command.
Args:

(1) hvdc: HVDC link device id in format of (ibus, jbus, ickt).
(2) p: power command in MW.

Rets: N/A

Example:

set_hvdc_power((1,2,"DC1"), 2000)  
Example: N/A  

set_area_data

Format: set_area_data(area, par_type, par_name, value)
Description: Set area data.
Args:

(1) ownew: Area number.
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.
(4) value: Value of parameter.

Rets: N/A

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, nothing will be done.
The value MUST be consistent with the given parameter type. Otherwise, function may malfunction and package may exist with error.

Example: N/A

set_zone_data

Format: set_zone_data(zone, par_type, par_name, value)
Description: Set zone data.
Args:

(1) ownew: Zone number.
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.
(4) value: Value of parameter.

Rets: N/A

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, nothing will be done.
The value MUST be consistent with the given parameter type. Otherwise, function may malfunction and package may exist with error.

Example: N/A

set_owner_data

Format: set_owner_data(owner, par_type, par_name, value)
Description: Set owner data.
Args:

(1) ownew: Owner number.
(2) par_type: String of parameter type. Choose one from {"I", "F", "D", "S", "B"}.
(3) par_name: String of parameter name.
(4) value: Value of parameter.

Rets: N/A

Tips:

The par_type meaning: "I": integer number, "F" or "D": float number, "S": string, "B": boolean data.
The type of given parameter MUST be consistent with the given parameter type. Otherwise, nothing will be done.
The value MUST be consistent with the given parameter type. Otherwise, function may malfunction and package may exist with error.

Example: N/A