ClassLuaElectricNetworknew
Members
| get_accumulators_energy{name?=…, quality?=…} | → EnergyAndCapacityPair | Gets total energy stored inside of accumulators that are part of any electric sub network covered by this electric network. |
Gets total energy stored inside of accumulators that are part of any electric sub network covered by this electric network. | ||
| set_accumulators_energy{name?=…, quality?=…, energy=…, equalize?=…} | Changes energy stored inside of accumulators that are part of any electric sub network covered by this electric network. | |
Changes energy stored inside of accumulators that are part of any electric sub network covered by this electric network. | ||
| sub_networks | :: R array[LuaElectricSubNetwork] | |
| statistics | :: R LuaFlowStatistics | Statistics for this electric network. [...] |
Statistics for this electric network. [...] | ||
| flow_last_tick | :: R table | Energy amounts of satisfaction percents related to latest electric network update. |
Energy amounts of satisfaction percents related to latest electric network update. | ||
| valid | :: R boolean | Is this object valid? [...] |
Is this object valid? [...] | ||
| object_name | :: R string | The class name of this object. [...] |
The class name of this object. [...] | ||
Methods
get_accumulators_energy{name?=…, quality?=…} → EnergyAndCapacityPair
Parameters
| name | :: EntityID? | When given, only accumulators of this prototype will be considered. |
When given, only accumulators of this prototype will be considered. | ||
| quality | :: QualityID? | When given, only accumulators of this quality will be considered. |
When given, only accumulators of this quality will be considered. | ||
set_accumulators_energy{name?=…, quality?=…, energy=…, equalize?=…}
Parameters
| name | :: EntityID? | When given, only accumulators of this prototype will be considered. |
When given, only accumulators of this prototype will be considered. | ||
| quality | :: QualityID? | When given, only accumulators of this quality will be considered. |
When given, only accumulators of this quality will be considered. | ||
| energy | :: double | New total energy to be set onto matching accumulators. |
New total energy to be set onto matching accumulators. | ||
| equalize | :: boolean? | Whether all accumulators should have the same charge ratio, regardless of whether that means discharging some of them. Defaults to |
Whether all accumulators should have the same charge ratio, regardless of whether that means discharging some of them. Defaults to | ||
Attributes
sub_networks :: Read array[LuaElectricSubNetwork] 
statistics :: Read LuaFlowStatistics
flow_last_tick :: Read table 
Table fields
| accumulator_energy | :: double | Total energy of accumulators in the electric network before energy transfer. |
Total energy of accumulators in the electric network before energy transfer. | ||
| accumulator_capacity | :: double | Total capacity of accumulators in the electric network during electric network update. |
Total capacity of accumulators in the electric network during electric network update. | ||
| primary_output | :: double | Amount of energy offered by energy producers with "primary-output" usage priority. |
Amount of energy offered by energy producers with "primary-output" usage priority. | ||
| secondary_output | :: double | Amount of energy offered by energy producers with "secondary-output" usage priority. |
Amount of energy offered by energy producers with "secondary-output" usage priority. | ||
| tertiary_output | :: double | Amount of energy offered by energy sources with "tertiary" usage priority or accumulators. |
Amount of energy offered by energy sources with "tertiary" usage priority or accumulators. | ||
| solar_output | :: double | Amount of energy offered by energy producers with "solar" usage priority. |
Amount of energy offered by energy producers with "solar" usage priority. | ||
| primary_demand | :: double | Amount of energy requested by energy consumers with "primary-input" usage priority. |
Amount of energy requested by energy consumers with "primary-input" usage priority. | ||
| secondary_demand | :: double | Amount of energy requested by energy consumers with "secondary-input" usage priority. |
Amount of energy requested by energy consumers with "secondary-input" usage priority. | ||
| tertiary_demand | :: double | Amount of energy requested by energy consumers with "tertiary" usage priority or accumulators. |
Amount of energy requested by energy consumers with "tertiary" usage priority or accumulators. | ||
| total_transfer | :: double | Total amount of energy moved from producers to consumers. |
Total amount of energy moved from producers to consumers. | ||
| maximum_production | :: double | Sum of available production ( |
Sum of available production ( | ||
| production_satisfaction | :: double | Fraction of |
Fraction of | ||
| maximum_consumption | :: double | Sum of required consumption ( |
Sum of required consumption ( | ||
| consumption_satisfaction | :: double | Fraction of |
Fraction of | ||
| lamp_satisfaction | :: double | |
| primary_output_usage | :: double | Fraction of |
Fraction of | ||
| secondary_output_usage | :: double | Fraction of |
Fraction of | ||
| tertiary_output_usage | :: double | Fraction of |
Fraction of | ||
| solar_output_usage | :: double | Fraction of |
Fraction of | ||
| primary_demand_usage | :: double | Fraction of |
Fraction of | ||
| secondary_demand_usage | :: double | Fraction of |
Fraction of | ||
| tertiary_demand_usage | :: double | Fraction of |
Fraction of | ||

