00001
00010 #include <stdlib.h>
00011 #include <stdio.h>
00012 #include <errno.h>
00013 #include <math.h>
00014
00015 #include "triplex_node.h"
00016
00017 CLASS* triplex_node::oclass = NULL;
00018 CLASS* triplex_node::pclass = NULL;
00019
00020 triplex_node::triplex_node(MODULE *mod) : node(mod)
00021 {
00022 if(oclass == NULL)
00023 {
00024 pclass = node::oclass;
00025
00026 oclass = gl_register_class(mod,"triplex_node",sizeof(triplex_node),PC_PRETOPDOWN|PC_BOTTOMUP|PC_POSTTOPDOWN|PC_UNSAFE_OVERRIDE_OMIT|PC_AUTOLOCK);
00027 if (oclass==NULL)
00028 throw "unable to register class triplex_node";
00029 else
00030 oclass->trl = TRL_PROVEN;
00031
00032 if(gl_publish_variable(oclass,
00033 PT_INHERIT, "powerflow_object",
00034 PT_enumeration, "bustype", PADDR(bustype),PT_DESCRIPTION,"defines whether the node is a PQ, PV, or SWING node",
00035 PT_KEYWORD, "PQ", (enumeration)PQ,
00036 PT_KEYWORD, "PV", (enumeration)PV,
00037 PT_KEYWORD, "SWING", (enumeration)SWING,
00038 PT_KEYWORD, "SWING_PQ", (enumeration)SWING_PQ,
00039 PT_set, "busflags", PADDR(busflags),PT_DESCRIPTION,"flag indicates node has a source for voltage, i.e. connects to the swing node",
00040 PT_KEYWORD, "HASSOURCE", (set)NF_HASSOURCE,
00041 PT_KEYWORD, "ISSOURCE", (set)NF_ISSOURCE,
00042 PT_object, "reference_bus", PADDR(reference_bus),PT_DESCRIPTION,"reference bus from which frequency is defined",
00043 PT_double,"maximum_voltage_error[V]",PADDR(maximum_voltage_error),PT_DESCRIPTION,"convergence voltage limit or convergence criteria",
00044
00045 PT_complex, "voltage_1[V]", PADDR(voltage1),PT_DESCRIPTION,"bus voltage, phase 1 to ground",
00046 PT_complex, "voltage_2[V]", PADDR(voltage2),PT_DESCRIPTION,"bus voltage, phase 2 to ground",
00047 PT_complex, "voltage_N[V]", PADDR(voltageN),PT_DESCRIPTION,"bus voltage, phase N to ground",
00048 PT_complex, "voltage_12[V]", PADDR(voltage12),PT_DESCRIPTION,"bus voltage, phase 1 to 2",
00049 PT_complex, "voltage_1N[V]", PADDR(voltage1N),PT_DESCRIPTION,"bus voltage, phase 1 to N",
00050 PT_complex, "voltage_2N[V]", PADDR(voltage2N),PT_DESCRIPTION,"bus voltage, phase 2 to N",
00051 PT_complex, "current_1[A]", PADDR(current1),PT_DESCRIPTION,"constant current load on phase 1, also acts as accumulator",
00052 PT_complex, "current_2[A]", PADDR(current2),PT_DESCRIPTION,"constant current load on phase 2, also acts as accumulator",
00053 PT_complex, "current_N[A]", PADDR(currentN),PT_DESCRIPTION,"constant current load on phase N, also acts as accumulator",
00054 PT_double, "current_1_real[A]", PADDR(current1.Re()),PT_DESCRIPTION,"constant current load on phase 1, real",
00055 PT_double, "current_2_real[A]", PADDR(current2.Re()),PT_DESCRIPTION,"constant current load on phase 2, real",
00056 PT_double, "current_N_real[A]", PADDR(currentN.Re()),PT_DESCRIPTION,"constant current load on phase N, real",
00057 PT_double, "current_1_reac[A]", PADDR(current1.Im()),PT_DESCRIPTION,"constant current load on phase 1, imag",
00058 PT_double, "current_2_reac[A]", PADDR(current2.Im()),PT_DESCRIPTION,"constant current load on phase 2, imag",
00059 PT_double, "current_N_reac[A]", PADDR(currentN.Im()),PT_DESCRIPTION,"constant current load on phase N, imag",
00060 PT_complex, "current_12[A]", PADDR(current12),PT_DESCRIPTION,"constant current load on phase 1 to 2",
00061 PT_double, "current_12_real[A]", PADDR(current12.Re()),PT_DESCRIPTION,"constant current load on phase 1 to 2, real",
00062 PT_double, "current_12_reac[A]", PADDR(current12.Im()),PT_DESCRIPTION,"constant current load on phase 1 to 2, imag",
00063
00064 PT_complex, "prerotated_current_1[A]", PADDR(pre_rotated_current[0]),PT_ACCESS,PA_HIDDEN,PT_DESCRIPTION,"deltamode-functionality - bus current injection (in = positive), but will not be rotated by powerflow for off-nominal frequency, this an accumulator only, not a output or input variable",
00065 PT_complex, "prerotated_current_2[A]", PADDR(pre_rotated_current[1]),PT_ACCESS,PA_HIDDEN,PT_DESCRIPTION,"deltamode-functionality - bus current injection (in = positive), but will not be rotated by powerflow for off-nominal frequency, this an accumulator only, not a output or input variable",
00066 PT_complex, "prerotated_current_12[A]", PADDR(pre_rotated_current[2]),PT_ACCESS,PA_HIDDEN,PT_DESCRIPTION,"deltamode-functionality - bus current injection (in = positive), but will not be rotated by powerflow for off-nominal frequency, this an accumulator only, not a output or input variable",
00067
00068
00069 PT_complex, "deltamode_generator_current_12[A]", PADDR(deltamode_dynamic_current[0]),PT_ACCESS,PA_HIDDEN,PT_DESCRIPTION,"deltamode-functionality - bus current injection (in = positive), direct generator injection (so may be overwritten internally), this an accumulator only, not a output or input variable",
00070
00071 PT_complex, "residential_nominal_current_1[A]", PADDR(nom_res_curr[0]),PT_ACCESS,PA_HIDDEN,PT_DESCRIPTION,"posted current on phase 1 from a residential object, if attached",
00072 PT_complex, "residential_nominal_current_2[A]", PADDR(nom_res_curr[1]),PT_ACCESS,PA_HIDDEN,PT_DESCRIPTION,"posted current on phase 2 from a residential object, if attached",
00073 PT_complex, "residential_nominal_current_12[A]", PADDR(nom_res_curr[2]),PT_ACCESS,PA_HIDDEN,PT_DESCRIPTION,"posted current on phase 1 to 2 from a residential object, if attached",
00074 PT_double, "residential_nominal_current_1_real[A]", PADDR(nom_res_curr[0].Re()),PT_ACCESS,PA_HIDDEN,PT_DESCRIPTION,"posted current on phase 1, real, from a residential object, if attached",
00075 PT_double, "residential_nominal_current_1_imag[A]", PADDR(nom_res_curr[0].Im()),PT_ACCESS,PA_HIDDEN,PT_DESCRIPTION,"posted current on phase 1, imag, from a residential object, if attached",
00076 PT_double, "residential_nominal_current_2_real[A]", PADDR(nom_res_curr[1].Re()),PT_ACCESS,PA_HIDDEN,PT_DESCRIPTION,"posted current on phase 2, real, from a residential object, if attached",
00077 PT_double, "residential_nominal_current_2_imag[A]", PADDR(nom_res_curr[1].Im()),PT_ACCESS,PA_HIDDEN,PT_DESCRIPTION,"posted current on phase 2, imag, from a residential object, if attached",
00078 PT_double, "residential_nominal_current_12_real[A]", PADDR(nom_res_curr[2].Re()),PT_ACCESS,PA_HIDDEN,PT_DESCRIPTION,"posted current on phase 1 to 2, real, from a residential object, if attached",
00079 PT_double, "residential_nominal_current_12_imag[A]", PADDR(nom_res_curr[2].Im()),PT_ACCESS,PA_HIDDEN,PT_DESCRIPTION,"posted current on phase 1 to 2, imag, from a residential object, if attached",
00080 PT_complex, "power_1[VA]", PADDR(power1),PT_DESCRIPTION,"constant power on phase 1 (120V)",
00081 PT_complex, "power_2[VA]", PADDR(power2),PT_DESCRIPTION,"constant power on phase 2 (120V)",
00082 PT_complex, "power_12[VA]", PADDR(power12),PT_DESCRIPTION,"constant power on phase 1 to 2 (240V)",
00083 PT_double, "power_1_real[W]", PADDR(power1.Re()),PT_DESCRIPTION,"constant power on phase 1, real",
00084 PT_double, "power_2_real[W]", PADDR(power2.Re()),PT_DESCRIPTION,"constant power on phase 2, real",
00085 PT_double, "power_12_real[W]", PADDR(power12.Re()),PT_DESCRIPTION,"constant power on phase 1 to 2, real",
00086 PT_double, "power_1_reac[VAr]", PADDR(power1.Im()),PT_DESCRIPTION,"constant power on phase 1, imag",
00087 PT_double, "power_2_reac[VAr]", PADDR(power2.Im()),PT_DESCRIPTION,"constant power on phase 2, imag",
00088 PT_double, "power_12_reac[VAr]", PADDR(power12.Im()),PT_DESCRIPTION,"constant power on phase 1 to 2, imag",
00089 PT_complex, "shunt_1[S]", PADDR(pub_shunt[0]),PT_DESCRIPTION,"constant shunt impedance on phase 1",
00090 PT_complex, "shunt_2[S]", PADDR(pub_shunt[1]),PT_DESCRIPTION,"constant shunt impedance on phase 2",
00091 PT_complex, "shunt_12[S]", PADDR(pub_shunt[2]),PT_DESCRIPTION,"constant shunt impedance on phase 1 to 2",
00092 PT_complex, "impedance_1[Ohm]", PADDR(impedance[0]),PT_DESCRIPTION,"constant series impedance on phase 1",
00093 PT_complex, "impedance_2[Ohm]", PADDR(impedance[1]),PT_DESCRIPTION,"constant series impedance on phase 2",
00094 PT_complex, "impedance_12[Ohm]", PADDR(impedance[2]),PT_DESCRIPTION,"constant series impedance on phase 1 to 2",
00095 PT_double, "impedance_1_real[Ohm]", PADDR(impedance[0].Re()),PT_DESCRIPTION,"constant series impedance on phase 1, real",
00096 PT_double, "impedance_2_real[Ohm]", PADDR(impedance[1].Re()),PT_DESCRIPTION,"constant series impedance on phase 2, real",
00097 PT_double, "impedance_12_real[Ohm]", PADDR(impedance[2].Re()),PT_DESCRIPTION,"constant series impedance on phase 1 to 2, real",
00098 PT_double, "impedance_1_reac[Ohm]", PADDR(impedance[0].Im()),PT_DESCRIPTION,"constant series impedance on phase 1, imag",
00099 PT_double, "impedance_2_reac[Ohm]", PADDR(impedance[1].Im()),PT_DESCRIPTION,"constant series impedance on phase 2, imag",
00100 PT_double, "impedance_12_reac[Ohm]", PADDR(impedance[2].Im()),PT_DESCRIPTION,"constant series impedance on phase 1 to 2, imag",
00101 PT_bool, "house_present", PADDR(house_present),PT_DESCRIPTION,"boolean for detecting whether a house is attached, not an input",
00102
00103 PT_bool, "reset_disabled_island_state", PADDR(reset_island_state), PT_ACCESS, PA_HIDDEN, PT_DESCRIPTION, "Deltamode/multi-island flag -- used to reset disabled status (and reform an island)",
00104
00105
00106 PT_bool, "GFA_enable", PADDR(GFA_enable), PT_DESCRIPTION, "Disable/Enable Grid Friendly Applicance(TM)-type functionality",
00107 PT_double, "GFA_freq_low_trip[Hz]", PADDR(GFA_freq_low_trip), PT_DESCRIPTION, "Low frequency trip point for Grid Friendly Appliance(TM)-type functionality",
00108 PT_double, "GFA_freq_high_trip[Hz]", PADDR(GFA_freq_high_trip), PT_DESCRIPTION, "High frequency trip point for Grid Friendly Appliance(TM)-type functionality",
00109 PT_double, "GFA_volt_low_trip[pu]", PADDR(GFA_voltage_low_trip), PT_DESCRIPTION, "Low voltage trip point for Grid Friendly Appliance(TM)-type functionality",
00110 PT_double, "GFA_volt_high_trip[pu]", PADDR(GFA_voltage_high_trip), PT_DESCRIPTION, "High voltage trip point for Grid Friendly Appliance(TM)-type functionality",
00111 PT_double, "GFA_reconnect_time[s]", PADDR(GFA_reconnect_time), PT_DESCRIPTION, "Reconnect time for Grid Friendly Appliance(TM)-type functionality",
00112 PT_double, "GFA_freq_disconnect_time[s]", PADDR(GFA_freq_disconnect_time), PT_DESCRIPTION, "Frequency violation disconnect time for Grid Friendly Appliance(TM)-type functionality",
00113 PT_double, "GFA_volt_disconnect_time[s]", PADDR(GFA_volt_disconnect_time), PT_DESCRIPTION, "Voltage violation disconnect time for Grid Friendly Appliance(TM)-type functionality",
00114 PT_bool, "GFA_status", PADDR(GFA_status), PT_DESCRIPTION, "Low frequency trip point for Grid Friendly Appliance(TM)-type functionality",
00115
00116 PT_enumeration, "service_status", PADDR(service_status),PT_DESCRIPTION,"In and out of service flag",
00117 PT_KEYWORD, "IN_SERVICE", (enumeration)ND_IN_SERVICE,
00118 PT_KEYWORD, "OUT_OF_SERVICE", (enumeration)ND_OUT_OF_SERVICE,
00119 PT_double, "service_status_double", PADDR(service_status_dbl),PT_DESCRIPTION,"In and out of service flag - type double - will indiscriminately override service_status - useful for schedules",
00120 PT_double, "previous_uptime[min]", PADDR(previous_uptime),PT_DESCRIPTION,"Previous time between disconnects of node in minutes",
00121 PT_double, "current_uptime[min]", PADDR(current_uptime),PT_DESCRIPTION,"Current time since last disconnect of node in minutes",
00122 PT_object, "topological_parent", PADDR(TopologicalParent),PT_DESCRIPTION,"topological parent as per GLM configuration",
00123
00124
00125 PT_enumeration,"frequency_measure_type",PADDR(fmeas_type),PT_DESCRIPTION,"Frequency measurement dynamics-capable implementation",
00126 PT_KEYWORD,"NONE",(enumeration)FM_NONE,PT_DESCRIPTION,"No frequency measurement",
00127 PT_KEYWORD,"SIMPLE",(enumeration)FM_SIMPLE,PT_DESCRIPTION,"Simplified frequency measurement",
00128 PT_KEYWORD,"PLL",(enumeration)FM_PLL,PT_DESCRIPTION,"PLL frequency measurement",
00129
00130 PT_double,"sfm_Tf[s]",PADDR(freq_sfm_Tf),PT_DESCRIPTION,"Transducer time constant for simplified frequency measurement (seconds)",
00131 PT_double,"pll_Kp[pu]",PADDR(freq_pll_Kp),PT_DESCRIPTION,"Proportional gain of PLL frequency measurement",
00132 PT_double,"pll_Ki[pu]",PADDR(freq_pll_Ki),PT_DESCRIPTION,"Integration gain of PLL frequency measurement",
00133
00134
00135 PT_double,"measured_angle_1[rad]", PADDR(curr_freq_state.anglemeas[0]),PT_DESCRIPTION,"bus angle measurement, phase 1N",
00136 PT_double,"measured_frequency_1[Hz]", PADDR(curr_freq_state.fmeas[0]),PT_DESCRIPTION,"frequency measurement, phase 1N",
00137 PT_double,"measured_angle_2[rad]", PADDR(curr_freq_state.anglemeas[1]),PT_DESCRIPTION,"bus angle measurement, phase 2N",
00138 PT_double,"measured_frequency_2[Hz]", PADDR(curr_freq_state.fmeas[1]),PT_DESCRIPTION,"frequency measurement, phase 2N",
00139 PT_double,"measured_angle_12[rad]", PADDR(curr_freq_state.anglemeas[2]),PT_DESCRIPTION,"bus angle measurement, across the phases",
00140 PT_double,"measured_frequency_12[Hz]", PADDR(curr_freq_state.fmeas[2]),PT_DESCRIPTION,"frequency measurement, across the phases",
00141 PT_double,"measured_frequency[Hz]", PADDR(curr_freq_state.average_freq), PT_DESCRIPTION, "frequency measurement - average of present phases",
00142
00143 NULL) < 1) GL_THROW("unable to publish properties in %s",__FILE__);
00144
00145
00146 if (gl_publish_function(oclass, "interupdate_pwr_object", (FUNCTIONADDR)interupdate_triplex_node)==NULL)
00147 GL_THROW("Unable to publish triplex_node deltamode function");
00148 if (gl_publish_function(oclass, "pwr_object_swing_swapper", (FUNCTIONADDR)swap_node_swing_status)==NULL)
00149 GL_THROW("Unable to publish triplex_node swing-swapping function");
00150 if (gl_publish_function(oclass, "pwr_current_injection_update_map", (FUNCTIONADDR)node_map_current_update_function)==NULL)
00151 GL_THROW("Unable to publish triplex_node current injection update mapping function");
00152 if (gl_publish_function(oclass, "attach_vfd_to_pwr_object", (FUNCTIONADDR)attach_vfd_to_node)==NULL)
00153 GL_THROW("Unable to publish triplex_node VFD attachment function");
00154 if (gl_publish_function(oclass, "pwr_object_reset_disabled_status", (FUNCTIONADDR)node_reset_disabled_status) == NULL)
00155 GL_THROW("Unable to publish triplex_node island-status-reset function");
00156 }
00157 }
00158
00159 int triplex_node::isa(char *classname)
00160 {
00161 return strcmp(classname,"triplex_node")==0 || node::isa(classname);
00162 }
00163
00164 int triplex_node::create(void)
00165 {
00166 int result = node::create();
00167 maximum_voltage_error = 0;
00168 pub_shunt[0] = pub_shunt[1] = pub_shunt[2] = 0;
00169 shunt1 = complex(0,0);
00170 shunt2 = complex(0,0);
00171 shunt12 = complex(0,0);
00172 service_status = ND_IN_SERVICE;
00173 return result;
00174 }
00175
00176 int triplex_node::init(OBJECT *parent)
00177 {
00178 if ( !(has_phase(PHASE_S)) )
00179 {
00180 OBJECT *obj = OBJECTHDR(this);
00181 gl_warning("Init() triplex_node (name:%s, id:%d): Phases specified did not include phase S. Adding phase S.", obj->name,obj->id);
00182
00183
00184
00185
00186 phases = (phases | PHASE_S);
00187 }
00188 if ((pub_shunt[0] == 0) && (impedance[0] != 0))
00189 shunt[0] = complex(1.0,0)/impedance[0];
00190
00191 if ((pub_shunt[1] == 0) && (impedance[1] != 0))
00192 shunt[1] = complex(1.0,0)/impedance[1];
00193
00194 if ((pub_shunt[2] == 0) && (impedance[2] != 0))
00195 shunt[2] = complex(1.0,0)/impedance[2];
00196
00197 return node::init(parent);
00198 }
00199
00200
00201
00202 void triplex_node::BOTH_triplex_node_presync_fxn(void)
00203 {
00204
00205 shunt[0] = shunt[1] = shunt[2] = 0.0;
00206 }
00207
00208 TIMESTAMP triplex_node::presync(TIMESTAMP t0)
00209 {
00210
00211 BOTH_triplex_node_presync_fxn();
00212
00213 return node::presync(t0);
00214 }
00215
00216
00217
00218 void triplex_node::BOTH_triplex_node_sync_fxn(void)
00219 {
00220
00221
00222 if ((pub_shunt[0] == 0) && (impedance[0] != 0))
00223 shunt[0] += complex(1.0,0)/impedance[0];
00224 else
00225 shunt[0] += pub_shunt[0];
00226
00227 if ((pub_shunt[1] == 0) && (impedance[1] != 0))
00228 shunt[1] += complex(1.0,0)/impedance[1];
00229 else
00230 shunt[1] += pub_shunt[1];
00231
00232 if ((pub_shunt[2] == 0) && (impedance[2] != 0))
00233 shunt[2] += complex(1.0,0)/impedance[2];
00234 else
00235 shunt[2] += pub_shunt[2];
00236 }
00237
00238 TIMESTAMP triplex_node::sync(TIMESTAMP t0)
00239 {
00240
00241 BOTH_triplex_node_sync_fxn();
00242
00243 return node::sync(t0);
00244 }
00245
00247
00249
00250 SIMULATIONMODE triplex_node::inter_deltaupdate_triplex_node(unsigned int64 delta_time, unsigned long dt, unsigned int iteration_count_val,bool interupdate_pos)
00251 {
00252 OBJECT *hdr = OBJECTHDR(this);
00253 double deltat, deltatimedbl;
00254 STATUS return_status_val;
00255
00256
00257 deltat = (double)dt/(double)DT_SECOND;
00258
00259
00260 if ((iteration_count_val==0) && (interupdate_pos == false))
00261 {
00262
00263 deltatimedbl = (double)delta_time/(double)DT_SECOND;
00264
00265
00266 prev_time_dbl = (double)gl_globalclock + deltatimedbl;
00267
00268
00269 if (fmeas_type != FM_NONE)
00270 {
00271
00272 memcpy(&prev_freq_state,&curr_freq_state,sizeof(FREQM_STATES));
00273 }
00274 }
00275
00276
00277 if ((delta_time==0) && (iteration_count_val==0) && (interupdate_pos == false) && (fmeas_type != FM_NONE))
00278 {
00279
00280 init_freq_dynamics();
00281 }
00282
00283
00284 if ((GFA_enable == true) && (iteration_count_val == 0) && (interupdate_pos == false))
00285 {
00286
00287 GFA_Update_time = perform_GFA_checks(deltat);
00288 }
00289
00290 if (interupdate_pos == false)
00291 {
00292
00293 BOTH_triplex_node_presync_fxn();
00294
00295
00296 NR_node_presync_fxn(0);
00297
00298
00299 BOTH_triplex_node_sync_fxn();
00300
00301
00302 NR_node_sync_fxn(hdr);
00303
00304 return SM_DELTA;
00305
00306 }
00307 else
00308 {
00309
00310
00311
00312 BOTH_node_postsync_fxn(hdr);
00313
00314
00315 if (fmeas_type != FM_NONE)
00316 {
00317 return_status_val = calc_freq_dynamics(deltat);
00318
00319
00320 if (return_status_val == FAILED)
00321 {
00322 return SM_ERROR;
00323 }
00324 }
00325
00326
00327
00328 if (GFA_enable == true)
00329 {
00330
00331 if ((GFA_Update_time > 0.0) && (GFA_Update_time < 1.7))
00332 {
00333
00334 return SM_DELTA;
00335 }
00336 else
00337 {
00338 return SM_EVENT;
00339 }
00340 }
00341 else
00342 {
00343 return SM_EVENT;
00344 }
00345 }
00346 }
00347
00349
00351
00359 EXPORT int create_triplex_node(OBJECT **obj, OBJECT *parent)
00360 {
00361 try
00362 {
00363 *obj = gl_create_object(triplex_node::oclass);
00364 if (*obj!=NULL)
00365 {
00366 triplex_node *my = OBJECTDATA(*obj,triplex_node);
00367 gl_set_parent(*obj,parent);
00368 return my->create();
00369 }
00370 else
00371 return 0;
00372 }
00373 CREATE_CATCHALL(triplex_node);
00374 }
00375
00382 EXPORT int init_triplex_node(OBJECT *obj)
00383 {
00384 try {
00385 triplex_node *my = OBJECTDATA(obj,triplex_node);
00386 return my->init();
00387 }
00388 INIT_CATCHALL(triplex_node);
00389 }
00390
00399 EXPORT TIMESTAMP sync_triplex_node(OBJECT *obj, TIMESTAMP t0, PASSCONFIG pass)
00400 {
00401 try {
00402 triplex_node *pObj = OBJECTDATA(obj,triplex_node);
00403 TIMESTAMP t1;
00404 switch (pass) {
00405 case PC_PRETOPDOWN:
00406 return pObj->presync(t0);
00407 case PC_BOTTOMUP:
00408 return pObj->sync(t0);
00409 case PC_POSTTOPDOWN:
00410 t1 = pObj->postsync(t0);
00411 obj->clock = t0;
00412 return t1;
00413 default:
00414 throw "invalid pass request";
00415 }
00416 }
00417 SYNC_CATCHALL(triplex_node);
00418 }
00419
00420 EXPORT int isa_triplex_node(OBJECT *obj, char *classname)
00421 {
00422 return OBJECTDATA(obj,triplex_node)->isa(classname);
00423 }
00424
00425 EXPORT int notify_triplex_node(OBJECT *obj, int update_mode, PROPERTY *prop, char *value){
00426 triplex_node *n = OBJECTDATA(obj, triplex_node);
00427 int rv = 1;
00428
00429 rv = n->notify(update_mode, prop, value);
00430
00431 return rv;
00432 }
00433
00434
00435 EXPORT SIMULATIONMODE interupdate_triplex_node(OBJECT *obj, unsigned int64 delta_time, unsigned long dt, unsigned int iteration_count_val, bool interupdate_pos)
00436 {
00437 triplex_node *my = OBJECTDATA(obj,triplex_node);
00438 SIMULATIONMODE status = SM_ERROR;
00439 try
00440 {
00441 status = my->inter_deltaupdate_triplex_node(delta_time,dt,iteration_count_val,interupdate_pos);
00442 return status;
00443 }
00444 catch (char *msg)
00445 {
00446 gl_error("interupdate_triplex_node(obj=%d;%s): %s", obj->id, obj->name?obj->name:"unnamed", msg);
00447 return status;
00448 }
00449 }
00450