pycba.vehicle.Vehicle#

class Vehicle(axle_spacings, axle_weights)[source]#

Bases: object

A basic vehicle definition for a bridge crossing analysis

Constructs the pycba.bridge.Vehicle object from the supplied data.

Parameters such as vehicle length, weight, and axle coordinates are calculated from the supplied data.

Parameters:
  • axle_spacings (ndarray) – A vector of axle spacings of length one fewer than the length of the vector of axle weights

  • axle_weights (ndarray) – A vector of axle weights, length one greater than the length of the axle spacings vector.

Raises:

ValueError – If the lengths of the vectors of axle weights and spacings are inconsistent.

Return type:

None.

Methods

plot

Draw this vehicle's axles as scaled load arrows along its wheelbase.

reverse

Reverses the vehicle; now the pos coordinate will refer to the rear axle as it traverses the bridge in reverse from zero in the global x-coordinate system.

reverse(in_place=True)[source]#

Reverses the vehicle; now the pos coordinate will refer to the rear axle as it traverses the bridge in reverse from zero in the global x-coordinate system.

Parameters:

in_place (Bool) – Whether or not to reverse the current vehicle (True - default), or return a new copy of this vehicle reversed (False).

Return type:

None or Vehicle.

plot(ax=None, title=None, units=None, color='tab:red', show=True)[source]#

Draw this vehicle’s axles as scaled load arrows along its wheelbase.

Convenience wrapper for pycba.plot_vehicle(); see it for the parameters.