+ connectors[i]->set_volts( 0.0 );
+ }
+
+ // for each "external" supplier, propagate the electrical current
+ for ( i = 0; i < suppliers.size(); ++i ) {
+ FGElectricalSupplier *node = (FGElectricalSupplier *)suppliers[i];
+ if ( node->get_model() == FGElectricalSupplier::FG_EXTERNAL ) {
+ float load;
+ // cout << "Starting propagation: " << suppliers[i]->get_name()
+ // << endl;
+ load = propagate( suppliers[i], dt,
+ node->get_output_volts(),
+ node->get_output_amps(),
+ " " );
+
+ if ( node->apply_load( load, dt ) < 0.0 ) {
+ SG_LOG(SG_SYSTEMS, SG_ALERT,
+ "Error drawing more current than available!");
+ }
+ }
+ }
+
+ // for each "alternator" supplier, propagate the electrical
+ // current
+ for ( i = 0; i < suppliers.size(); ++i ) {
+ FGElectricalSupplier *node = (FGElectricalSupplier *)suppliers[i];
+ if ( node->get_model() == FGElectricalSupplier::FG_ALTERNATOR) {
+ float load;
+ // cout << "Starting propagation: " << suppliers[i]->get_name()
+ // << endl;
+ load = propagate( suppliers[i], dt,
+ node->get_output_volts(),
+ node->get_output_amps(),
+ " " );
+
+ if ( node->apply_load( load, dt ) < 0.0 ) {
+ SG_LOG(SG_SYSTEMS, SG_ALERT,
+ "Error drawing more current than available!");
+ }
+ }