F2: pendolarismo su rotaia, carichi per linea, accettazione Valdoria e bench
- Abbinamento mensile dei pendolari sul LineGraph (60/90 minuti con i tratti a piedi, quote proporzionali ai lavoratori liberi, capacità residua delle linee), pacchetti giornalieri, coperture e scioglimento dei contratti. - LineGraph con maschere dei carichi: merci, lavoratori e personale viaggiano solo su linee i cui treni li possono portare; durata dei giri con le soste di carico e scarico. - Industria servita = merce ritirata o consegnata dal vettore. - Parametri residui spostati in data/*.json. - Test di accettazione F2 sullo scenario Valdoria con tre linee, test del pendolarismo (copertura > 0,9 in 60 giorni, capacità, scioglimento). - viaferrea-tools bench: 2.000 treni, tick medio 0,84 ms. - ADR 0007 e 0008, ARCHITECTURE e STATE aggiornati. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0191R7vXgtbAvSV4V8tj8uzL
This commit is contained in:
27 files changed
+953
-84
No files matched your search
@@ -58,6 +58,20 @@ public sealed class ConstructionSystem : ISimSystem
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Completa subito tutti i cantieri aperti. Solo per gli strumenti (banco di prova, collaudi):
|
||||
/// in partita i cantieri avanzano con le squadre.
|
||||
/// </summary>
|
||||
public static void CompleteAllNow(World w)
|
||||
{
|
||||
foreach (var p in w.Network.Projects)
|
||||
{
|
||||
if (p.Done) continue;
|
||||
p.ProgressDays = p.TotalDays;
|
||||
Complete(w.Context, w, p);
|
||||
}
|
||||
}
|
||||
|
||||
private static int FreeCrew(RailNetwork net, CompanyId company, int crews)
|
||||
{
|
||||
for (int c = 0; c < crews; c++)
|
||||
@@ -172,7 +186,7 @@ public sealed class ConstructionSystem : ISimSystem
|
||||
double age = (ctx.Day - e.LastRenewalDay) / (double)daysPerYear;
|
||||
double structureBefore = e.StructureCondition;
|
||||
if (ctx.Day - e.LastInspectionDay > st.InspectionIntervalDays) e.StructureCondition -= st.MissedInspectionWearPerDay;
|
||||
if (age > st.RenewalYears) e.StructureCondition -= 100.0 / (10.0 * daysPerYear);
|
||||
if (age > st.RenewalYears) e.StructureCondition -= 100.0 / (st.AgingYearsToZero * daysPerYear);
|
||||
e.StructureCondition = Math.Max(0, e.StructureCondition);
|
||||
if (structureBefore >= st.CloseBelow && e.StructureCondition < st.CloseBelow)
|
||||
w.Events.Add(new GameEvent(ctx.Day, EventKind.Maintenance, EventSeverity.Critical,
|
||||
@@ -187,7 +201,7 @@ public sealed class ConstructionSystem : ISimSystem
|
||||
var st = w.Data.Construction.Structures;
|
||||
double f = e.Condition < 30 ? tw.LimitBelow30 : e.Condition < 60 ? tw.LimitBelow60 : 1.0;
|
||||
if (e.StructureCondition < st.SpeedLimitBelow) f = Math.Min(f, st.SpeedLimitFactor);
|
||||
if (e.StructureCondition < st.CloseBelow) f = Math.Min(f, 0.1);
|
||||
if (e.StructureCondition < st.CloseBelow) f = Math.Min(f, st.ClosedSpeedFactor);
|
||||
return f;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user