← All challenges

Soldier Payment Rules

August 2023

business-rulesscheduling

This challenge brings back “Soldier Payment Rules,” which only received two solutions when it originally ran in 2017 — a good opportunity to show off the expressive power of your DMN or other decision management tool.

During different service periods a soldier may have several overlapping characteristics: rank (private, corporal, sergeant, lieutenant, captain — these must not overlap each other), profession (fighter, driver, cook, officer), service type (active, reserve, retired), unit (HQ, paratroopers, marines, infantry), and combat status (yes/no). The hourly pay rate aggregates a base rate of $1/hr plus amounts for each characteristic: private $1, corporal $2, sergeant $3, lieutenant $4, captain $5; fighter $2, driver $1, cook $1, officer $3; active $2, reserve $1; HQ $1, other units $2; combat $5, non-combat $0.

For example, a private who is a fighter, on active duty, at HQ, in combat, earns 1+1+2+2+1+5 = $12/hr.

The challenge: assemble a single timeline for a soldier over a given service period that shows the hourly pay rate at any given time, flagging any conflicting/overlapping rank assignments. Additional challenge: identify all the distinct aggregated pay rates that apply and the periods during which each applies.

Send your solutions to DecisionManagementCommunity@gmail.com, or open a pull request to add yours here.

Solutions