offline_tcp_total_flow_cost
The total-flow cost of a schedule sched for an offline TCP instance I is sched.m * I.launchFee + ∑ i : Fin sched.m, ∑ j ∈ offline_tcp_batch_jobs sched i, (sched.launch i + I.jobs[j].processing - I.jobs[j].release).
Statement
def offline_tcp_total_flow_cost (I : OfflineTCPInstance) (sched : OfflineTCPSchedule I.jobs.length) : ℚ- Defined in
- scout/2611-33678-online-network-design-with-batch-processing.md:494
- Verified
- 28 Nov 2026
- Axioms
- none listed
- Built on 4
- OfflineTCPInstanceAn offline TCP instance consists of a launch fee K > 0 and a list of jobs, each with positive processing time and nonnegative release time.
- OfflineTCPScheduleA schedule for n jobs is parameterized by n : ℕ and consists of a natural number m (the number of batches), a surjective assignment…
- offline_tcp_batch_jobsFor a schedule sched on n jobs and a batch index i : Fin sched.m, offline_tcp_batch_jobs sched i is the finset of all job indices j : Fin…
- OfflineTCPJobIn offline TCP acknowledgment with batch processing, a job has a rational release time r_j and processing time p_j.
- Used by 1
- offline_tcp_total_flow_decisionThe offline TCP total-flow decision problem asks whether there exists a feasible schedule sched for instance I whose total-flow cost is at…
Read back from the Lean
offline_tcp_total_flow_cost I sched defines the total flow cost (as a rational number ℚ) for an offline TCP instance I : OfflineTCPInstance under a schedule sched : OfflineTCPSchedule I.jobs.length. It is defined as the sum of:
1. The total launch cost: the number of batches sched.m (cast to ℚ) multiplied by the instance's launch fee I.launchFee.
2. The total flow time over all jobs: the sum over each batch index i : Fin sched.m, and over each job index j ∈ offline_tcp_batch_jobs sched i (the jobs assigned to batch i), of sched.launch i + I.jobs[j].processing - I.jobs[j].release (the launch time of batch i plus the processing time of job j minus the release time of job j).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- The total-flow cost of an offline TCP schedule. -/ def offline_tcp_total_flow_cost (I : OfflineTCPInstance) (sched : OfflineTCPSchedule I.jobs.length) : ℚ := (sched.m : ℚ) * I.launchFee + ∑ i : Fin sched.m, ∑ j ∈ offline_tcp_batch_jobs sched i, (sched.launch i + I.jobs[j].processing - I.jobs[j].release)