+float Train::get_maximum_speed() const
+{
+ float ms = 0;
+ for(vector<Vehicle *>::const_iterator i=vehicles.begin(); i!=vehicles.end(); ++i)
+ {
+ float vms = (*i)->get_type().get_maximum_speed();
+ if(ms<=0 || (vms>0 && vms<ms))
+ ms = vms;
+ }
+ return ms;
+}
+