Class Commandcenter

Namespace
SIMDispatcher.Core.Models
Assembly
SIMDispatcher.Core.dll

Represents a dispatch center within the simulation platform, managing a variety of emergency and non-emergency responses. The Commandcenter model encapsulates a wide range of operational details, including operational statistics, configurable settings, and equipment options. It also covers administrative aspects, allowing for robust management and customization of emergency service dispatching. This model serves as a central point for configuring and controlling the functionality and responsiveness of the simulated dispatch operations.

public record Commandcenter : IComparable<Commandcenter>, IComparable, IEquatable<Commandcenter>
Inheritance
Commandcenter
Implements
Inherited Members

Properties

ActivePlayers

The number of active players or users at the command center within the last 30 days, indicating its operational activity.

[Display(Description = "ActivePlayers", ResourceType = typeof(CommandcenterLocalization))]
public int ActivePlayers { get; set; }

Property Value

int

Address

The specific address where the command center is physically located (geographical position).

[Display(Description = "Address", ResourceType = typeof(CommandcenterLocalization))]
public Address? Address { get; set; }

Property Value

Address

AddressPackage

The package of addresses associated with the command center.

[Display(Description = "AddressPackage", ResourceType = typeof(CommandcenterLocalization))]
public AddressPackage? AddressPackage { get; set; }

Property Value

AddressPackage

Administrators

A list of users who have administrative rights to contribute to and manage the data and operations of the command center. These administrators are responsible for overseeing the daily operations and ensuring that the command center's data and settings are correctly maintained and updated.

[Display(Description = "Administrators", ResourceType = typeof(CommandcenterLocalization))]
public List<UserInformation>? Administrators { get; set; }

Property Value

List<UserInformation>

AverageRating

The average rating of the command center based on user reviews, on a scale from 1 to 5 stars.

[Display(Description = "AverageRating", ResourceType = typeof(CommandcenterLocalization))]
public double? AverageRating { get; set; }

Property Value

double?

CallNumberEmergency

The emergency phone number for the dispatch center, which is typically 911 in North America or 112 in Europe. This number is used for emergency calls requiring immediate response.

[Display(Description = "CallNumberEmergency", ResourceType = typeof(CommandcenterLocalization))]
public string? CallNumberEmergency { get; set; }

Property Value

string

CallNumberOffice

The standard office phone number of the dispatch center, used for non-emergency calls. This number provides a way for the public to contact the dispatch center for general inquiries.

[Display(Description = "CallNumberOffice", ResourceType = typeof(CommandcenterLocalization))]
public string? CallNumberOffice { get; set; }

Property Value

string

CallNumberPatientTransport

The specific phone number for arranging patient transports, such as 19222 in Germany. This number is designated for services that are urgent but not life-threatening.

[Display(Description = "CallNumberPatientTransport", ResourceType = typeof(CommandcenterLocalization))]
public string? CallNumberPatientTransport { get; set; }

Property Value

string

CallTextEmergency

The scripted emergency greeting or statement used by call takers when they answer an emergency call, e.g., "911, what's your emergency?"

[Display(Description = "CallTextEmergency", ResourceType = typeof(CommandcenterLocalization))]
public string? CallTextEmergency { get; set; }

Property Value

string

CallTextOffice

The standard greeting or statement given by a call taker when answering a regular office call at the dispatch center.

[Display(Description = "CallTextOffice", ResourceType = typeof(CommandcenterLocalization))]
public string? CallTextOffice { get; set; }

Property Value

string

CallTextPatientTransport

The standard greeting or statement used when accepting calls for patient transport.

[Display(Description = "CallTextPatientTransport", ResourceType = typeof(CommandcenterLocalization))]
public string? CallTextPatientTransport { get; set; }

Property Value

string

Category

The category of the command center, which helps classify the center according to its primary function or operational scope.

[Display(Description = "Category", ResourceType = typeof(CommandcenterLocalization))]
public CommandcenterCategory Category { get; set; }

Property Value

CommandcenterCategory

ChangedOn

The date and time when the command center was last modified.

[Display(Description = "ChangedOn", ResourceType = typeof(CommandcenterLocalization))]
public DateTimeOffset? ChangedOn { get; set; }

Property Value

DateTimeOffset?

Classification

The classification of the command center based on an automatic scoring system ranging from A (best) to F (not rated).

[Display(Description = "Classification", ResourceType = typeof(CommandcenterLocalization))]
public CommandcenterClassification Classification { get; set; }

Property Value

CommandcenterClassification

CreatedOn

The date and time when the command center was created.

[Display(Description = "CreatedOn", ResourceType = typeof(CommandcenterLocalization))]
public DateTimeOffset CreatedOn { get; set; }

Property Value

DateTimeOffset

CustomEquipments

A list of custom equipment configurations available for the command center. This property allows the command center to specify unique equipment setups for automated unit suggestions, tailoring the available resources to the specific needs of operations.

[Display(Description = "CustomEquipments", ResourceType = typeof(CommandcenterLocalization))]
public List<CommandcenterCustomEquipment>? CustomEquipments { get; set; }

Property Value

List<CommandcenterCustomEquipment>

CustomGeocodingSearchFormat

Defines a custom query format for geocoding searches, allowing modification of how addresses are queried for coordinate determination. This setting should be altered only if default geocoding results are consistently inaccurate, as incorrect configurations can lead to significant errors in location-based responses. The format supports several placeholders: {houseNumber}, {street}, {cityName}, {districtName}, {stateName}, {districtZip}, and {communeName}. Each placeholder corresponds to properties within the Address, AddressCity, AddressDistrict, AddressCommune, and AddressState models, which define various levels of geographical data. Adjusting this format impacts how the system interprets and searches for address data, directly affecting the accuracy of operations that rely on precise location information.

[Display(Description = "CustomGeocodingSearchFormat", ResourceType = typeof(CommandcenterLocalization))]
public string? CustomGeocodingSearchFormat { get; set; }

Property Value

string

Remarks

DiscourseTopicId

The identifier for a discussion topic associated with the command center on the forums.sim-dispatcher.com platform.

[Display(Description = "DiscourseTopicId", ResourceType = typeof(CommandcenterLocalization))]
public long? DiscourseTopicId { get; set; }

Property Value

long?

HasErrors

Indicates if there are configuration problems with the command center. If true, new sessions cannot be initiated.

[Display(Description = "HasErrors", ResourceType = typeof(CommandcenterLocalization))]
public bool HasErrors { get; set; }

Property Value

bool

HeaderImageId

The identifier for the header image of the command center, used for display purposes in interfaces.

[Display(Description = "HeaderImageId", ResourceType = typeof(CommandcenterLocalization))]
public Guid? HeaderImageId { get; set; }

Property Value

Guid?

Id

[Display(Description = "Id", ResourceType = typeof(CommandcenterLocalization))]
public long Id { get; set; }

Property Value

long

IsDispatchingFireAndRescue

Indicates whether the command center coordinates fire and rescue operations, addressing both fire-related emergencies and other rescue missions.

[Display(Description = "IsDispatchingFireAndRescue", ResourceType = typeof(CommandcenterLocalization))]
public bool IsDispatchingFireAndRescue { get; set; }

Property Value

bool

IsDispatchingPatientTransports

Indicates whether the command center coordinates normal patient transport services.

[Display(Description = "IsDispatchingPatientTransports", ResourceType = typeof(CommandcenterLocalization))]
public bool IsDispatchingPatientTransports { get; set; }

Property Value

bool

IsDispatchingUrgentAmbulance

Indicates whether the command center coordinates urgent ambulance services, typically for emergency medical response.

[Display(Description = "IsDispatchingUrgentAmbulance", ResourceType = typeof(CommandcenterLocalization))]
public bool IsDispatchingUrgentAmbulance { get; set; }

Property Value

bool

IsPublic

Indicates whether the command center is accessible to the public (read-only).

[Display(Description = "IsPublic", ResourceType = typeof(CommandcenterLocalization))]
public bool IsPublic { get; set; }

Property Value

bool

IsRecommended

Indicates whether the command center is recommended within the system, possibly based on performance or user ratings.

[Display(Description = "IsRecommended", ResourceType = typeof(CommandcenterLocalization))]
public bool IsRecommended { get; set; }

Property Value

bool

KeywordsPerOperation

Defines the number of keywords that can be associated with an operation, ranging from 1 (default) to 6 (maximum). This impacts how operations are classified and searched within the system.

[Display(Description = "KeywordsPerOperation", ResourceType = typeof(CommandcenterLocalization))]
public int KeywordsPerOperation { get; set; }

Property Value

int

MaxPlayers

The maximum number of players allowed in a single session within the command center. This limit ensures that the system can manage user loads effectively without overloading resources.

[Display(Description = "MaxPlayers", ResourceType = typeof(CommandcenterLocalization))]
public int MaxPlayers { get; set; }

Property Value

int

Name

The name of the command center. This field may be null if the name has not been set.

[Display(Description = "Name", ResourceType = typeof(CommandcenterLocalization))]
public required string? Name { get; set; }

Property Value

string

OperationsPerYear

An initial value used to calculate the number of operations per year. This property does not influence the actual number of emergencies created but helps in setting up operational expectations.

[Display(Description = "OperationsPerYear", ResourceType = typeof(CommandcenterLocalization))]
public int OperationsPerYear { get; set; }

Property Value

int

Options

A list of configurable options that can be set per command center. These options allow for the customization of operational settings,

[Display(Description = "Options", ResourceType = typeof(CommandcenterLocalization))]
public List<CommandcenterOption>? Options { get; set; }

Property Value

List<CommandcenterOption>

Owner

Information about the owner of the command center, which includes details.

[Display(Description = "Owner", ResourceType = typeof(CommandcenterLocalization))]
public UserInformation? Owner { get; set; }

Property Value

UserInformation

PatientHospitalAmbulantPercent

Percentage of patient transports that are for ambulatory services, not requiring hospitalization.

[Display(Description = "PatientHospitalAmbulantPercent", ResourceType = typeof(CommandcenterLocalization))]
public int PatientHospitalAmbulantPercent { get; set; }

Property Value

int

Remarks

PatientHospitalDischargePercent

Percentage of patient transports that involve discharging patients from the hospital.

[Display(Description = "PatientHospitalDischargePercent", ResourceType = typeof(CommandcenterLocalization))]
public int PatientHospitalDischargePercent { get; set; }

Property Value

int

Remarks

PatientHospitalDischargeToNursingHomePercent

For discharges, the percentage of patient transports to nursing homes as opposed to their own homes.

[Display(Description = "PatientHospitalDischargeToNursingHomePercent", ResourceType = typeof(CommandcenterLocalization))]
public int PatientHospitalDischargeToNursingHomePercent { get; set; }

Property Value

int

PatientHospitalTransferPercent

Percentage of patient transports that are transfers from one hospital to another.

[Display(Description = "PatientHospitalTransferPercent", ResourceType = typeof(CommandcenterLocalization))]
public int PatientHospitalTransferPercent { get; set; }

Property Value

int

Remarks

PatientHospitalizationFromHomePercent

For hospitalizations, the percentage of transports originating from a home address versus a point of interest like a doctor's office or nursing home.

[Display(Description = "PatientHospitalizationFromHomePercent", ResourceType = typeof(CommandcenterLocalization))]
public int PatientHospitalizationFromHomePercent { get; set; }

Property Value

int

PatientHospitalizationPercent

Percentage of patient transports that result in hospitalization.

[Display(Description = "PatientHospitalizationPercent", ResourceType = typeof(CommandcenterLocalization))]
public int PatientHospitalizationPercent { get; set; }

Property Value

int

Remarks

PatientPickupImmediatelyPercent

Percentage indicating how often patient transports are needed immediately as opposed to being scheduled.

[Display(Description = "PatientPickupImmediatelyPercent", ResourceType = typeof(CommandcenterLocalization))]
public int PatientPickupImmediatelyPercent { get; set; }

Property Value

int

ReduceAmbulanceSaturdayPercent

Reduction percentage in emergency medical services operations on Saturdays from 0 (no transports) and 100 (as normal).

[Display(Description = "ReduceAmbulanceSaturdayPercent", ResourceType = typeof(CommandcenterLocalization))]
public int ReduceAmbulanceSaturdayPercent { get; set; }

Property Value

int

ReduceAmbulanceSundayPercent

Reduction percentage in emergency medical services operations on Sundays from 0 (no transports) and 100 (as normal).

[Display(Description = "ReduceAmbulanceSundayPercent", ResourceType = typeof(CommandcenterLocalization))]
public int ReduceAmbulanceSundayPercent { get; set; }

Property Value

int

ReduceIcuTransferSaturdayPercent

Reduction percentage for intensive care unit transports on Saturdays from 0 (no transports) and 100 (as normal).

[Display(Description = "ReduceIcuTransferSaturdayPercent", ResourceType = typeof(CommandcenterLocalization))]
public int ReduceIcuTransferSaturdayPercent { get; set; }

Property Value

int

ReduceIcuTransferSundayPercent

Reduction percentage for intensive care unit transports on Sundays from 0 (no transports) and 100 (as normal).

[Display(Description = "ReduceIcuTransferSundayPercent", ResourceType = typeof(CommandcenterLocalization))]
public int ReduceIcuTransferSundayPercent { get; set; }

Property Value

int

ReducePatientSaturdayPercent

Reduction percentage for patient transports on Saturdays from 0 (no transports) and 100 (as normal).

[Display(Description = "ReducePatientSaturdayPercent", ResourceType = typeof(CommandcenterLocalization))]
public int ReducePatientSaturdayPercent { get; set; }

Property Value

int

ReducePatientSundayPercent

Reduction percentage for patient transports on Sundays from 0 (no transports) and 100 (as normal).

[Display(Description = "ReducePatientSundayPercent", ResourceType = typeof(CommandcenterLocalization))]
public int ReducePatientSundayPercent { get; set; }

Property Value

int

ResponseTimeNonVolunteerMax

The maximum time in seconds it takes for a non-volunteer unit to depart from a department after dispatch.

[Display(Description = "ResponseTimeNonVolunteerMax", ResourceType = typeof(CommandcenterLocalization))]
public int ResponseTimeNonVolunteerMax { get; set; }

Property Value

int

ResponseTimeNonVolunteerMin

The minimum time in seconds it takes for a non-volunteer unit to be dispatched and leave the department.

[Display(Description = "ResponseTimeNonVolunteerMin", ResourceType = typeof(CommandcenterLocalization))]
public int ResponseTimeNonVolunteerMin { get; set; }

Property Value

int

ResponseTimeVolunteerMax

The maximum time in seconds it takes for a volunteer unit to depart from a station after being dispatched.

[Display(Description = "ResponseTimeVolunteerMax", ResourceType = typeof(CommandcenterLocalization))]
public int ResponseTimeVolunteerMax { get; set; }

Property Value

int

ResponseTimeVolunteerMin

The minimum time in seconds it takes for a volunteer unit to be dispatched and leave the station.

[Display(Description = "ResponseTimeVolunteerMin", ResourceType = typeof(CommandcenterLocalization))]
public int ResponseTimeVolunteerMin { get; set; }

Property Value

int

UnitSpeedCarPercent

Adjustment percentage for the speed of cars under normal conditions, used to simulate varying response times based on vehicle type and urgency from 50 (fast) and 200 (slow). Default 100 (%).

[Display(Description = "UnitSpeedCarPercent", ResourceType = typeof(CommandcenterLocalization))]
public int UnitSpeedCarPercent { get; set; }

Property Value

int

UnitSpeedCarSirenPercent

Adjustment percentage for the speed of cars when a siren is used, simulating faster travel during emergencies from 50 (fast) and 200 (slow). Default 100 (%).

[Display(Description = "UnitSpeedCarSirenPercent", ResourceType = typeof(CommandcenterLocalization))]
public int UnitSpeedCarSirenPercent { get; set; }

Property Value

int

UnitSpeedTruckPercent

Adjustment percentage for the speed of trucks under normal conditions from 50 (fast) and 200 (slow). Default 100 (%).

[Display(Description = "UnitSpeedTruckPercent", ResourceType = typeof(CommandcenterLocalization))]
public int UnitSpeedTruckPercent { get; set; }

Property Value

int

UnitSpeedTruckSirenPercent

Adjustment percentage for the speed of trucks when a siren is used from 50 (fast) and 200 (slow). Default 100 (%).

[Display(Description = "UnitSpeedTruckSirenPercent", ResourceType = typeof(CommandcenterLocalization))]
public int UnitSpeedTruckSirenPercent { get; set; }

Property Value

int

Methods

CompareTo(Commandcenter?)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(Commandcenter? other)

Parameters

other Commandcenter

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:

Value Meaning
Less than zero This instance precedes other in the sort order.
Zero This instance occurs in the same position in the sort order as other.
Greater than zero This instance follows other in the sort order.

CompareTo(object?)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(object? obj)

Parameters

obj object

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:

Value Meaning
Less than zero This instance precedes obj in the sort order.
Zero This instance occurs in the same position in the sort order as obj.
Greater than zero This instance follows obj in the sort order.

Exceptions

ArgumentException

obj is not the same type as this instance.

GetAdjustedDriveDuration(double, bool, bool)

Adjusts the drive duration based on unit type, siren status, and speed percentage.

public double GetAdjustedDriveDuration(double duration, bool isTruck, bool isSirenOn)

Parameters

duration double

The original duration of the drive.

isTruck bool

A boolean indicating whether the unit is a truck.

isSirenOn bool

A boolean indicating whether the siren is activated.

Returns

double

The adjusted drive duration.

GetFullName()

Gets the full name by combining its localized category description and name.

public string GetFullName()

Returns

string

The full name of the dispatch center.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.