Added fuel treshold and damage treshold as default parameter setting methods

* Added method :SetDefaultFuelTreshold( FuelTreshold )
* Added method :SetDefaultDamageTreshold( DamageTreshold )
This commit is contained in:
FlightControl_Master 2017-07-30 10:39:10 +02:00
parent 82a3dd32c0
commit 5107366e57
10 changed files with 463 additions and 171 deletions

View File

@ -70,8 +70,8 @@ function AI_A2A:New( AIGroup )
self:SetControllable( AIGroup )
self:ManageFuel( .2, 60 )
self:ManageDamage( 0.4 )
self:SetFuelTreshold( .2, 60 )
self:SetDamageTreshold( 0.4 )
self:SetStartState( "Stopped" )
@ -314,7 +314,7 @@ end
-- @param #number PatrolFuelTresholdPercentage The treshold in percentage (between 0 and 1) when the AIControllable is considered to get out of fuel.
-- @param #number PatrolOutOfFuelOrbitTime The amount of seconds the out of fuel AIControllable will orbit before returning to the base.
-- @return #AI_A2A self
function AI_A2A:ManageFuel( PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime )
function AI_A2A:SetFuelTreshold( PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime )
self.PatrolManageFuel = true
self.PatrolFuelTresholdPercentage = PatrolFuelTresholdPercentage
@ -334,7 +334,7 @@ end
-- @param #AI_A2A self
-- @param #number PatrolDamageTreshold The treshold in percentage (between 0 and 1) when the AI is considered to be damaged.
-- @return #AI_A2A self
function AI_A2A:ManageDamage( PatrolDamageTreshold )
function AI_A2A:SetDamageTreshold( PatrolDamageTreshold )
self.PatrolManageDamage = true
self.PatrolDamageTreshold = PatrolDamageTreshold

View File

@ -390,13 +390,6 @@ do -- AI_A2A_DISPATCHER
-- * @{#AI_A2A_DISPATCHER.SetSquadronTakeoffFromRunway}() will spawn new aircraft at the runway at the airfield.
--
-- **The default landing method is to spawn new aircraft directly in the air.**
-- **The default takeoff method can be set for ALL squadrons that don't have an individual takeoff method configured.**
--
-- * @{#AI_A2A_DISPATCHER.SetDefaultTakeoff}() is the generic configuration method to control takeoff by default from the air, hot, cold or from the runway. See the method for further details.
-- * @{#AI_A2A_DISPATCHER.SetDefaultTakeoffInAir}() will spawn by default new aircraft from the squadron directly in the air.
-- * @{#AI_A2A_DISPATCHER.SetDefaultTakeoffFromParkingCold}() will spawn by default new aircraft in without running engines at a parking spot at the airfield.
-- * @{#AI_A2A_DISPATCHER.SetDefaultTakeoffFromParkingHot}() will spawn by default new aircraft in with running engines at a parking spot at the airfield.
-- * @{#AI_A2A_DISPATCHER.SetDefaultTakeoffFromRunway}() will spawn by default new aircraft at the runway at the airfield.
--
-- Use these methods to fine-tune for specific airfields that are known to create bottlenecks, or have reduced airbase efficiency.
-- The more and the longer aircraft need to taxi at an airfield, the more risk there is that:
@ -434,13 +427,6 @@ do -- AI_A2A_DISPATCHER
-- * @{#AI_A2A_DISPATCHER.SetSquadronLandingAtRunway}() will despawn the returning aircraft directly after landing at the runway.
-- * @{#AI_A2A_DISPATCHER.SetSquadronLandingAtEngineShutdown}() will despawn the returning aircraft when the aircraft has returned to its parking spot and has turned off its engines.
--
-- **The default landing method can be set for ALL squadrons that don't have an individual landing method configured.**
--
-- * @{#AI_A2A_DISPATCHER.SetDefaultLanding}() is the generic configuration method to control by default landing, namely despawn the aircraft near the airfield in the air, right after landing, or at engine shutdown.
-- * @{#AI_A2A_DISPATCHER.SetDefaultLandingNearAirbase}() will despawn by default the returning aircraft in the air when near the airfield.
-- * @{#AI_A2A_DISPATCHER.SetDefaultLandingAtRunway}() will despawn by default the returning aircraft directly after landing at the runway.
-- * @{#AI_A2A_DISPATCHER.SetDefaultLandingAtEngineShutdown}() will despawn by default the returning aircraft when the aircraft has returned to its parking spot and has turned off its engines.
--
-- You can use these methods to minimize the airbase coodination overhead and to increase the airbase efficiency.
-- When there are lots of aircraft returning for landing, at the same airbase, the takeoff process will be halted, which can cause a complete failure of the
-- A2A defense system, as no new CAP or GCI planes can takeoff.
@ -476,11 +462,7 @@ do -- AI_A2A_DISPATCHER
--
-- The **grouping value is set for a Squadron**, and can be **dynamically adjusted** during mission execution, so to adjust the defense flights grouping when the tactical situation changes.
--
-- **The default grouping value can be set for ALL squadrons that don't have an individual grouping value configured.**
--
-- Use the method @{#AI_A2A_DISPATCHER.SetDefaultGrouping}() to set the **default grouping** of spawned airplanes for all squadrons.
--
-- ### 6.4. Balance or setup effectiveness of the air defenses in case of GCI
-- ### 6.4. Overhead and Balance the effectiveness of the air defenses in case of GCI
--
-- The effectiveness can be set with the **overhead parameter**. This is a number that is used to calculate the amount of Units that dispatching command will allocate to GCI in surplus of detected amount of units.
-- The **default value** of the overhead parameter is 1.0, which means **equal balance**.
@ -504,10 +486,6 @@ do -- AI_A2A_DISPATCHER
--
-- The **overhead value is set for a Squadron**, and can be **dynamically adjusted** during mission execution, so to adjust the defense overhead when the tactical situation changes.
--
-- **The default overhead value can be set for ALL squadrons that don't have an individual overhead value configured.**
--
-- Use the @{#AI_A2A_DISPATCHER.SetDefaultOverhead}() method can be used to set the default the defense strength for ALL squadrons.
--
-- ## 7. Setup a squadron for CAP
--
-- ### 7.1. Set the CAP zones
@ -607,9 +585,66 @@ do -- AI_A2A_DISPATCHER
-- Use the method @{#AI_A2A_DISPATCHER.SetTacticalDisplay}() to switch on the tactical display panel. The default will not show this panel.
-- Note that there may be some performance impact if this panel is shown.
--
-- ## 10. Q & A:
-- ## 10. Defaults settings.
--
-- ### 10.1. Which countries will be selected for each coalition?
-- This provides a good overview of the different parameters that are setup or hardcoded by default.
-- For some default settings, a method is available that allows you to tweak the defaults.
--
-- ## 10.1. Default takeoff method.
--
-- The default **takeoff method** is set to **in the air**, which means that new spawned airplanes will be spawned directly in the air above the airbase by default.
--
-- **The default takeoff method can be set for ALL squadrons that don't have an individual takeoff method configured.**
--
-- * @{#AI_A2A_DISPATCHER.SetDefaultTakeoff}() is the generic configuration method to control takeoff by default from the air, hot, cold or from the runway. See the method for further details.
-- * @{#AI_A2A_DISPATCHER.SetDefaultTakeoffInAir}() will spawn by default new aircraft from the squadron directly in the air.
-- * @{#AI_A2A_DISPATCHER.SetDefaultTakeoffFromParkingCold}() will spawn by default new aircraft in without running engines at a parking spot at the airfield.
-- * @{#AI_A2A_DISPATCHER.SetDefaultTakeoffFromParkingHot}() will spawn by default new aircraft in with running engines at a parking spot at the airfield.
-- * @{#AI_A2A_DISPATCHER.SetDefaultTakeoffFromRunway}() will spawn by default new aircraft at the runway at the airfield.
--
-- ## 10.2. Default landing method.
--
-- The default **landing method** is set to **near the airbase**, which means that returning airplanes will be despawned directly in the air by default.
--
-- The default landing method can be set for ALL squadrons that don't have an individual landing method configured.
--
-- * @{#AI_A2A_DISPATCHER.SetDefaultLanding}() is the generic configuration method to control by default landing, namely despawn the aircraft near the airfield in the air, right after landing, or at engine shutdown.
-- * @{#AI_A2A_DISPATCHER.SetDefaultLandingNearAirbase}() will despawn by default the returning aircraft in the air when near the airfield.
-- * @{#AI_A2A_DISPATCHER.SetDefaultLandingAtRunway}() will despawn by default the returning aircraft directly after landing at the runway.
-- * @{#AI_A2A_DISPATCHER.SetDefaultLandingAtEngineShutdown}() will despawn by default the returning aircraft when the aircraft has returned to its parking spot and has turned off its engines.
--
-- ## 10.3. Default overhead.
--
-- The default **overhead** is set to **1**. That essentially means that there isn't any overhead set by default.
--
-- The default overhead value can be set for ALL squadrons that don't have an individual overhead value configured.
--
-- Use the @{#AI_A2A_DISPATCHER.SetDefaultOverhead}() method can be used to set the default overhead or defense strength for ALL squadrons.
--
-- ## 10.4. Default grouping.
--
-- The default **grouping** is set to **one airplane**. That essentially means that there won't be any grouping applied by default.
--
-- The default grouping value can be set for ALL squadrons that don't have an individual grouping value configured.
--
-- Use the method @{#AI_A2A_DISPATCHER.SetDefaultGrouping}() to set the **default grouping** of spawned airplanes for all squadrons.
--
-- ## 10.5. RTB fuel treshold.
--
-- When an airplane gets **out of fuel** to a certain %-tage, which is **15% (0.15)**, it will go RTB, and will be replaced with a new airplane when applicable.
--
-- Use the method @{#AI_A2A_DISPATCHER.SetDefaultFuelTreshold}() to set the **default fuel treshold** of spawned airplanes for all squadrons.
--
-- ## 10.6. RTB damage treshold.
--
-- When an airplane is **damaged** to a certain %-tage, which is **40% (0.40)**, it will go RTB, and will be replaced with a new airplane when applicable.
--
-- Use the method @{#AI_A2A_DISPATCHER.SetDefaultDamageTreshold}() to set the **default damage treshold** of spawned airplanes for all squadrons.
--
--
-- ## 11. Q & A:
--
-- ### 11.1. Which countries will be selected for each coalition?
--
-- Which countries are assigned to a coalition influences which units are available to the coalition.
-- For example because the mission calls for a EWR radar on the blue side the Ukraine might be chosen as a blue country
@ -617,7 +652,7 @@ do -- AI_A2A_DISPATCHER
-- Some countries assign different tasking to aircraft, for example Germany assigns the CAP task to F-4E Phantoms but the USA does not.
-- Therefore if F4s are wanted as a coalitions CAP or GCI aircraft Germany will need to be assigned to that coalition.
--
-- ### 10.2. Country, type, load out, skill and skins for CAP and GCI aircraft?
-- ### 11.2. Country, type, load out, skill and skins for CAP and GCI aircraft?
--
-- * Note these can be from any countries within the coalition but must be an aircraft with one of the main tasks being “CAP”.
-- * Obviously skins which are selected must be available to all players that join the mission otherwise they will see a default skin.
@ -695,6 +730,8 @@ do -- AI_A2A_DISPATCHER
self:SetDefaultLanding( AI_A2A_DISPATCHER.Landing.NearAirbase )
self:SetDefaultOverhead( 1 )
self:SetDefaultGrouping( 1 )
self:SetDefaultFuelTreshold( 0.15, 0 ) -- 15% of fuel remaining in the tank will trigger the airplane to return to base or refuel.
self:SetDefaultDamageTreshold( 0.4 ) -- When 40% of damage, go RTB.
self:AddTransition( "Started", "Assign", "Started" )
@ -973,6 +1010,49 @@ do -- AI_A2A_DISPATCHER
return self
end
--- Set the default fuel treshold when defenders will RTB or Refuel in the air.
-- The fuel treshold is by default set to 15%, which means that an airplane will stay in the air until 15% of its fuel has been consumed.
-- @param #AI_A2A_DISPATCHER self
-- @param #number FuelTreshold A decimal number between 0 and 1, that expresses the %-tage of the treshold of fuel remaining in the tank when the plane will go RTB or Refuel.
-- @return #AI_A2A_DISPATCHER
-- @usage
--
-- -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
-- A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
--
-- -- Now Setup the default fuel treshold.
-- A2ADispatcher:SetDefaultRefuelTreshold( 0.30 ) -- Go RTB when only 30% of fuel remaining in the tank.
--
function AI_A2A_DISPATCHER:SetDefaultFuelTreshold( FuelTreshold )
self.DefenderDefault.FuelTreshold = FuelTreshold
return self
end
--- Set the default damage treshold when defenders will RTB.
-- The default damage treshold is by default set to 40%, which means that when the airplane is 40% damaged, it will go RTB.
-- @param #AI_A2A_DISPATCHER self
-- @param #number DamageTreshold A decimal number between 0 and 1, that expresses the %-tage of the damage treshold before going RTB.
-- @return #AI_A2A_DISPATCHER
-- @usage
--
-- -- Now Setup the A2A dispatcher, and initialize it using the Detection object.
-- A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
--
-- -- Now Setup the default damage treshold.
-- A2ADispatcher:SetDefaultDamageTreshold( 0.90 ) -- Go RTB when the airplane 90% damaged.
--
function AI_A2A_DISPATCHER:SetDefaultDamageTreshold( DamageTreshold )
self.DefenderDefault.DamageTreshold = DamageTreshold
return self
end
--- Calculates which AI friendlies are nearby the area
-- @param #AI_A2A_DISPATCHER self
-- @param DetectedItem
@ -2125,8 +2205,10 @@ do -- AI_A2A_DISPATCHER
local Fsm = AI_A2A_CAP:New( DefenderCAP, Cap.Zone, Cap.FloorAltitude, Cap.CeilingAltitude, Cap.PatrolMinSpeed, Cap.PatrolMaxSpeed, Cap.EngageMinSpeed, Cap.EngageMaxSpeed, Cap.AltType )
Fsm:SetDispatcher( self )
Fsm:SetHomeAirbase( DefenderSquadron.Airbase )
Fsm:SetFuelTreshold( self.DefenderDefault.FuelTreshold, 60 )
Fsm:SetDamageTreshold( self.DefenderDefault.DamageTreshold )
Fsm:Start()
Fsm:__Patrol( 1 )
Fsm:__Patrol( 2 )
self:SetDefenderTask( DefenderCAP, "CAP", Fsm )
end
@ -2255,8 +2337,10 @@ do -- AI_A2A_DISPATCHER
local Fsm = AI_A2A_GCI:New( DefenderGCI, Gci.EngageMinSpeed, Gci.EngageMaxSpeed )
Fsm:SetDispatcher( self )
Fsm:SetHomeAirbase( DefenderSquadron.Airbase )
Fsm:SetFuelTreshold( self.DefenderDefault.FuelTreshold, 60 )
Fsm:SetDamageTreshold( self.DefenderDefault.DamageTreshold )
Fsm:Start()
Fsm:__Engage( 5, Target.Set ) -- Engage on the TargetSetUnit
Fsm:__Engage( 2, Target.Set ) -- Engage on the TargetSetUnit
self:SetDefenderTask( DefenderGCI, "GCI", Fsm, Target )

View File

@ -164,18 +164,6 @@
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).IdleCount">AI_A2A.IdleCount</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).ManageDamage">AI_A2A:ManageDamage(PatrolDamageTreshold)</a></td>
<td class="summary">
<p>When the AI is damaged beyond a certain treshold, it is required that the AI returns to the home base.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).ManageFuel">AI_A2A:ManageFuel(PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime)</a></td>
<td class="summary">
<p>When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base.</p>
</td>
</tr>
<tr>
@ -344,12 +332,24 @@
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).SetAltitude">AI_A2A:SetAltitude(PatrolFloorAltitude, PatrolCeilingAltitude)</a></td>
<td class="summary">
<p>Sets the floor and ceiling altitude of the patrol.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).SetDamageTreshold">AI_A2A:SetDamageTreshold(PatrolDamageTreshold)</a></td>
<td class="summary">
<p>When the AI is damaged beyond a certain treshold, it is required that the AI returns to the home base.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).SetDispatcher">AI_A2A:SetDispatcher(Dispatcher)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A).SetFuelTreshold">AI_A2A:SetFuelTreshold(PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime)</a></td>
<td class="summary">
<p>When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base.</p>
</td>
</tr>
<tr>
@ -575,7 +575,6 @@
<dl class="function">
<dt>
<em>#number</em>
<a id="#(AI_A2A).IdleCount" >
<strong>AI_A2A.IdleCount</strong>
</a>
@ -584,78 +583,6 @@
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A).ManageDamage" >
<strong>AI_A2A:ManageDamage(PatrolDamageTreshold)</strong>
</a>
</dt>
<dd>
<p>When the AI is damaged beyond a certain treshold, it is required that the AI returns to the home base.</p>
<p>However, damage cannot be foreseen early on.
Therefore, when the damage treshold is reached,
the AI will return immediately to the home base (RTB).
Note that for groups, the average damage of the complete group will be calculated.
So, in a group of 4 airplanes, 2 lost and 2 with damage 0.2, the damage treshold will be 0.25.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#number PatrolDamageTreshold </em></code>:
The treshold in percentage (between 0 and 1) when the AI is considered to be damaged.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A)">#AI_A2A</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A).ManageFuel" >
<strong>AI_A2A:ManageFuel(PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime)</strong>
</a>
</dt>
<dd>
<p>When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base.</p>
<p>Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated.
When the fuel treshold is reached, the AI will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AI_A2A.
Once the time is finished, the old AI will return to the base.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#number PatrolFuelTresholdPercentage </em></code>:
The treshold in percentage (between 0 and 1) when the AIControllable is considered to get out of fuel.</p>
</li>
<li>
<p><code><em>#number PatrolOutOfFuelOrbitTime </em></code>:
The amount of seconds the out of fuel AIControllable will orbit before returning to the base.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A)">#AI_A2A</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
@ -1436,6 +1363,40 @@ self</p>
<dl class="function">
<dt>
<a id="#(AI_A2A).SetDamageTreshold" >
<strong>AI_A2A:SetDamageTreshold(PatrolDamageTreshold)</strong>
</a>
</dt>
<dd>
<p>When the AI is damaged beyond a certain treshold, it is required that the AI returns to the home base.</p>
<p>However, damage cannot be foreseen early on.
Therefore, when the damage treshold is reached,
the AI will return immediately to the home base (RTB).
Note that for groups, the average damage of the complete group will be calculated.
So, in a group of 4 airplanes, 2 lost and 2 with damage 0.2, the damage treshold will be 0.25.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#number PatrolDamageTreshold </em></code>:
The treshold in percentage (between 0 and 1) when the AI is considered to be damaged.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A)">#AI_A2A</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A).SetDispatcher" >
<strong>AI_A2A:SetDispatcher(Dispatcher)</strong>
</a>
@ -1457,6 +1418,44 @@ self</p>
<dl class="function">
<dt>
<a id="#(AI_A2A).SetFuelTreshold" >
<strong>AI_A2A:SetFuelTreshold(PatrolFuelTresholdPercentage, PatrolOutOfFuelOrbitTime)</strong>
</a>
</dt>
<dd>
<p>When the AI is out of fuel, it is required that a new AI is started, before the old AI can return to the home base.</p>
<p>Therefore, with a parameter and a calculation of the distance to the home base, the fuel treshold is calculated.
When the fuel treshold is reached, the AI will continue for a given time its patrol task in orbit, while a new AIControllable is targetted to the AI_A2A.
Once the time is finished, the old AI will return to the base.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#number PatrolFuelTresholdPercentage </em></code>:
The treshold in percentage (between 0 and 1) when the AIControllable is considered to get out of fuel.</p>
</li>
<li>
<p><code><em>#number PatrolOutOfFuelOrbitTime </em></code>:
The amount of seconds the out of fuel AIControllable will orbit before returning to the base.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A)">#AI_A2A</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A).SetHomeAirbase" >
<strong>AI_A2A:SetHomeAirbase(HomeAirbase)</strong>
</a>

View File

@ -288,7 +288,7 @@ Per one, two, three, four?</p>
<tr>
<td class="name" nowrap="nowrap"><a href="#AI_A2A_GCICAP">AI_A2A_GCICAP</a></td>
<td class="summary">
<h1>AI_A2A_GCICAP class, extends <a href="AI.html##(AI_A2A_DISPATCHER)">AI#AI<em>A2A</em>DISPATCHER</a></h1>
<h1>AI_A2A_GCICAP class, extends <a href="AI_A2A_Dispatcher.html##(AI_A2A_DISPATCHER)">AI<em>A2A</em>Dispatcher#AI<em>A2A</em>DISPATCHER</a></h1>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia1.JPG" alt="Banner Image"/></p>
@ -602,6 +602,18 @@ Per one, two, three, four?</p>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetBorderZone">AI_A2A_DISPATCHER:SetBorderZone(BorderZone)</a></td>
<td class="summary">
<p>Define a border area to simulate a <strong>cold war</strong> scenario.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetDefaultDamageTreshold">AI_A2A_DISPATCHER:SetDefaultDamageTreshold(DamageTreshold)</a></td>
<td class="summary">
<p>Set the default damage treshold when defenders will RTB.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_DISPATCHER).SetDefaultFuelTreshold">AI_A2A_DISPATCHER:SetDefaultFuelTreshold(FuelTreshold)</a></td>
<td class="summary">
<p>Set the default fuel treshold when defenders will RTB or Refuel in the air.</p>
</td>
</tr>
<tr>
@ -855,9 +867,15 @@ Per one, two, three, four?</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_GCICAP).New">AI_A2A_GCICAP:New(<, GroupingRadius, EWRPrefixes, TemplatePrefixes, CAPPrefixes, CapLimit, EngageRadius)</a></td>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_GCICAP).New">AI_A2A_GCICAP:New(EWRPrefixes, TemplatePrefixes, CapPrefixes, CapLimit, GroupingRadius, EngageRadius, GciRadius)</a></td>
<td class="summary">
<p>AI<em>A2A</em>GCICAP constructor.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(AI_A2A_GCICAP).NewWithBorder">AI_A2A_GCICAP:NewWithBorder(EWRPrefixes, TemplatePrefixes, BorderPrefix, CapPrefixes, CapLimit, GroupingRadius, EngageRadius, GciRadius)</a></td>
<td class="summary">
<p>AI<em>A2A</em>GCICAP constructor with border.</p>
</td>
</tr>
<tr>
@ -1119,16 +1137,7 @@ while defining which plane types are being used by the squadron and how many res
<li><a href="##(AI_A2A_DISPATCHER).SetSquadronTakeoffFromRunway">AI<em>A2A</em>DISPATCHER.SetSquadronTakeoffFromRunway</a>() will spawn new aircraft at the runway at the airfield.</li>
</ul>
<p><strong>The default landing method is to spawn new aircraft directly in the air.</strong>
<strong>The default takeoff method can be set for ALL squadrons that don't have an individual takeoff method configured.</strong></p>
<ul>
<li><a href="##(AI_A2A_DISPATCHER).SetDefaultTakeoff">AI<em>A2A</em>DISPATCHER.SetDefaultTakeoff</a>() is the generic configuration method to control takeoff by default from the air, hot, cold or from the runway. See the method for further details.</li>
<li><a href="##(AI_A2A_DISPATCHER).SetDefaultTakeoffInAir">AI<em>A2A</em>DISPATCHER.SetDefaultTakeoffInAir</a>() will spawn by default new aircraft from the squadron directly in the air.</li>
<li><a href="##(AI_A2A_DISPATCHER).SetDefaultTakeoffFromParkingCold">AI<em>A2A</em>DISPATCHER.SetDefaultTakeoffFromParkingCold</a>() will spawn by default new aircraft in without running engines at a parking spot at the airfield.</li>
<li><a href="##(AI_A2A_DISPATCHER).SetDefaultTakeoffFromParkingHot">AI<em>A2A</em>DISPATCHER.SetDefaultTakeoffFromParkingHot</a>() will spawn by default new aircraft in with running engines at a parking spot at the airfield.</li>
<li><a href="##(AI_A2A_DISPATCHER).SetDefaultTakeoffFromRunway">AI<em>A2A</em>DISPATCHER.SetDefaultTakeoffFromRunway</a>() will spawn by default new aircraft at the runway at the airfield.</li>
</ul>
<p><strong>The default landing method is to spawn new aircraft directly in the air.</strong></p>
<p>Use these methods to fine-tune for specific airfields that are known to create bottlenecks, or have reduced airbase efficiency.
The more and the longer aircraft need to taxi at an airfield, the more risk there is that:</p>
@ -1171,15 +1180,6 @@ And for a couple of squadrons overrides this default method.</p>
<li><a href="##(AI_A2A_DISPATCHER).SetSquadronLandingAtEngineShutdown">AI<em>A2A</em>DISPATCHER.SetSquadronLandingAtEngineShutdown</a>() will despawn the returning aircraft when the aircraft has returned to its parking spot and has turned off its engines.</li>
</ul>
<p><strong>The default landing method can be set for ALL squadrons that don't have an individual landing method configured.</strong></p>
<ul>
<li><a href="##(AI_A2A_DISPATCHER).SetDefaultLanding">AI<em>A2A</em>DISPATCHER.SetDefaultLanding</a>() is the generic configuration method to control by default landing, namely despawn the aircraft near the airfield in the air, right after landing, or at engine shutdown.</li>
<li><a href="##(AI_A2A_DISPATCHER).SetDefaultLandingNearAirbase">AI<em>A2A</em>DISPATCHER.SetDefaultLandingNearAirbase</a>() will despawn by default the returning aircraft in the air when near the airfield.</li>
<li><a href="##(AI_A2A_DISPATCHER).SetDefaultLandingAtRunway">AI<em>A2A</em>DISPATCHER.SetDefaultLandingAtRunway</a>() will despawn by default the returning aircraft directly after landing at the runway.</li>
<li><a href="##(AI_A2A_DISPATCHER).SetDefaultLandingAtEngineShutdown">AI<em>A2A</em>DISPATCHER.SetDefaultLandingAtEngineShutdown</a>() will despawn by default the returning aircraft when the aircraft has returned to its parking spot and has turned off its engines.</li>
</ul>
<p>You can use these methods to minimize the airbase coodination overhead and to increase the airbase efficiency.
When there are lots of aircraft returning for landing, at the same airbase, the takeoff process will be halted, which can cause a complete failure of the
A2A defense system, as no new CAP or GCI planes can takeoff.
@ -1216,11 +1216,7 @@ a GCI needs to be started, the GCI flights will be grouped as follows: Group 1 o
<p>The <strong>grouping value is set for a Squadron</strong>, and can be <strong>dynamically adjusted</strong> during mission execution, so to adjust the defense flights grouping when the tactical situation changes.</p>
<p><strong>The default grouping value can be set for ALL squadrons that don't have an individual grouping value configured.</strong></p>
<p>Use the method <a href="##(AI_A2A_DISPATCHER).SetDefaultGrouping">AI<em>A2A</em>DISPATCHER.SetDefaultGrouping</a>() to set the <strong>default grouping</strong> of spawned airplanes for all squadrons.</p>
<h3>6.4. Balance or setup effectiveness of the air defenses in case of GCI</h3>
<h3>6.4. Overhead and Balance the effectiveness of the air defenses in case of GCI</h3>
<p>The effectiveness can be set with the <strong>overhead parameter</strong>. This is a number that is used to calculate the amount of Units that dispatching command will allocate to GCI in surplus of detected amount of units.
The <strong>default value</strong> of the overhead parameter is 1.0, which means <strong>equal balance</strong>. </p>
@ -1246,10 +1242,6 @@ multiplied by the Overhead and rounded up to the smallest integer. </p>
<p>The <strong>overhead value is set for a Squadron</strong>, and can be <strong>dynamically adjusted</strong> during mission execution, so to adjust the defense overhead when the tactical situation changes.</p>
<p><strong>The default overhead value can be set for ALL squadrons that don't have an individual overhead value configured.</strong></p>
<p>Use the <a href="##(AI_A2A_DISPATCHER).SetDefaultOverhead">AI<em>A2A</em>DISPATCHER.SetDefaultOverhead</a>() method can be used to set the default the defense strength for ALL squadrons.</p>
<h2>7. Setup a squadron for CAP</h2>
<h3>7.1. Set the CAP zones</h3>
@ -1355,9 +1347,70 @@ too short will mean that the intruders may have alraedy passed the ideal interce
Use the method <a href="##(AI_A2A_DISPATCHER).SetTacticalDisplay">AI<em>A2A</em>DISPATCHER.SetTacticalDisplay</a>() to switch on the tactical display panel. The default will not show this panel.
Note that there may be some performance impact if this panel is shown.</p>
<h2>10. Q &amp; A:</h2>
<h2>10. Defaults settings.</h2>
<h3>10.1. Which countries will be selected for each coalition?</h3>
<p>This provides a good overview of the different parameters that are setup or hardcoded by default.
For some default settings, a method is available that allows you to tweak the defaults.</p>
<h2>10.1. Default takeoff method.</h2>
<p>The default <strong>takeoff method</strong> is set to <strong>in the air</strong>, which means that new spawned airplanes will be spawned directly in the air above the airbase by default.</p>
<p><strong>The default takeoff method can be set for ALL squadrons that don't have an individual takeoff method configured.</strong></p>
<ul>
<li><a href="##(AI_A2A_DISPATCHER).SetDefaultTakeoff">AI<em>A2A</em>DISPATCHER.SetDefaultTakeoff</a>() is the generic configuration method to control takeoff by default from the air, hot, cold or from the runway. See the method for further details.</li>
<li><a href="##(AI_A2A_DISPATCHER).SetDefaultTakeoffInAir">AI<em>A2A</em>DISPATCHER.SetDefaultTakeoffInAir</a>() will spawn by default new aircraft from the squadron directly in the air.</li>
<li><a href="##(AI_A2A_DISPATCHER).SetDefaultTakeoffFromParkingCold">AI<em>A2A</em>DISPATCHER.SetDefaultTakeoffFromParkingCold</a>() will spawn by default new aircraft in without running engines at a parking spot at the airfield.</li>
<li><a href="##(AI_A2A_DISPATCHER).SetDefaultTakeoffFromParkingHot">AI<em>A2A</em>DISPATCHER.SetDefaultTakeoffFromParkingHot</a>() will spawn by default new aircraft in with running engines at a parking spot at the airfield.</li>
<li><a href="##(AI_A2A_DISPATCHER).SetDefaultTakeoffFromRunway">AI<em>A2A</em>DISPATCHER.SetDefaultTakeoffFromRunway</a>() will spawn by default new aircraft at the runway at the airfield.</li>
</ul>
<h2>10.2. Default landing method.</h2>
<p>The default <strong>landing method</strong> is set to <strong>near the airbase</strong>, which means that returning airplanes will be despawned directly in the air by default.</p>
<p>The default landing method can be set for ALL squadrons that don't have an individual landing method configured.</p>
<ul>
<li><a href="##(AI_A2A_DISPATCHER).SetDefaultLanding">AI<em>A2A</em>DISPATCHER.SetDefaultLanding</a>() is the generic configuration method to control by default landing, namely despawn the aircraft near the airfield in the air, right after landing, or at engine shutdown.</li>
<li><a href="##(AI_A2A_DISPATCHER).SetDefaultLandingNearAirbase">AI<em>A2A</em>DISPATCHER.SetDefaultLandingNearAirbase</a>() will despawn by default the returning aircraft in the air when near the airfield.</li>
<li><a href="##(AI_A2A_DISPATCHER).SetDefaultLandingAtRunway">AI<em>A2A</em>DISPATCHER.SetDefaultLandingAtRunway</a>() will despawn by default the returning aircraft directly after landing at the runway.</li>
<li><a href="##(AI_A2A_DISPATCHER).SetDefaultLandingAtEngineShutdown">AI<em>A2A</em>DISPATCHER.SetDefaultLandingAtEngineShutdown</a>() will despawn by default the returning aircraft when the aircraft has returned to its parking spot and has turned off its engines.</li>
</ul>
<h2>10.3. Default overhead.</h2>
<p>The default <strong>overhead</strong> is set to <strong>1</strong>. That essentially means that there isn't any overhead set by default.</p>
<p>The default overhead value can be set for ALL squadrons that don't have an individual overhead value configured.</p>
<p>Use the <a href="##(AI_A2A_DISPATCHER).SetDefaultOverhead">AI<em>A2A</em>DISPATCHER.SetDefaultOverhead</a>() method can be used to set the default overhead or defense strength for ALL squadrons.</p>
<h2>10.4. Default grouping.</h2>
<p>The default <strong>grouping</strong> is set to <strong>one airplane</strong>. That essentially means that there won't be any grouping applied by default.</p>
<p>The default grouping value can be set for ALL squadrons that don't have an individual grouping value configured.</p>
<p>Use the method <a href="##(AI_A2A_DISPATCHER).SetDefaultGrouping">AI<em>A2A</em>DISPATCHER.SetDefaultGrouping</a>() to set the <strong>default grouping</strong> of spawned airplanes for all squadrons.</p>
<h2>10.5. RTB fuel treshold.</h2>
<p>When an airplane gets <strong>out of fuel</strong> to a certain %-tage, which is <strong>15% (0.15)</strong>, it will go RTB, and will be replaced with a new airplane when applicable.</p>
<p>Use the method <a href="##(AI_A2A_DISPATCHER).SetDefaultFuelTreshold">AI<em>A2A</em>DISPATCHER.SetDefaultFuelTreshold</a>() to set the <strong>default fuel treshold</strong> of spawned airplanes for all squadrons.</p>
<h2>10.6. RTB damage treshold.</h2>
<p>When an airplane is <strong>damaged</strong> to a certain %-tage, which is <strong>40% (0.40)</strong>, it will go RTB, and will be replaced with a new airplane when applicable.</p>
<p>Use the method <a href="##(AI_A2A_DISPATCHER).SetDefaultDamageTreshold">AI<em>A2A</em>DISPATCHER.SetDefaultDamageTreshold</a>() to set the <strong>default damage treshold</strong> of spawned airplanes for all squadrons.</p>
<h2>11. Q &amp; A:</h2>
<h3>11.1. Which countries will be selected for each coalition?</h3>
<p>Which countries are assigned to a coalition influences which units are available to the coalition.
For example because the mission calls for a EWR radar on the blue side the Ukraine might be chosen as a blue country
@ -1365,7 +1418,7 @@ so that the 55G6 EWR radar unit is available to blue. <br/>
Some countries assign different tasking to aircraft, for example Germany assigns the CAP task to F-4E Phantoms but the USA does not. <br/>
Therefore if F4s are wanted as a coalitions CAP or GCI aircraft Germany will need to be assigned to that coalition. </p>
<h3>10.2. Country, type, load out, skill and skins for CAP and GCI aircraft?</h3>
<h3>11.2. Country, type, load out, skill and skins for CAP and GCI aircraft?</h3>
<ul>
<li>Note these can be from any countries within the coalition but must be an aircraft with one of the main tasks being “CAP”.</li>
@ -1389,7 +1442,7 @@ Therefore if F4s are wanted as a coalitions CAP or GCI aircraft Germany will
</dt>
<dd>
<h1>AI_A2A_GCICAP class, extends <a href="AI.html##(AI_A2A_DISPATCHER)">AI#AI<em>A2A</em>DISPATCHER</a></h1>
<h1>AI_A2A_GCICAP class, extends <a href="AI_A2A_Dispatcher.html##(AI_A2A_DISPATCHER)">AI<em>A2A</em>Dispatcher#AI<em>A2A</em>DISPATCHER</a></h1>
<p><img src="..\Presentations\AI_A2A_DISPATCHER\Dia1.JPG" alt="Banner Image"/></p>
@ -3007,6 +3060,84 @@ or
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetDefaultDamageTreshold" >
<strong>AI_A2A_DISPATCHER:SetDefaultDamageTreshold(DamageTreshold)</strong>
</a>
</dt>
<dd>
<p>Set the default damage treshold when defenders will RTB.</p>
<p>The default damage treshold is by default set to 40%, which means that when the airplane is 40% damaged, it will go RTB.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#number DamageTreshold </em></code>:
A decimal number between 0 and 1, that expresses the %-tage of the damage treshold before going RTB.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
-- Now Setup the A2A dispatcher, and initialize it using the Detection object.
A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
-- Now Setup the default damage treshold.
A2ADispatcher:SetDefaultDamageTreshold( 0.90 ) -- Go RTB when the airplane 90% damaged.
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetDefaultFuelTreshold" >
<strong>AI_A2A_DISPATCHER:SetDefaultFuelTreshold(FuelTreshold)</strong>
</a>
</dt>
<dd>
<p>Set the default fuel treshold when defenders will RTB or Refuel in the air.</p>
<p>The fuel treshold is by default set to 15%, which means that an airplane will stay in the air until 15% of its fuel has been consumed.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#number FuelTreshold </em></code>:
A decimal number between 0 and 1, that expresses the %-tage of the treshold of fuel remaining in the tank when the plane will go RTB or Refuel.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_DISPATCHER)">#AI<em>A2A</em>DISPATCHER</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
-- Now Setup the A2A dispatcher, and initialize it using the Detection object.
A2ADispatcher = AI_A2A_DISPATCHER:New( Detection )
-- Now Setup the default fuel treshold.
A2ADispatcher:SetDefaultRefuelTreshold( 0.30 ) -- Go RTB when only 30% of fuel remaining in the tank.
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_DISPATCHER).SetDefaultGrouping" >
<strong>AI_A2A_DISPATCHER:SetDefaultGrouping(Grouping)</strong>
</a>
@ -4590,7 +4721,7 @@ Provide a value of <strong>true</strong> to display every 30 seconds a tactical
<dt>
<a id="#(AI_A2A_GCICAP).New" >
<strong>AI_A2A_GCICAP:New(<, GroupingRadius, EWRPrefixes, TemplatePrefixes, CAPPrefixes, CapLimit, EngageRadius)</strong>
<strong>AI_A2A_GCICAP:New(EWRPrefixes, TemplatePrefixes, CapPrefixes, CapLimit, GroupingRadius, EngageRadius, GciRadius)</strong>
</a>
</dt>
<dd>
@ -4601,8 +4732,26 @@ Provide a value of <strong>true</strong> to display every 30 seconds a tactical
<ul>
<li>
<p><code><em><a href="##(list)">#list</a> &lt; </em></code>:
string> EWRPrefixes A list of prefixes that of groups that setup the Early Warning Radar network.</p>
<p><code><em>#string EWRPrefixes </em></code>:
A list of prefixes that of groups that setup the Early Warning Radar network.</p>
</li>
<li>
<p><code><em>#string TemplatePrefixes </em></code>:
A list of template prefixes.</p>
</li>
<li>
<p><code><em>#string CapPrefixes </em></code>:
A list of CAP zone prefixes (polygon zones).</p>
</li>
<li>
<p><code><em>#number CapLimit </em></code>:
A number of how many CAP maximum will be spawned.</p>
</li>
<li>
@ -4614,27 +4763,92 @@ For airplanes, 6000 (6km) is recommended, and is also the default value of this
</li>
<li>
<p><code><em> EWRPrefixes </em></code>: </p>
<p><code><em>#number EngageRadius </em></code>:
The radius in meters wherein detected airplanes will be engaged by airborne defenders without a task.</p>
</li>
<li>
<p><code><em> TemplatePrefixes </em></code>: </p>
<p><code><em>#number GciRadius </em></code>:
The radius in meters wherein detected airplanes will GCI.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(AI_A2A_GCICAP)">#AI<em>A2A</em>GCICAP</a>:</em></p>
<h3>Usage:</h3>
<pre class="example"><code>
-- Set a new AI A2A GCICAP object, based on an EWR network with a 30 km grouping radius
-- This for ground and awacs installations.
A2ADispatcher = AI_A2A_GCICAP:New( { "BlueEWRGroundRadars", "BlueEWRAwacs" }, 30000 )
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(AI_A2A_GCICAP).NewWithBorder" >
<strong>AI_A2A_GCICAP:NewWithBorder(EWRPrefixes, TemplatePrefixes, BorderPrefix, CapPrefixes, CapLimit, GroupingRadius, EngageRadius, GciRadius)</strong>
</a>
</dt>
<dd>
<p>AI<em>A2A</em>GCICAP constructor with border.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string EWRPrefixes </em></code>:
A list of prefixes that of groups that setup the Early Warning Radar network.</p>
</li>
<li>
<p><code><em> CAPPrefixes </em></code>: </p>
<p><code><em>#string TemplatePrefixes </em></code>:
A list of template prefixes.</p>
</li>
<li>
<p><code><em> CapLimit </em></code>: </p>
<p><code><em>#string BorderPrefix </em></code>:
A Border Zone Prefix.</p>
</li>
<li>
<p><code><em> EngageRadius </em></code>: </p>
<p><code><em>#string CapPrefixes </em></code>:
A list of CAP zone prefixes (polygon zones).</p>
</li>
<li>
<p><code><em>#number CapLimit </em></code>:
A number of how many CAP maximum will be spawned.</p>
</li>
<li>
<p><code><em>#number GroupingRadius </em></code>:
The radius in meters wherein detected planes are being grouped as one target area.
For airplanes, 6000 (6km) is recommended, and is also the default value of this parameter.</p>
</li>
<li>
<p><code><em>#number EngageRadius </em></code>:
The radius in meters wherein detected airplanes will be engaged by airborne defenders without a task.</p>
</li>
<li>
<p><code><em>#number GciRadius </em></code>:
The radius in meters wherein detected airplanes will GCI.</p>
</li>
</ul>

View File

@ -2579,7 +2579,7 @@ The group to generate the report for.</p>
<dl class="function">
<dt>
<em></em>
<em>#number</em>
<a id="#(DETECTION_BASE).DetectionInterval" >
<strong>DETECTION_BASE.DetectionInterval</strong>
</a>

View File

@ -1598,7 +1598,7 @@ A string defining the start state.</p>
<dl class="function">
<dt>
<em>#string</em>
<em></em>
<a id="#(FSM)._StartState" >
<strong>FSM._StartState</strong>
</a>
@ -1897,6 +1897,7 @@ A string defining the start state.</p>
<dl class="function">
<dt>
<em></em>
<a id="#(FSM).current" >
<strong>FSM.current</strong>
</a>

View File

@ -1142,7 +1142,7 @@ true if metric.</p>
<dl class="function">
<dt>
<em></em>
<em>#boolean</em>
<a id="#(SETTINGS).Metric" >
<strong>SETTINGS.Metric</strong>
</a>

View File

@ -2194,9 +2194,6 @@ The group that was spawned. You can use this group for further actions.</p>
<p> Don't repeat the group from Take-Off till Landing and back Take-Off by ReSpawning.</p>
</dd>
</dl>
<dl class="function">
@ -2729,9 +2726,6 @@ when nothing was spawned.</p>
<p> Overwrite unit names by default with group name.</p>
</dd>
</dl>
<dl class="function">
@ -3129,7 +3123,7 @@ Spawn_BE_KA50 = SPAWN:New( 'BE KA-50@RAMP-Ground Defense' ):Schedule( 600, 0.5 )
<dl class="function">
<dt>
<em></em>
<em>#boolean</em>
<a id="#(SPAWN).SpawnUnControlled" >
<strong>SPAWN.SpawnUnControlled</strong>
</a>

View File

@ -436,6 +436,7 @@ ptional) The name of the new static.</p>
<dl class="function">
<dt>
<em>#number</em>
<a id="#(SPAWNSTATIC).SpawnIndex" >
<strong>SPAWNSTATIC.SpawnIndex</strong>
</a>

View File

@ -566,7 +566,6 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
<dl class="function">
<dt>
<em></em>
<a id="#(FSM_PROCESS).DeployZone" >
<strong>FSM_PROCESS.DeployZone</strong>
</a>
@ -631,7 +630,7 @@ based on the tasking capabilities defined in <a href="Task.html##(TASK)">Task#TA
<dl class="function">
<dt>
<em>#number</em>
<em></em>
<a id="#(TASK_CARGO).CargoLimit" >
<strong>TASK_CARGO.CargoLimit</strong>
</a>