Skip to content

Commit

Permalink
change LINE in stepspy to AC LINE. but stepspy is not updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
changgang committed Mar 18, 2024
1 parent b3ed821 commit 8b9fa64
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 32 deletions.
14 changes: 7 additions & 7 deletions code/steps/STEPS.depend
Original file line number Diff line number Diff line change
Expand Up @@ -2731,7 +2731,7 @@
"header/apis/steps_api_search_buffer.h"
<iostream>

1710225936 source:d:\steps\code\steps\source\apis\steps_api_search_devices.cpp
1710517339 source:d:\steps\code\steps\source\apis\steps_api_search_devices.cpp
<istream>
"header/apis/steps_api.h"
"header/apis/steps_api_common.h"
Expand Down Expand Up @@ -3917,7 +3917,7 @@
<iostream>
<algorithm>

1710222833 source:d:\steps\code\steps\source\data_imexporter\steps_dynamics_imexporter.cpp
1710731464 source:d:\steps\code\steps\source\data_imexporter\steps_dynamics_imexporter.cpp
"header/data_imexporter/steps_imexporter.h"
"header/basic/utility.h"
"header/steps_namespace.h"
Expand Down Expand Up @@ -4399,7 +4399,7 @@
<iostream>
<cstdio>

1710162214 source:d:\steps\code\steps\source\dynamic_model_database.cpp
1710731456 source:d:\steps\code\steps\source\dynamic_model_database.cpp
"header/dynamic_model_database.h"
"header/STEPS.h"
"header/steps_namespace.h"
Expand Down Expand Up @@ -4816,7 +4816,7 @@
<cstdio>
<cmath>

1710221210 source:d:\steps\code\steps\source\model\model.cpp
1710731086 source:d:\steps\code\steps\source\model\model.cpp
"header/model/model.h"
<cstdio>
"header/basic/utility.h"
Expand Down Expand Up @@ -5759,7 +5759,7 @@
"header/model/wtg_models/wt_aerodynamic_model/wt_aerodynamic_model.h"
<cstdlib>

1697457172 source:d:\steps\code\steps\source\model\wtg_models\wt_aerodynamic_model\wt_aerodynamic_model.cpp
1710733859 source:d:\steps\code\steps\source\model\wtg_models\wt_aerodynamic_model\wt_aerodynamic_model.cpp
"header/model/wtg_models/wt_aerodynamic_model/wt_aerodynamic_model.h"
"header/basic/utility.h"
"header/STEPS.h"
Expand Down Expand Up @@ -6086,7 +6086,7 @@
<cstdio>
<cmath>

1710227343 source:d:\steps\code\steps\source\power_system_database.cpp
1710730572 source:d:\steps\code\steps\source\power_system_database.cpp
"header/power_system_database.h"
"header/STEPS.h"
"header/steps_namespace.h"
Expand Down Expand Up @@ -7034,7 +7034,7 @@
"header/model/lcc_hvdc2t_model/lcc_hvdc2t_model_test.h"
"header/STEPS.h"

1710218439 source:d:\steps\code\steps\source\device\lcc_hvdc2t.cpp
1710729251 source:d:\steps\code\steps\source\device\lcc_hvdc2t.cpp
"header/device/lcc_hvdc2t.h"
"header/basic/utility.h"
"header/basic/constants.h"
Expand Down
4 changes: 2 additions & 2 deletions code/steps/source/device/lcc_hvdc2t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ void LCC_HVDC2T::set_model(MODEL* model)
if(model != NULL and model->has_allowed_device_type(STEPS_LCC_HVDC2T))
{
model->set_device_id(get_device_id());
if(model->get_model_type()=="LCC_HVDC2T")
if(model->get_model_type()=="2T LCC HVDC")
{
set_2t_lcc_hvdc_model((LCC_HVDC2T_MODEL*) model);
return;
Expand All @@ -1085,7 +1085,7 @@ void LCC_HVDC2T::set_model(MODEL* model)
MODEL* LCC_HVDC2T::get_model_of_type(string model_type, unsigned int index)
{
model_type = string2upper(model_type);
if(model_type=="LCC_HVDC2T")
if(model_type=="2T LCC HVDC")
return get_2t_lcc_hvdc_model();
if(model_type=="AUXILIARY SIGNAL")
return get_auxiliary_signal_model();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ void WT_AERODYNAMIC_MODEL::initialize_pitch_angle_and_turbine_speed_with_mppt_mo
++iter;
if(iter>iter_max)
{
osstream<<"Warning. Failed to initialize pitch angle and turbine speed within "<<iter_max<<" iterations when turbine speed mode is WT_MPPT_MODE."<<endl
osstream<<"Warning. Failed to initialize pitch angle and turbine speed for "<<gen->get_compound_device_name()<<" within "<<iter_max<<" iterations when turbine speed mode is WT_MPPT_MODE."<<endl
<<"Initial pitch angle is set as "<<pitch<<" deg, and initial turbine speed is set as "<<w_mppt<<" rad/s";
toolkit.show_information_with_leading_time_stamp(osstream);
set_initial_pitch_angle_in_deg(pitch);
Expand Down
24 changes: 24 additions & 0 deletions code/steps/source/power_system_database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4675,9 +4675,33 @@ void POWER_SYSTEM_DATABASE::check_wt_generator_related_dynamic_data()
if(pitchmodel!=NULL)
pitchmodel->check();

WT_VRT_MODEL * vrtmodel = generator->get_wt_vrt_model();
if(vrtmodel!=NULL)
vrtmodel->check();

WT_RELAY_MODEL* relaymodel = generator->get_wt_relay_model();
if(relaymodel!=NULL)
relaymodel->check();

WIND_SPEED_MODEL* windmodel = generator->get_wind_speed_model();
if(windmodel!=NULL)
windmodel->check();


if(toolkit->is_detailed_log_enabled())
{
ostringstream osstream;
osstream<<"Model entry address of "<<generator->get_compound_device_name()<<":\n"
<<"WT Generator: "<<genmodel<<"\n"
<<"Electrical: "<<elecmodel<<"\n"
<<"Aero dyanmic: "<<aerdmodel<<"\n"
<<"Turbine: "<<turbmodel<<"\n"
<<"Pitch: "<<pitchmodel<<"\n"
<<"VRT: "<<vrtmodel<<"\n"
<<"Relay: "<<relaymodel<<"\n"
<<"Wind: "<<windmodel;
toolkit->show_information_with_leading_time_stamp(osstream);
}
}
}

Expand Down
44 changes: 22 additions & 22 deletions python/stepspy-current/stepspy/stepspy.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ def get_line_capacity(self):
nline_max = simulator.get_line_capacity()
"""
global STEPS_LIB
device = self.__get_c_char_p_of_string("Line")
device = self.__get_c_char_p_of_string("AC Line")
return int(STEPS_LIB.api_get_device_capacity(device, self.toolkit_index))

def get_transformer_capacity(self):
Expand All @@ -541,7 +541,7 @@ def get_hvdc_capacity(self):
nhvdc_max = simulator.get_hvdc_capacity()
"""
global STEPS_LIB
device = self.__get_c_char_p_of_string("HVDC")
device = self.__get_c_char_p_of_string("2T LCC HVDC")
return int(STEPS_LIB.api_get_device_capacity(device, self.toolkit_index))

def get_vsc_hvdc_capacity(self):
Expand Down Expand Up @@ -721,7 +721,7 @@ def set_line_capacity(self, capacity):
simulator.set_line_capacity(capacity)
"""
global STEPS_LIB
device = self.__get_c_char_p_of_string("Line")
device = self.__get_c_char_p_of_string("AC Line")
return STEPS_LIB.api_set_device_capacity(device, capacity, self.toolkit_index)

def set_transformer_capacity(self, capacity):
Expand Down Expand Up @@ -751,7 +751,7 @@ def set_hvdc_capacity(self, capacity):
simulator.set_hvdc_capacity(capacity)
"""
global STEPS_LIB
device = self.__get_c_char_p_of_string("HVDC")
device = self.__get_c_char_p_of_string("2T LCC HVDC")
return STEPS_LIB.api_set_device_capacity(device, capacity, self.toolkit_index)

def set_vsc_hvdc_capacity(self, capacity):
Expand Down Expand Up @@ -1377,7 +1377,7 @@ def get_line_count(self):
Example: N/A
"""
global STEPS_LIB
device = self.__get_c_char_p_of_string("Line")
device = self.__get_c_char_p_of_string("AC Line")
return STEPS_LIB.api_get_device_count(device, self.toolkit_index)

def get_transformer_count(self):
Expand All @@ -1401,7 +1401,7 @@ def get_hvdc_count(self):
Example: N/A
"""
global STEPS_LIB
device = self.__get_c_char_p_of_string("HVDC")
device = self.__get_c_char_p_of_string("2T LCC HVDC")
return STEPS_LIB.api_get_device_count(device, self.toolkit_index)

def get_vsc_hvdc_count(self):
Expand Down Expand Up @@ -2021,7 +2021,7 @@ def get_lines_at_bus(self, bus):
Example: N/A
"""
global STEPS_LIB
device = "LINE"
device = "AC Line"
device = self.__get_c_char_p_of_string(device)
send_side = self.__get_c_char_p_of_string("SEND")
recv_side = self.__get_c_char_p_of_string("RECEIVE")
Expand Down Expand Up @@ -2144,7 +2144,7 @@ def get_hvdcs_at_bus(self, bus):
Example: N/A
"""
global STEPS_LIB
device = "HVDC"
device = "2T LCC HVDC"
device = self.__get_c_char_p_of_string(device)
rec_side = self.__get_c_char_p_of_string("RECTIFIER")
inv_side = self.__get_c_char_p_of_string("INVERTER")
Expand Down Expand Up @@ -5454,8 +5454,8 @@ def prepare_meters(self, device_type):
(1) device_type: String of device type.
Rets: N/A
Tips:
The device type should be one of {"ALL", "BUS", "GENERATOR", "WT GENERATOR", "PV UNIT", "ENERGY STORAGE", "LOAD", "LINE", "TRANSFORMER", "HVDC", "EQUIVALENT DEVICE"}.
If "ALL" is set, all general meters of {"BUS", "GENERATOR", "WT GENERATOR", "PV UNIT", "ENERGY STORAGE", "LOAD", "LINE", "TRANSFORMER", "HVDC", "EQUIVALENT DEVICE"} are set.
The device type should be one of {"ALL", "BUS", "GENERATOR", "WT GENERATOR", "PV UNIT", "ENERGY STORAGE", "LOAD", "AC Line", "TRANSFORMER", "2T LCC HVDC", "EQUIVALENT DEVICE"}.
If "ALL" is set, all general meters of {"BUS", "GENERATOR", "WT GENERATOR", "PV UNIT", "ENERGY STORAGE", "LOAD", "AC Line", "TRANSFORMER", "2T LCC HVDC", "EQUIVALENT DEVICE"} are set.
For the supported general meters, see implementation of the following functions of STEPS:
DYNAMIC_SIMULATOR::prepare_bus_related_meters()
DYNAMIC_SIMULATOR::prepare_generator_related_meters()
Expand All @@ -5472,40 +5472,40 @@ def prepare_meters(self, device_type):
"""
global STEPS_LIB
device_type = device_type.upper()
if device_type in ['ALL']:
if device_type in ["ALL"]:
STEPS_LIB.api_prepare_meters(self.toolkit_index)
return
if device_type in ['BUS']:
if device_type in ["BUS"]:
STEPS_LIB.api_prepare_bus_related_meters(self.toolkit_index)
return
if device_type in ['GENERATOR']:
if device_type in ["GENERATOR"]:
STEPS_LIB.api_prepare_generator_related_meters(self.toolkit_index)
return
if device_type in ['WT GENERATOR']:
if device_type in ["WT GENERATOR"]:
STEPS_LIB.api_prepare_wt_generator_related_meters(self.toolkit_index)
return
if device_type in ['PV UNIT']:
if device_type in ["PV UNIT"]:
STEPS_LIB.api_prepare_pv_unit_related_meters(self.toolkit_index)
return
if device_type in ['ENERGY STORAGE']:
if device_type in ["ENERGY STORAGE"]:
STEPS_LIB.api_prepare_energy_storage_related_meters(self.toolkit_index)
return
if device_type in ['LOAD']:
if device_type in ["LOAD"]:
STEPS_LIB.api_prepare_load_related_meters(self.toolkit_index)
return
if device_type in ['LINE']:
if device_type in ["AC LINE"]:
STEPS_LIB.api_prepare_line_related_meters(self.toolkit_index)
return
if device_type in ['TRANSFORMER']:
if device_type in ["TRANSFORMER"]:
STEPS_LIB.api_prepare_transformer_related_meters(self.toolkit_index)
return
if device_type in ['HVDC']:
if device_type in ["2T LCC HVDC"]:
STEPS_LIB.api_prepare_hvdc_related_meters(self.toolkit_index)
return
if device_type in ['VSC HVDC']:
if device_type in ["VSC HVDC"]:
STEPS_LIB.api_prepare_vsc_hvdc_related_meters(self.toolkit_index)
return
if device_type in ['EQUIVALENT DEVICE']:
if device_type in ["EQUIVALENT DEVICE"]:
STEPS_LIB.api_prepare_equivalent_device_related_meters(self.toolkit_index)
return
return
Expand Down

0 comments on commit 8b9fa64

Please sign in to comment.