Skip to content

Commit

Permalink
more concrete warning when terminal is invalid for building DEVICE_ID
Browse files Browse the repository at this point in the history
  • Loading branch information
changgang committed Jan 25, 2021
1 parent df08fe4 commit ef7d691
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 41 deletions.
80 changes: 40 additions & 40 deletions code/steps/STEPS.depend
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"header/prepare_for_tests/prepare_models_for_test.h"
"header/data_imexporter/equivalent_model_imexporter.h"

1608607004 d:\steps\code\steps\header\power_system_database.h
1608619265 d:\steps\code\steps\header\power_system_database.h
"header/device/bus.h"
"header/device/generator.h"
"header/device/wt_generator.h"
Expand All @@ -32,7 +32,7 @@
"header/basic/device_index_map.h"
<string>

1598590744 d:\steps\code\steps\header\device\bus.h
1611360880 d:\steps\code\steps\header\device\bus.h
"header/device/device.h"
"header/basic/area.h"
"header/basic/zone.h"
Expand Down Expand Up @@ -66,7 +66,7 @@

1598590744 d:\steps\code\steps\header\basic\constants.h

1583938871 d:\steps\code\steps\header\basic\terminal.h
1611545891 d:\steps\code\steps\header\basic\terminal.h
<vector>
<string>

Expand All @@ -77,7 +77,7 @@
1600000969 d:\steps\code\steps\header\basic\steps_enum.h
<iso646.h>

1601392611 d:\steps\code\steps\header\model\model.h
1610706693 d:\steps\code\steps\header\model\model.h
"header/basic/device_id.h"
"header/basic/time_series.h"
"header/block/block.h"
Expand All @@ -104,13 +104,13 @@
"header/basic/steps_enum.h"
<complex>

1583938871 d:\steps\code\steps\header\model\bus_frequency_model\bus_frequency_model.h
1611360880 d:\steps\code\steps\header\model\bus_frequency_model\bus_frequency_model.h
"header/block/differential_block.h"

1583938871 d:\steps\code\steps\header\block\differential_block.h
1610692137 d:\steps\code\steps\header\block\differential_block.h
"header/block/block.h"

1607329372 d:\steps\code\steps\header\device\generator.h
1611360880 d:\steps\code\steps\header\device\generator.h
<string>
<complex>
"header/device/source.h"
Expand All @@ -121,7 +121,7 @@
"header/model/sg_models/turbine_governor_model/turbine_governor_model.h"
"header/model/sg_models/turbine_load_controller_model/turbine_load_controller_model.h"

1607318983 d:\steps\code\steps\header\device\source.h
1611360880 d:\steps\code\steps\header\device\source.h
<string>
<complex>
"header/device/nonbus_device.h"
Expand Down Expand Up @@ -179,7 +179,7 @@
"header/basic/constants.h"
"header/meter/meter.h"

1607318983 d:\steps\code\steps\header\device\wt_generator.h
1611360880 d:\steps\code\steps\header\device\wt_generator.h
<string>
<complex>
"header/device/source.h"
Expand Down Expand Up @@ -226,7 +226,7 @@
1583938871 d:\steps\code\steps\header\model\wtg_models\wt_relay_model\wt_relay_model.h
"header/model/wtg_models/wtg_model.h"

1607318983 d:\steps\code\steps\header\device\pv_unit.h
1611360880 d:\steps\code\steps\header\device\pv_unit.h
<string>
<complex>
"header/device/source.h"
Expand Down Expand Up @@ -265,7 +265,7 @@
"header/model/model.h"
<complex>

1607338638 d:\steps\code\steps\header\device\load.h
1611360880 d:\steps\code\steps\header\device\load.h
"header/device/nonbus_device.h"
"header/model/load_model/load_model.h"
"header/model/load_relay_model/load_voltage_relay_model.h"
Expand Down Expand Up @@ -370,7 +370,7 @@
"header/basic/constants.h"
<mutex>

1607747228 d:\steps\code\steps\header\steps.h
1608619265 d:\steps\code\steps\header\steps.h
"header/power_system_database.h"
"header/dynamic_model_database.h"
"header/toolkit/powerflow_solver/powerflow_solver.h"
Expand Down Expand Up @@ -456,7 +456,7 @@
"header/basic/sparse_matrix_define.h"
<ctime>

1607851953 d:\steps\code\steps\header\toolkit\dynamic_simulator\dynamic_simulator.h
1608619265 d:\steps\code\steps\header\toolkit\dynamic_simulator\dynamic_simulator.h
"header/basic/power_mismatch_struct.h"
"header/meter/meter.h"
"header/network/network_matrix.h"
Expand Down Expand Up @@ -903,7 +903,7 @@
"header/power_system_database.h"
"header/STEPS.h"

1607329550 d:\steps\code\steps\header\device\generator_test.h
1608619265 d:\steps\code\steps\header\device\generator_test.h
<istream>
<cstdlib>
<cstring>
Expand Down Expand Up @@ -933,7 +933,7 @@
"header/power_system_database.h"
"header/STEPS.h"

1607339170 d:\steps\code\steps\header\device\load_test.h
1608619265 d:\steps\code\steps\header\device\load_test.h
<istream>
<cstdlib>
<cstring>
Expand Down Expand Up @@ -1130,7 +1130,7 @@
"header/block/first_order_block.h"
"header/STEPS.h"

1583938871 d:\steps\code\steps\header\block\first_order_block.h
1610692137 d:\steps\code\steps\header\block\first_order_block.h
"header/block/block.h"
"header/block/proportional_block.h"

Expand Down Expand Up @@ -2338,7 +2338,7 @@
"header/data_imexporter/psse_imexporter.h"
"header/data_imexporter/bpa_imexporter.h"

1608607040 d:\steps\code\steps\header\apis\steps_api.h
1608619265 d:\steps\code\steps\header\apis\steps_api.h
<cstdlib>
"header/basic/constants.h"

Expand Down Expand Up @@ -2368,7 +2368,7 @@
"header/data_imexporter/bpa_imexporter.h"
"header/data_imexporter/steps_imexporter.h"

1607852004 source:d:\steps\code\steps\source\apis\steps_api_dynamic_simulation.cpp
1608619265 source:d:\steps\code\steps\source\apis\steps_api_dynamic_simulation.cpp
"header/apis/steps_api.h"
"header/basic/utility.h"
"header/toolkit/cct_searcher/cct_searcher.h"
Expand Down Expand Up @@ -2405,7 +2405,7 @@
"header/apis/steps_api_search_buffer.h"
<iostream>

1608607054 source:d:\steps\code\steps\source\apis\steps_api_search_devices.cpp
1608619265 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 @@ -2599,7 +2599,7 @@
<iostream>
<cstdio>

1607851745 source:d:\steps\code\steps\source\apis\steps_api_utilities.cpp
1608619265 source:d:\steps\code\steps\source\apis\steps_api_utilities.cpp
"header/apis/steps_api.h"
"header/apis/steps_api_common.h"
"header/basic/utility.h"
Expand Down Expand Up @@ -2670,7 +2670,7 @@
<cstdio>
<cmath>

1600000969 source:d:\steps\code\steps\source\basic\device_id.cpp
1611546503 source:d:\steps\code\steps\source\basic\device_id.cpp
"header/basic/device_id.h"
"header/basic/exception.h"
"header/basic/utility.h"
Expand Down Expand Up @@ -3095,7 +3095,7 @@
<cstdio>
<complex>

1583938871 source:d:\steps\code\steps\source\basic\terminal.cpp
1611546678 source:d:\steps\code\steps\source\basic\terminal.cpp
"header/basic/terminal.h"
"header/basic/utility.h"
"header/basic/exception.h"
Expand Down Expand Up @@ -3507,7 +3507,7 @@
<iostream>
<cstdio>

1607318983 source:d:\steps\code\steps\source\data_imexporter\steps_powerflow_imexporter.cpp
1611360880 source:d:\steps\code\steps\source\data_imexporter\steps_powerflow_imexporter.cpp
"header/data_imexporter/steps_imexporter.h"
"header/basic/utility.h"
"header/device/bus.h"
Expand All @@ -3522,7 +3522,7 @@
<istream>
<iostream>

1607318983 source:d:\steps\code\steps\source\device\bus.cpp
1611360880 source:d:\steps\code\steps\source\device\bus.cpp
"header/device/bus.h"
"header/basic/utility.h"
"header/basic/constants.h"
Expand All @@ -3531,7 +3531,7 @@
<iostream>
<cstdio>

1585314815 source:d:\steps\code\steps\source\device\bus_test.cpp
1611360880 source:d:\steps\code\steps\source\device\bus_test.cpp
<cmath>
"cpptest.h"
"header/basic/test_macro.h"
Expand Down Expand Up @@ -3616,7 +3616,7 @@
<cstdio>
<cstdlib>

1607334210 source:d:\steps\code\steps\source\device\generator.cpp
1611360880 source:d:\steps\code\steps\source\device\generator.cpp
"header/device/generator.h"
"header/basic/utility.h"
"header/STEPS.h"
Expand All @@ -3629,7 +3629,7 @@
<istream>
<iostream>

1607334259 source:d:\steps\code\steps\source\device\generator_test.cpp
1608619265 source:d:\steps\code\steps\source\device\generator_test.cpp
<cmath>
"cpptest.h"
"header/basic/test_macro.h"
Expand Down Expand Up @@ -3696,7 +3696,7 @@
<iostream>
<cstdio>

1607339138 source:d:\steps\code\steps\source\device\load.cpp
1611360880 source:d:\steps\code\steps\source\device\load.cpp
"header/device/load.h"
"header/basic/utility.h"
"header/STEPS.h"
Expand All @@ -3706,7 +3706,7 @@
<istream>
<iostream>

1607339265 source:d:\steps\code\steps\source\device\load_test.cpp
1608619265 source:d:\steps\code\steps\source\device\load_test.cpp
<cmath>
"cpptest.h"
"header/basic/test_macro.h"
Expand All @@ -3726,7 +3726,7 @@
<istream>
<iostream>

1607318983 source:d:\steps\code\steps\source\device\pv_unit.cpp
1611360880 source:d:\steps\code\steps\source\device\pv_unit.cpp
"header/device/pv_unit.h"
"header/basic/utility.h"
"header/steps_namespace.h"
Expand All @@ -3751,7 +3751,7 @@
<iostream>
<cstdio>

1598590744 source:d:\steps\code\steps\source\device\source.cpp
1611360880 source:d:\steps\code\steps\source\device\source.cpp
"header/device/source.h"
"header/basic/utility.h"
"header/steps_namespace.h"
Expand Down Expand Up @@ -3857,7 +3857,7 @@
"header/power_system_database.h"
"header/STEPS.h"

1607318983 source:d:\steps\code\steps\source\device\wt_generator.cpp
1611360880 source:d:\steps\code\steps\source\device\wt_generator.cpp
"header/device/wt_generator.h"
"header/basic/utility.h"
"header/steps_namespace.h"
Expand Down Expand Up @@ -3942,7 +3942,7 @@
<cstdio>
<cmath>

1584012220 source:d:\steps\code\steps\source\model\bus_frequency_model\bus_frequency_model.cpp
1611360880 source:d:\steps\code\steps\source\model\bus_frequency_model\bus_frequency_model.cpp
"header/model/bus_frequency_model/bus_frequency_model.h"
"header/power_system_database.h"
"header/STEPS.h"
Expand Down Expand Up @@ -4229,7 +4229,7 @@
<cstdio>
<cmath>

1607318983 source:d:\steps\code\steps\source\model\model.cpp
1610706693 source:d:\steps\code\steps\source\model\model.cpp
"header/model/model.h"
<cstdio>
"header/basic/utility.h"
Expand Down Expand Up @@ -4873,7 +4873,7 @@
<cstdio>
<cmath>

1601202878 source:d:\steps\code\steps\source\model\sg_models\sync_generator_model\gensal.cpp
1611360880 source:d:\steps\code\steps\source\model\sg_models\sync_generator_model\gensal.cpp
"header/model/sg_models/sync_generator_model/gensal.h"
"header/basic/utility.h"
"header/STEPS.h"
Expand Down Expand Up @@ -5393,7 +5393,7 @@
<cstdio>
<cmath>

1607318983 source:d:\steps\code\steps\source\network\jacobian_builder.cpp
1611360880 source:d:\steps\code\steps\source\network\jacobian_builder.cpp
"header/network/jacobian_builder.h"
"header/basic/utility.h"
"header/steps_namespace.h"
Expand Down Expand Up @@ -5431,7 +5431,7 @@
<cstdio>
<cmath>

1608606997 source:d:\steps\code\steps\source\power_system_database.cpp
1611046973 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 @@ -5640,7 +5640,7 @@
"header/steps_namespace.h"
"header/basic/utility.h"

1607851789 source:d:\steps\code\steps\source\steps.cpp
1608619265 source:d:\steps\code\steps\source\steps.cpp
"header/STEPS.h"
"header/basic/utility.h"
"header/steps_namespace.h"
Expand Down Expand Up @@ -5723,7 +5723,7 @@
"header/toolkit/contingency_screener/contingency_screener.h"
"header/STEPS.h"

1607851949 source:d:\steps\code\steps\source\toolkit\dynamic_simulator\dynamic_simulator.cpp
1608619265 source:d:\steps\code\steps\source\toolkit\dynamic_simulator\dynamic_simulator.cpp
"header/toolkit/dynamic_simulator/dynamic_simulator.h"
"header/basic/constants.h"
"header/basic/utility.h"
Expand Down Expand Up @@ -5782,7 +5782,7 @@
<cstdio>
<cmath>

1607318983 source:d:\steps\code\steps\source\toolkit\powerflow_solver\powerflow_solver.cpp
1611046953 source:d:\steps\code\steps\source\toolkit\powerflow_solver\powerflow_solver.cpp
"header/toolkit/powerflow_solver/powerflow_solver.h"
"header/basic/utility.h"
"header/basic/constants.h"
Expand Down
1 change: 1 addition & 0 deletions code/steps/header/basic/terminal.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class TERMINAL
unsigned int get_bus_count() const;
vector<unsigned int> get_buses();
void clear();
string convert2string() const;

virtual TERMINAL& operator= (const TERMINAL& terminal);
unsigned int operator[] (unsigned int index) const;
Expand Down
3 changes: 2 additions & 1 deletion code/steps/source/basic/device_id.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ void DEVICE_ID::set_device_terminal(const TERMINAL& term)
{
ostringstream osstream;
osstream<<"Invalid terminal is provided for setting DEVICE_ID object. nothing is changed."<<endl
<<"Possible device type is "<<get_device_type()<<".";
<<"Possible device type is "<<get_device_type()<<"."<<endl
<<"Given terminal is: "<<term.convert2string()<<".";
show_information_with_leading_time_stamp_with_default_toolkit(osstream);
}
}
Expand Down
Loading

0 comments on commit ef7d691

Please sign in to comment.