Math::SalvoCombatModeling

Heterogeneous salvo combat modeling

Math::SalvoCombatModeling

Raku package for the mathematical representation of missile battles. Certain battles involving drones and continuous fire can be also represented.

Installation

zef install Math::SalvoCombatModeling

Details

  • The original salvo combat model provides a mathematical representation of anti-ship missile battles between modern warships, [Wk1].

  • The Heterogeneous Salvo Combat Model (HSCM) extension of the original model allows more detailed and comprehensive modeling of missile, drone, and continuous fire combat scenarios.

  • The package provides functions for building HSCMs and -- very importantly -- functions reviewing the variables and definitions used in HSCMs.

  • A model generated with the package function heterogeneous-salvo-model gives matrix-based formulas for computing the damage inflicted on the forces.

  • The package has also functions for damage calculations using standard, summation formulas.

  • The implementation of the Raku package "Math::SalvoCombatModeling" closely follows the implementation of the Wolfram Language (WL) paclet "SalvoCombatModeling", [AAp1].

    • Since WL has (i) symbolic builtin computations and (ii) a mature notebook system the salvo models computation, representation, and study with WL is much more convenient.

Usage examples

Here we generate a homogeneous salvo combat model:

use Math::SalvoCombatModeling;

my $m = heterogeneous-salvo-model(['A', 2], ['B', 1])
# {A => {defense-matrix => [[(((gamma(A,B,1,1))*(delta(A,B,1,1))*(capitaltheta(A,B,1,1))*(tau(A,B,1,1)))/(zeta(A,1))) 0] [0 (((gamma(A,B,2,1))*(delta(A,B,2,1))*(capitaltheta(A,B,2,1))*(tau(A,B,2,1)))/(zeta(A,2)))]], offense-matrix => [[((beta(B,A,1,1))*((sigma(B,A,1,1))*(tau(B,A,1,1))*(rho(A,B,1,1)))*(capitalpsi(B,A,1,1)))/(zeta(A,1))] [((beta(B,A,1,2))*((sigma(B,A,1,2))*(tau(B,A,1,2))*(rho(A,B,2,1)))*(capitalpsi(B,A,1,2)))/(zeta(A,2))]], units => [A[1] A[2]]}, B => {defense-matrix => [[(((gamma(B,A,1,1))*(delta(B,A,1,1))*(capitaltheta(B,A,1,1))*(tau(B,A,1,1)))/(zeta(B,1))) + (((gamma(B,A,1,2))*(delta(B,A,1,2))*(capitaltheta(B,A,1,2))*(tau(B,A,1,2)))/(zeta(B,1)))]], offense-matrix => [[((beta(A,B,1,1))*((sigma(A,B,1,1))*(tau(A,B,1,1))*(rho(B,A,1,1)))*(capitalpsi(A,B,1,1)))/(zeta(B,1)) ((beta(A,B,2,1))*((sigma(A,B,2,1))*(tau(A,B,2,1))*(rho(B,A,1,2)))*(capitalpsi(A,B,2,1)))/(zeta(B,1))]], units => [B[1]]}}

The following table shows model variables and descriptions using salvo-variable-rules:

use Data::Translators;

salvo-variable-rules(['A',1], ['B', 2])
andthen .map({ <variable description> Z=> [$_.key, $_.value] })ยป.Hash
andthen .&to-html(field-names=> <variable description>, align => 'left')

Scope

Colors or emoji characters (like flags) can be used to designate the forces. For example, here is generated a model for "Red vs. Blue":

my $m = heterogeneous-salvo-model(['๐ŸŸฅ', 2], ['๐ŸŸฆ', 2]);
# {๐ŸŸฅ => {defense-matrix => [[(((gamma(๐ŸŸฅ,๐ŸŸฆ,1,1))*(delta(๐ŸŸฅ,๐ŸŸฆ,1,1))*(capitaltheta(๐ŸŸฅ,๐ŸŸฆ,1,1))*(tau(๐ŸŸฅ,๐ŸŸฆ,1,1)))/(zeta(๐ŸŸฅ,1))) + (((gamma(๐ŸŸฅ,๐ŸŸฆ,1,2))*(delta(๐ŸŸฅ,๐ŸŸฆ,1,2))*(capitaltheta(๐ŸŸฅ,๐ŸŸฆ,1,2))*(tau(๐ŸŸฅ,๐ŸŸฆ,1,2)))/(zeta(๐ŸŸฅ,1))) 0] [0 (((gamma(๐ŸŸฅ,๐ŸŸฆ,2,1))*(delta(๐ŸŸฅ,๐ŸŸฆ,2,1))*(capitaltheta(๐ŸŸฅ,๐ŸŸฆ,2,1))*(tau(๐ŸŸฅ,๐ŸŸฆ,2,1)))/(zeta(๐ŸŸฅ,2))) + (((gamma(๐ŸŸฅ,๐ŸŸฆ,2,2))*(delta(๐ŸŸฅ,๐ŸŸฆ,2,2))*(capitaltheta(๐ŸŸฅ,๐ŸŸฆ,2,2))*(tau(๐ŸŸฅ,๐ŸŸฆ,2,2)))/(zeta(๐ŸŸฅ,2)))]], offense-matrix => [[((beta(๐ŸŸฆ,๐ŸŸฅ,1,1))*((sigma(๐ŸŸฆ,๐ŸŸฅ,1,1))*(tau(๐ŸŸฆ,๐ŸŸฅ,1,1))*(rho(๐ŸŸฅ,๐ŸŸฆ,1,1)))*(capitalpsi(๐ŸŸฆ,๐ŸŸฅ,1,1)))/(zeta(๐ŸŸฅ,1)) ((beta(๐ŸŸฆ,๐ŸŸฅ,2,1))*((sigma(๐ŸŸฆ,๐ŸŸฅ,2,1))*(tau(๐ŸŸฆ,๐ŸŸฅ,2,1))*(rho(๐ŸŸฅ,๐ŸŸฆ,1,2)))*(capitalpsi(๐ŸŸฆ,๐ŸŸฅ,2,1)))/(zeta(๐ŸŸฅ,1))] [((beta(๐ŸŸฆ,๐ŸŸฅ,1,2))*((sigma(๐ŸŸฆ,๐ŸŸฅ,1,2))*(tau(๐ŸŸฆ,๐ŸŸฅ,1,2))*(rho(๐ŸŸฅ,๐ŸŸฆ,2,1)))*(capitalpsi(๐ŸŸฆ,๐ŸŸฅ,1,2)))/(zeta(๐ŸŸฅ,2)) ((beta(๐ŸŸฆ,๐ŸŸฅ,2,2))*((sigma(๐ŸŸฆ,๐ŸŸฅ,2,2))*(tau(๐ŸŸฆ,๐ŸŸฅ,2,2))*(rho(๐ŸŸฅ,๐ŸŸฆ,2,2)))*(capitalpsi(๐ŸŸฆ,๐ŸŸฅ,2,2)))/(zeta(๐ŸŸฅ,2))]], units => [๐ŸŸฅ[1] ๐ŸŸฅ[2]]}, ๐ŸŸฆ => {defense-matrix => [[(((gamma(๐ŸŸฆ,๐ŸŸฅ,1,1))*(delta(๐ŸŸฆ,๐ŸŸฅ,1,1))*(capitaltheta(๐ŸŸฆ,๐ŸŸฅ,1,1))*(tau(๐ŸŸฆ,๐ŸŸฅ,1,1)))/(zeta(๐ŸŸฆ,1))) + (((gamma(๐ŸŸฆ,๐ŸŸฅ,1,2))*(delta(๐ŸŸฆ,๐ŸŸฅ,1,2))*(capitaltheta(๐ŸŸฆ,๐ŸŸฅ,1,2))*(tau(๐ŸŸฆ,๐ŸŸฅ,1,2)))/(zeta(๐ŸŸฆ,1))) 0] [0 (((gamma(๐ŸŸฆ,๐ŸŸฅ,2,1))*(delta(๐ŸŸฆ,๐ŸŸฅ,2,1))*(capitaltheta(๐ŸŸฆ,๐ŸŸฅ,2,1))*(tau(๐ŸŸฆ,๐ŸŸฅ,2,1)))/(zeta(๐ŸŸฆ,2))) + (((gamma(๐ŸŸฆ,๐ŸŸฅ,2,2))*(delta(๐ŸŸฆ,๐ŸŸฅ,2,2))*(capitaltheta(๐ŸŸฆ,๐ŸŸฅ,2,2))*(tau(๐ŸŸฆ,๐ŸŸฅ,2,2)))/(zeta(๐ŸŸฆ,2)))]], offense-matrix => [[((beta(๐ŸŸฅ,๐ŸŸฆ,1,1))*((sigma(๐ŸŸฅ,๐ŸŸฆ,1,1))*(tau(๐ŸŸฅ,๐ŸŸฆ,1,1))*(rho(๐ŸŸฆ,๐ŸŸฅ,1,1)))*(capitalpsi(๐ŸŸฅ,๐ŸŸฆ,1,1)))/(zeta(๐ŸŸฆ,1)) ((beta(๐ŸŸฅ,๐ŸŸฆ,2,1))*((sigma(๐ŸŸฅ,๐ŸŸฆ,2,1))*(tau(๐ŸŸฅ,๐ŸŸฆ,2,1))*(rho(๐ŸŸฆ,๐ŸŸฅ,1,2)))*(capitalpsi(๐ŸŸฅ,๐ŸŸฆ,2,1)))/(zeta(๐ŸŸฆ,1))] [((beta(๐ŸŸฅ,๐ŸŸฆ,1,2))*((sigma(๐ŸŸฅ,๐ŸŸฆ,1,2))*(tau(๐ŸŸฅ,๐ŸŸฆ,1,2))*(rho(๐ŸŸฆ,๐ŸŸฅ,2,1)))*(capitalpsi(๐ŸŸฅ,๐ŸŸฆ,1,2)))/(zeta(๐ŸŸฆ,2)) ((beta(๐ŸŸฅ,๐ŸŸฆ,2,2))*((sigma(๐ŸŸฅ,๐ŸŸฆ,2,2))*(tau(๐ŸŸฅ,๐ŸŸฆ,2,2))*(rho(๐ŸŸฆ,๐ŸŸฅ,2,2)))*(capitalpsi(๐ŸŸฅ,๐ŸŸฆ,2,2)))/(zeta(๐ŸŸฆ,2))]], units => [๐ŸŸฆ[1] ๐ŸŸฆ[2]]}}

The sub heterogeneous-salvo-model takes an optional parameter-function argument. Without that parameter function being specified the salvo model is returned as hashmap of strings (as above.) If the parameter function is specified the corresponding numeric computations are done. For complete worked example see the notebook "Battle-of-Coronel.ipynb" or the corresponding script "Battle-of-Coronel.raku".

To see the combat salvo modeling definitions in Bulgarian, English, or Russian, the sub salvo-notion-definitions can be used:

salvo-notion-definitions('English')
==> to-html(align => 'left')

References

Articles, theses

[MJ1] Michael D. Johns, Steven E. Pilnick, Wayne P. Hughes, "Heterogeneous Salvo Model for the Navy After Next", (2000), Defense Technical Information Center.

[TB1] Thomas R. Beall, "The Development of a Naval Battle Model and Its Validation Using Historical Data", (1990), Defense Technical Information Center.

[Wk1] Wikipedia entry, Salvo combat model.

Packages, paclets

[AAp2] Anton Antonov, SalvoCombatModeling, Wolfram Language paclet, (2024), Wolfram Language Paclet Repository.

Math::SalvoCombatModeling v0.0.1

Heterogeneous salvo combat modeling

Authors

  • Anton Antonov

License

Artistic-2.0

Dependencies

JSON::Fast

Test Dependencies

Provides

  • Math::SalvoCombatModeling

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.