Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions BobLib/Brakes/Interfaces/BrakesBus.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
within BobLib.Brakes.Interfaces;
expandable connector BrakesBus

"Typed BrakesBus contract for BobLib subsystem signals"

import Modelica.Units.SI;

extends VehicleInterfaces.Interfaces.BrakesBus;

SI.AngularVelocity wheelSpeed_1 "BrakeActuation: wheel-equivalent speed at corner 1; central brake uses differential gearing";
SI.AngularVelocity wheelSpeed_2 "BrakeActuation: wheel-equivalent speed at corner 2; central brake uses differential gearing";
SI.AngularVelocity wheelSpeed_3 "BrakeActuation: wheel-equivalent speed at corner 3; central brake uses differential gearing";
SI.AngularVelocity wheelSpeed_4 "BrakeActuation: wheel-equivalent speed at corner 4; central brake uses differential gearing";

annotation(Documentation(info = "<html><p>Actual expandable subsystem bus. Declare every new BobLib signal here with its type, units and description before connecting it. Connections select the members present in an architecture; each signal has one publisher. Corner numbers are 1 front-left, 2 front-right, 3 rear-left, 4 rear-right. Compatible with the corresponding empty VehicleInterfaces bus.</p></html>"));
end BrakesBus;
13 changes: 13 additions & 0 deletions BobLib/Brakes/Interfaces/BrakesControlBus.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
within BobLib.Brakes.Interfaces;
expandable connector BrakesControlBus

"Typed BrakesControlBus contract for BobLib subsystem signals"

import Modelica.Units.SI;

extends VehicleInterfaces.Interfaces.BrakesControlBus;

SI.Torque mechanicalBrakeTorqueRequest "VCU: mechanical brake torque request; consumed by bus-controlled brakes";

annotation(Documentation(info = "<html><p>Actual expandable subsystem bus. Declare every new BobLib signal here with its type, units and description before connecting it. Connections select the members present in an architecture; each signal has one publisher. Corner numbers are 1 front-left, 2 front-right, 3 rear-left, 4 rear-right. Compatible with the corresponding empty VehicleInterfaces bus.</p></html>"));
end BrakesControlBus;
6 changes: 6 additions & 0 deletions BobLib/Brakes/Interfaces/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
within BobLib.Brakes;
package Interfaces "Brake subsystem contracts"

extends Modelica.Icons.InterfacesPackage;
annotation(Icon(graphics = {Rectangle(extent = {{-100, 100}, {100, -100}}, lineColor = {0, 0, 0}, lineThickness = 0.5, fillPattern = FillPattern.None)}));
end Interfaces;
2 changes: 2 additions & 0 deletions BobLib/Brakes/Interfaces/package.order
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BrakesBus
BrakesControlBus
88 changes: 88 additions & 0 deletions BobLib/Brakes/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
within BobLib;
package Brakes

"Brake implementations for the VehicleInterfaces brakes contract"

// Package icon adapted from VehicleInterfaces 2.0.2 Icons.Brakes on 2026-10-16; instance-name text removed.
// Copyright (C) 2005-2013, Dassault Systemes, DLR and Modelon; (C) 2013-2025, Modelica Association.
// Modelica License 1.1: Resources/Licenses/LICENSE_VehicleInterfaces.txt.
extends Modelica.Icons.Package;

annotation(Icon(coordinateSystem(preserveAspectRatio = true, extent = {{-100, -100}, {100, 100}}),
graphics = {
Rectangle(
extent = {{-100, 100}, {100, -100}},
lineColor = {0, 0, 0},
fillColor = {255, 255, 255},
fillPattern = FillPattern.Solid, lineThickness = 0.5, pattern = LinePattern.Solid),
Ellipse(
extent = {{-80, 80}, {80, -80}},
lineColor = {95, 95, 95},
fillColor = {186, 186, 186},
fillPattern = FillPattern.Solid),
Ellipse(
extent = {{-46, 46}, {46, -46}},
lineColor = {95, 95, 95},
fillColor = {255, 255, 255},
fillPattern = FillPattern.Solid),
Ellipse(
extent = {{-28, 28}, {28, -28}},
lineColor = {95, 95, 95},
fillColor = {255, 255, 255},
fillPattern = FillPattern.Solid),
Ellipse(
extent = {{-10, 10}, {10, -10}},
lineColor = {0, 0, 0},
fillColor = {95, 95, 95},
fillPattern = FillPattern.Solid),
Ellipse(
extent = {{22, 30}, {30, 22}},
lineColor = {0, 0, 0},
fillColor = {255, 255, 255},
fillPattern = FillPattern.Solid),
Ellipse(
extent = {{-30, 30}, {-22, 22}},
lineColor = {0, 0, 0},
fillColor = {255, 255, 255},
fillPattern = FillPattern.Solid),
Ellipse(
extent = {{22, -22}, {30, -30}},
lineColor = {0, 0, 0},
fillColor = {255, 255, 255},
fillPattern = FillPattern.Solid),
Ellipse(
extent = {{-30, -22}, {-22, -30}},
lineColor = {0, 0, 0},
fillColor = {255, 255, 255},
fillPattern = FillPattern.Solid),

Polygon(
points = {{-88, -20}, {-88, 20}, {-80, 48}, {-48, 44}, {-48, -44}, {-80, -46}, {
-88, -20}},
lineColor = {0, 0, 0},
fillPattern = FillPattern.HorizontalCylinder,
fillColor = {215, 215, 215}),
Line(
points = {{-66, 10}, {-80, 10}},
thickness = 0.5),
Line(
points = {{-54, -14}, {-60, -10}, {-60, 10}, {-54, 14}},
thickness = 0.5),
Line(
points = {{-64, 30}, {-80, 30}},
thickness = 0.5),
Line(
points = {{-64, -30}, {-80, -30}},
thickness = 0.5),
Line(
points = {{-66, -10}, {-80, -10}},
thickness = 0.5)}));

annotation(Documentation(info = "<html>
<p>
Package <code>BobLib.Brakes</code> contains simple
wheel brake implementations that are physically attached at the chassis wheel
hubs while still exposing the standard VehicleInterfaces brakes boundary.
</p>
</html>"));
end Brakes;
1 change: 1 addition & 0 deletions BobLib/Brakes/package.order
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Interfaces
28 changes: 28 additions & 0 deletions BobLib/Chassis/Interfaces/ChassisBus.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
within BobLib.Chassis.Interfaces;
expandable connector ChassisBus

"Typed ChassisBus contract for BobLib subsystem signals"

import Modelica.Units.SI;

extends VehicleInterfaces.Interfaces.ChassisBus;

SI.Velocity longitudinalVelocity "Chassis: signed forward velocity";
SI.Velocity vehicleSpeed "Chassis: nonnegative magnitude of body velocity";
SI.Acceleration bodyAcceleration_2 "Chassis: lateral body acceleration";
SI.Length rideHeight_1 "Chassis: ride height at corner 1";
SI.Length rideHeight_2 "Chassis: ride height at corner 2";
SI.Length rideHeight_3 "Chassis: ride height at corner 3";
SI.Length rideHeight_4 "Chassis: ride height at corner 4";
SI.Length frontLeftSpringLength "Front axle: left spring/damper length";
SI.Length frontRightSpringLength "Front axle: right spring/damper length";
SI.Length rearLeftSpringLength "Rear axle: left spring/damper length";
SI.Length rearRightSpringLength "Rear axle: right spring/damper length";

SI.Force Fz_1 "Chassis: tire normal load at corner 1";
SI.Force Fz_2 "Chassis: tire normal load at corner 2";
SI.Force Fz_3 "Chassis: tire normal load at corner 3";
SI.Force Fz_4 "Chassis: tire normal load at corner 4";

annotation(Documentation(info = "<html><p>Actual expandable subsystem bus. Declare every new BobLib signal here with its type, units and description before connecting it. Connections select the members present in an architecture; each signal has one publisher. Corner numbers are 1 front-left, 2 front-right, 3 rear-left, 4 rear-right. Compatible with the corresponding empty VehicleInterfaces bus.</p></html>"));
end ChassisBus;
7 changes: 7 additions & 0 deletions BobLib/Chassis/Interfaces/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
within BobLib.Chassis;
package Interfaces

"Subsystem contracts and signal buses"
extends Modelica.Icons.InterfacesPackage;
annotation(Icon(graphics = {Rectangle(extent = {{-100, 100}, {100, -100}}, lineColor = {0, 0, 0}, lineThickness = 0.5, fillPattern = FillPattern.None)}));
end Interfaces;
1 change: 1 addition & 0 deletions BobLib/Chassis/Interfaces/package.order
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ChassisBus
16 changes: 16 additions & 0 deletions BobLib/Chassis/Suspension/Interfaces/AxleBus.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
within BobLib.Chassis.Suspension.Interfaces;
expandable connector AxleBus

"Typed AxleBus contract for BobLib subsystem signals"

import Modelica.Units.SI;

extends VehicleInterfaces.Interfaces.ChassisBus;

SI.Force leftNormalLoad "Axle: left tire normal load";
SI.Force rightNormalLoad "Axle: right tire normal load";
SI.Length leftSpringLength "Axle: left spring/damper length";
SI.Length rightSpringLength "Axle: right spring/damper length";

annotation(Documentation(info = "<html><p>Actual expandable subsystem bus. Declare every new BobLib signal here with its type, units and description before connecting it. Connections select the members present in an architecture; each signal has one publisher. Corner numbers are 1 front-left, 2 front-right, 3 rear-left, 4 rear-right. Compatible with the corresponding empty VehicleInterfaces bus.</p></html>"));
end AxleBus;
7 changes: 7 additions & 0 deletions BobLib/Chassis/Suspension/Interfaces/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
within BobLib.Chassis.Suspension;

package Interfaces "Shared suspension axle contracts"

extends Modelica.Icons.InterfacesPackage;
annotation(Icon(graphics = {Rectangle(extent = {{-100, 100}, {100, -100}}, lineColor = {0, 0, 0}, lineThickness = 0.5, fillPattern = FillPattern.None)}));
end Interfaces;
1 change: 1 addition & 0 deletions BobLib/Chassis/Suspension/Interfaces/package.order
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
AxleBus
1 change: 1 addition & 0 deletions BobLib/Chassis/Suspension/package.order
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Interfaces
Tires
Templates
Linkages
Expand Down
1 change: 1 addition & 0 deletions BobLib/Chassis/package.order
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Interfaces
Body
Suspension
Brakes
Expand Down
16 changes: 16 additions & 0 deletions BobLib/Drivelines/Interfaces/DrivelineBus.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
within BobLib.Drivelines.Interfaces;
expandable connector DrivelineBus

"Typed DrivelineBus contract for BobLib subsystem signals"

import Modelica.Units.SI;

extends VehicleInterfaces.Interfaces.DrivelineBus;

SI.AngularVelocity diffInputSpeed "RearFinalDriveDifferential: differential input speed";
SI.AngularVelocity motorSideSpeed "RearFinalDriveDifferential: motor-side shaft speed";
SI.Torque leftHalfshaftTorque "RearFinalDriveDifferential: signed left halfshaft torque";
SI.Torque rightHalfshaftTorque "RearFinalDriveDifferential: signed right halfshaft torque";

annotation(Documentation(info = "<html><p>Actual expandable subsystem bus. Declare every new BobLib signal here with its type, units and description before connecting it. Connections select the members present in an architecture; each signal has one publisher. Corner numbers are 1 front-left, 2 front-right, 3 rear-left, 4 rear-right. Compatible with the corresponding empty VehicleInterfaces bus.</p></html>"));
end DrivelineBus;
13 changes: 13 additions & 0 deletions BobLib/Drivelines/Interfaces/DrivelineControlBus.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
within BobLib.Drivelines.Interfaces;
expandable connector DrivelineControlBus

"Typed DrivelineControlBus contract for BobLib subsystem signals"

import Modelica.Units.SI;

extends VehicleInterfaces.Interfaces.DrivelineControlBus;

SI.Torque driveTorqueCommand "VCU: drive torque request for diagnostics, not a second physical actuator";

annotation(Documentation(info = "<html><p>Actual expandable subsystem bus. Declare every new BobLib signal here with its type, units and description before connecting it. Connections select the members present in an architecture; each signal has one publisher. Corner numbers are 1 front-left, 2 front-right, 3 rear-left, 4 rear-right. Compatible with the corresponding empty VehicleInterfaces bus.</p></html>"));
end DrivelineControlBus;
6 changes: 6 additions & 0 deletions BobLib/Drivelines/Interfaces/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
within BobLib.Drivelines;
package Interfaces "Driveline subsystem contracts"

extends Modelica.Icons.InterfacesPackage;
annotation(Icon(graphics = {Rectangle(extent = {{-100, 100}, {100, -100}}, lineColor = {0, 0, 0}, lineThickness = 0.5, fillPattern = FillPattern.None)}));
end Interfaces;
2 changes: 2 additions & 0 deletions BobLib/Drivelines/Interfaces/package.order
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DrivelineBus
DrivelineControlBus
1 change: 1 addition & 0 deletions BobLib/Drivelines/package.order
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Interfaces
Internal
RearFinalDriveDifferential
19 changes: 19 additions & 0 deletions BobLib/DriverEnvironments/Interfaces/DriverBus.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
within BobLib.DriverEnvironments.Interfaces;
expandable connector DriverBus

"Typed DriverBus contract for BobLib subsystem signals"

import Modelica.Units.SI;

extends VehicleInterfaces.Interfaces.DriverBus;

Real acceleratorPedalPosition(unit = "1") "Driver environment: normalized accelerator position, zero to one";
Real brakePedalPosition(unit = "1") "Driver environment: normalized brake position, zero to one";
SI.Angle steeringWheelAngle "Driver environment: signed handwheel angle";
Integer gearboxMode "Automatic driver environment: mode encoded using VI gearbox conventions";
Integer ignition "Automatic driver environment: ignition state encoded using VI conventions";
Integer requestedGear "Automatic driver environment: requested gear; interpreted according to gearbox mode";
Boolean inverterEnable "EV driver environment or experiment: inverter enable request";

annotation(Documentation(info = "<html><p>Actual expandable subsystem bus. Declare every new BobLib signal here with its type, units and description before connecting it. Connections select the members present in an architecture; each signal has one publisher. Corner numbers are 1 front-left, 2 front-right, 3 rear-left, 4 rear-right. Compatible with the corresponding empty VehicleInterfaces bus.</p></html>"));
end DriverBus;
6 changes: 6 additions & 0 deletions BobLib/DriverEnvironments/Interfaces/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
within BobLib.DriverEnvironments;
package Interfaces "Driver environment contracts"

extends Modelica.Icons.InterfacesPackage;
annotation(Icon(graphics = {Rectangle(extent = {{-100, 100}, {100, -100}}, lineColor = {0, 0, 0}, lineThickness = 0.5, fillPattern = FillPattern.None)}));
end Interfaces;
1 change: 1 addition & 0 deletions BobLib/DriverEnvironments/Interfaces/package.order
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DriverBus
1 change: 1 addition & 0 deletions BobLib/DriverEnvironments/package.order
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Interfaces
AutomaticDriveByWire
EVDriveByWire
Internal
17 changes: 17 additions & 0 deletions BobLib/ElectricDrives/Interfaces/ElectricMotorBus.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
within BobLib.ElectricDrives.Interfaces;
expandable connector ElectricMotorBus

"Typed ElectricMotorBus contract for BobLib subsystem signals"

import Modelica.Units.SI;

extends VehicleInterfaces.Interfaces.ElectricMotorBus;

SI.AngularVelocity speed "Motor: signed shaft speed";
SI.Power electricalPower "Motor: electrical power, positive when motoring";
SI.Power mechanicalPower "Motor: delivered shaft power, positive when motoring";
SI.Torque torqueCommand "Motor: internal commanded torque";
SI.Torque torqueLimit "Motor: active torque limit";

annotation(Documentation(info = "<html><p>Actual expandable subsystem bus. Declare every new BobLib signal here with its type, units and description before connecting it. Connections select the members present in an architecture; each signal has one publisher. Corner numbers are 1 front-left, 2 front-right, 3 rear-left, 4 rear-right. Compatible with the corresponding empty VehicleInterfaces bus.</p></html>"));
end ElectricMotorBus;
19 changes: 19 additions & 0 deletions BobLib/ElectricDrives/Interfaces/ElectricMotorControlBus.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
within BobLib.ElectricDrives.Interfaces;
expandable connector ElectricMotorControlBus

"Typed ElectricMotorControlBus contract for BobLib subsystem signals"

import Modelica.Units.SI;

extends VehicleInterfaces.Interfaces.ElectricMotorControlBus;

SI.Power availablePower "InverterDC: signed limited allocation consumed by the averaged motor";
SI.Power powerRequest "VCU: signed requested electrical power sent to inverter";
SI.Torque limitedTorqueCommand "VCU: limited signed torque command";
SI.Torque regenTorqueLimit "VCU: regenerative torque limit";
Boolean vcuActive "VCU: controller active state";
SI.Torque driverTorqueCommand "EVDriveByWire: driver torque request; not consumed by the default averaged drive";
SI.Torque driverRegenTorqueLimit "EVDriveByWire: driver regenerative torque limit; not consumed by the default averaged drive";

annotation(Documentation(info = "<html><p>Actual expandable subsystem bus. Declare every new BobLib signal here with its type, units and description before connecting it. Connections select the members present in an architecture; each signal has one publisher. Corner numbers are 1 front-left, 2 front-right, 3 rear-left, 4 rear-right. Compatible with the corresponding empty VehicleInterfaces bus.</p></html>"));
end ElectricMotorControlBus;
7 changes: 7 additions & 0 deletions BobLib/ElectricDrives/Interfaces/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
within BobLib.ElectricDrives;
package Interfaces

"Subsystem contracts and signal buses"
extends Modelica.Icons.InterfacesPackage;
annotation(Icon(graphics = {Rectangle(extent = {{-100, 100}, {100, -100}}, lineColor = {0, 0, 0}, lineThickness = 0.5, fillPattern = FillPattern.None)}));
end Interfaces;
2 changes: 2 additions & 0 deletions BobLib/ElectricDrives/Interfaces/package.order
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ElectricMotorBus
ElectricMotorControlBus
1 change: 1 addition & 0 deletions BobLib/ElectricDrives/package.order
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Interfaces
Motor
Internal
17 changes: 17 additions & 0 deletions BobLib/EnergyStorage/Interfaces/BatteryBus.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
within BobLib.EnergyStorage.Interfaces;
expandable connector BatteryBus

"Typed BatteryBus contract for BobLib subsystem signals"

import Modelica.Units.SI;

extends VehicleInterfaces.Interfaces.BatteryBus;

SI.Current current "BatteryPack: discharge-positive terminal current";
SI.Power power "BatteryPack: discharge-positive terminal power";
Real soc(unit = "1") "BatteryPack: state of charge as a fraction";
Real soe(unit = "1") "BatteryPack: state of energy as a fraction";
SI.Voltage voltage "BatteryPack: positive-to-negative terminal voltage";

annotation(Documentation(info = "<html><p>Actual expandable subsystem bus. Declare every new BobLib signal here with its type, units and description before connecting it. Connections select the members present in an architecture; each signal has one publisher. Corner numbers are 1 front-left, 2 front-right, 3 rear-left, 4 rear-right. Compatible with the corresponding empty VehicleInterfaces bus.</p></html>"));
end BatteryBus;
7 changes: 7 additions & 0 deletions BobLib/EnergyStorage/Interfaces/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
within BobLib.EnergyStorage;
package Interfaces

"Subsystem contracts and signal buses"
extends Modelica.Icons.InterfacesPackage;
annotation(Icon(graphics = {Rectangle(extent = {{-100, 100}, {100, -100}}, lineColor = {0, 0, 0}, lineThickness = 0.5, fillPattern = FillPattern.None)}));
end Interfaces;
1 change: 1 addition & 0 deletions BobLib/EnergyStorage/Interfaces/package.order
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BatteryBus
1 change: 1 addition & 0 deletions BobLib/EnergyStorage/package.order
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Interfaces
BatteryPack
Internal
13 changes: 13 additions & 0 deletions BobLib/Engines/Interfaces/EngineBus.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
within BobLib.Engines.Interfaces;
expandable connector EngineBus

"Typed EngineBus contract for BobLib subsystem signals"

import Modelica.Units.SI;

extends VehicleInterfaces.Interfaces.EngineBus;

SI.AngularVelocity speed "SimpleICEngine: engine shaft speed";

annotation(Documentation(info = "<html><p>Actual expandable subsystem bus. Declare every new BobLib signal here with its type, units and description before connecting it. Connections select the members present in an architecture; each signal has one publisher. Corner numbers are 1 front-left, 2 front-right, 3 rear-left, 4 rear-right. Compatible with the corresponding empty VehicleInterfaces bus.</p></html>"));
end EngineBus;
7 changes: 7 additions & 0 deletions BobLib/Engines/Interfaces/package.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
within BobLib.Engines;
package Interfaces

"Subsystem contracts and signal buses"
extends Modelica.Icons.InterfacesPackage;
annotation(Icon(graphics = {Rectangle(extent = {{-100, 100}, {100, -100}}, lineColor = {0, 0, 0}, lineThickness = 0.5, fillPattern = FillPattern.None)}));
end Interfaces;
1 change: 1 addition & 0 deletions BobLib/Engines/Interfaces/package.order
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
EngineBus
1 change: 1 addition & 0 deletions BobLib/Engines/package.order
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Interfaces
SimpleICEngine
Internal
Loading
Loading