Ⅰ. Description
In the year 2450, you are the Chief Architect of the Neo-Elysium defense grid. You must manage energy distribution between Nstations in 3D space. This is not a simple flow problem because:
  1. Kinematics: Every station moves with a constant velocity . Their positions change every second.
  2. Temporal Rifts: Spherical anomalies appear and disappear, disabling any station trapped inside.
  3. Dynamic Cost: The cost of sending 1 unit of energy between station is the squared Euclidean distance at the exact moment of the query.
  4. Capacity Constraints: Each station has a maximum storage capacity, and each link has a maximum throughput.
Ⅱ. Task
Write a function [max_flow, min_cost] = solve_aether(stations, events) that processes a sequence of events and returns the results for all optimization queries.
Input:
  • stations: An matrix: [x, y, z, vx, vy, vz, capacity]
  • events: A cell array where each element is a vector representing an event:
* [1, id, vx, vy, vz]: Update velocity of station id.
* [2, u, v, k]: Create a directed link from with capacity K.
* [3, x, y, z, R, duration]: A rift appears at with radius R for a certain duration.
* [4, num_sources, sourcess..., num_sinks, sinks...]: Optimization query.
Output:
  • A matrix where Q is the number of Types 4 events. Each row is [TotalMaxFlow, TotalMinCost].

Solution Stats

20 Solutions

1 Solvers

Last Solution submitted on Mar 18, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers1

Suggested Problems

More from this Author15

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!