Enhance civilization flow mechanics and adaptive quality control
- Implemented runtime-only adaptive quality controller to optimize simulation performance based on CPU time. - Added adaptive quality thresholds and recovery cycles to dynamically adjust simulation fidelity. - Introduced single-step solving method for civilization transitions to improve performance under high loads. - Updated benchmark scripts to include speed parameter for testing various simulation speeds. - Added tests for adaptive quality adjustments and their effects on civilization flow calculations. - Documented results of optimization attempts and their impact on performance metrics.
This commit is contained in:
@@ -18,7 +18,7 @@ func restore_json_integers(value):
|
||||
func run():
|
||||
var args = OS.get_cmdline_user_args()
|
||||
if args.is_empty():
|
||||
print("Usage: --script tests/benchmark_civilization_flows.gd -- /path/to/save.adventure.json [delta_seconds] [profile] [cycles=100]")
|
||||
print("Usage: --script tests/benchmark_civilization_flows.gd -- /path/to/save.adventure.json [delta_seconds] [profile] [cycles=100] [speed=1..6]")
|
||||
quit(1)
|
||||
return
|
||||
var data = JSON.parse_string(FileAccess.get_file_as_string(args[0]))
|
||||
@@ -33,7 +33,11 @@ func run():
|
||||
if not is_finite(delta) or delta <= 0:
|
||||
quit(1)
|
||||
return
|
||||
for speed in [6]:
|
||||
var selected_speed: int = 6
|
||||
for arg in args:
|
||||
if arg.begins_with("speed="):
|
||||
selected_speed = clampi(arg.trim_prefix("speed=").to_int(), 1, root.get_node("Global").SPEED_LIMIT)
|
||||
for speed in [selected_speed]:
|
||||
var world = load("res://world/owniverse/owniverse.gd").new()
|
||||
world.catalog.load_definitions(root.get_node("Global").OwniverseEntities)
|
||||
world.state = initial.duplicate(true)
|
||||
|
||||
Reference in New Issue
Block a user