LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
removeClass.m
1function newmodel = removeClass(model, jobclass)
2% NEWMODEL = REMOVECLASS(MODEL, JOBCLASS)
3%
4% Non-mutating variant of Network.removeClass: return a copy of MODEL in
5% which JOBCLASS has been removed, leaving MODEL itself untouched. Use this
6% when the original model must stay solvable (e.g. ablation studies, or a
7% per-chain decomposition that peels one class at a time).
8%
9% The removal logic lives in @MNetwork/removeClass.m and is delegated to
10% here rather than duplicated, so that the two entry points cannot drift.
11% The lookup on the copy is by class name (see @MNetwork/removeClass.m), so
12% passing the JOBCLASS object of the original model is correct.
13%
14% Copyright (c) 2012-2026, Imperial College London
15% All rights reserved.
16
17newmodel = model.copy();
18newmodel.removeClass(jobclass);
19end