Package jline.api.sn
Class SnSetServiceKt
-
- All Implemented Interfaces:
public final class SnSetServiceKt
-
-
Method Summary
Modifier and Type Method Description final static NetworkStructsnSetService(NetworkStruct sn, Integer stationIdx, Integer classIdx, Double rate, Double scv, ModifyMode mode, ValidationLevel validation, Boolean autoRefresh)Sets the service rate at a specific station and class. final static NetworkStructsnSetServiceBatch(NetworkStruct sn, Matrix rates, Matrix scvs, ModifyMode mode, ValidationLevel validation, Boolean autoRefresh)Sets service rates for multiple station-class pairs in a single operation. -
-
Method Detail
-
snSetService
final static NetworkStruct snSetService(NetworkStruct sn, Integer stationIdx, Integer classIdx, Double rate, Double scv, ModifyMode mode, ValidationLevel validation, Boolean autoRefresh)
Sets the service rate at a specific station and class.
Updates the
ratesandscvmatrices in the NetworkStruct. WhenautoRefreshis true, also updates derived process fields (mu, phi, proc, pie, phases, phasessz, phaseshift, procid).- Parameters:
sn- NetworkStruct to modifystationIdx- Station index (0-based)classIdx- Class index (0-based)rate- New service rate (must be positive)scv- Squared coefficient of variation (default 1.mode- IN_PLACE modifies sn directly, COPY returns a modified copyvalidation- Validation level to applyautoRefresh- If true, refresh process fields after modification- Returns:
Modified NetworkStruct (same instance if IN_PLACE, new copy if COPY)
-
snSetServiceBatch
final static NetworkStruct snSetServiceBatch(NetworkStruct sn, Matrix rates, Matrix scvs, ModifyMode mode, ValidationLevel validation, Boolean autoRefresh)
Sets service rates for multiple station-class pairs in a single operation.
More efficient than calling snSetService multiple times when updating many parameters. NaN values in the rates matrix are skipped (not updated).
- Parameters:
sn- NetworkStruct to modifyrates- Matrix of new rates (nstations x nclasses) - NaN values are skippedscvs- Matrix of new SCVs (nstations x nclasses) - optional, NaN values skippedmode- IN_PLACE modifies sn directly, COPY returns a modified copyvalidation- Validation level to applyautoRefresh- If true, refresh process fields after modification- Returns:
Modified NetworkStruct
-
-
-
-