ChicagoCharterBusRental 1.0.0

dotnet add package ChicagoCharterBusRental --version 1.0.0
                    
NuGet\Install-Package ChicagoCharterBusRental -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ChicagoCharterBusRental" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ChicagoCharterBusRental" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ChicagoCharterBusRental" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ChicagoCharterBusRental --version 1.0.0
                    
#r "nuget: ChicagoCharterBusRental, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ChicagoCharterBusRental@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ChicagoCharterBusRental&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ChicagoCharterBusRental&version=1.0.0
                    
Install as a Cake Tool

ChicagoCharterBusRental (NuGet)

Group charter planning helpers for the Chicago Charter Bus Rental fleet: work out how many vehicles a headcount needs and how many seats are left over. Targets .NET 8, no dependencies.

Seat counts are the top of the ranges published for each vehicle class: SuperCoach 57 (50-57), Coach Bus 44 (39-44), Small Coach Bus 28 (22-28), Executive Sprinter Van 15 (13-15), Party Bus 45 and Trolley 30.

using ChicagoCharterBusRental;

var headcount = CharterPlanner.HeadcountWithBuffer(80);   // 84, +5% for late additions
var plan = CharterPlanner.RecommendFleet(headcount);
Console.WriteLine(plan.Summary);
// 1 x SuperCoach (50-57 seats) + 1 x Small Coach Bus (22-28 seats)
// = 85 seats for 84 passengers, 1 spare

Console.WriteLine(CharterPlanner.VehiclesNeeded(headcount, Vehicle.SuperCoach)); // 2
  • CharterPlanner.RecommendFleet(passengers, vehicles = null) returns the fewest vehicles that seat everyone and, among those, the fewest spare seats. Pass Vehicle.All to include the party bus and trolley.
  • CharterPlanner.VehiclesNeeded(passengers, vehicle) is the simple round-up for one class.
  • CharterPlanner.HeadcountWithBuffer(confirmed, percent = 5) adds a rounded-up safety margin.

A headcount below 1 throws ArgumentOutOfRangeException.

Scope

A planning aid, not a quote, booking or availability statement. Confirm vehicles, prices and dates with the provider.

Development

dotnet test tests
dotnet pack -c Release
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 108 10/27/2026