Strafen können durch benannte Profile festgelegt werden
This commit is contained in:
@@ -72,8 +72,9 @@ the same layout:
|
||||
|
||||
The GA cycle and penalty scheme are read directly from `$PLATZ_CFG/zyklus.cfg` and
|
||||
`$PLATZ_CFG/strafen.cfg` (independent of `--indir`). There is no `platz.cfg` indirection any
|
||||
more — it was removed; `zyklus.cfg`/`strafen.cfg` are loaded straight from `$PLATZ_CFG`, and
|
||||
the GA profile is chosen by the `--zyklus-art <name>` switch (default `Adaptiv`).
|
||||
more — it was removed; `zyklus.cfg`/`strafen.cfg` are loaded straight from `$PLATZ_CFG`, the
|
||||
GA profile is chosen by the `--zyklus-art <name>` switch (default `Adaptiv`), and the penalty
|
||||
profile by the `--strafen <name>` switch (default `default`).
|
||||
|
||||
- `cfg/zyklus.cfg` — defines the GA profiles. Two flavours: **static** profiles (`Easy`,
|
||||
`Simple`) give an explicit sequence of actions (`e`=erzeugen/create, `s`=selektieren/
|
||||
@@ -84,10 +85,18 @@ the GA profile is chosen by the `--zyklus-art <name>` switch (default `Adaptiv`)
|
||||
with a shrinking population (`Start`, `Schrumpfung`, `MinPopulation`) and a convergence
|
||||
stop (`Geduld` generations without an improvement of at least `Schwelle`, capped by
|
||||
`MaxGenerationen`). Static profiles run via `Farm._LaufStatisch()`.
|
||||
- `cfg/strafen.cfg` — the penalty ("Strafpunkte") table: cost of splitting a group across
|
||||
tables (by group size and number of splits), cost of a lone person, per-table
|
||||
under-utilization penalties, and (optional `[Abstand]` section) a penalty for the spatial
|
||||
distance between split-off parts of a group.
|
||||
- `cfg/strafen.cfg` — the penalty ("Strafpunkte") profiles. Each section is one complete
|
||||
profile ("Vorgehen") in a single namespace, chosen by `--strafen <section>` (default
|
||||
`default`); this lets several scoring strategies live in one file (the shipped file also
|
||||
has a `locker` example with cheaper splits). Keys per profile: `Anzahl_Trennungen_N`
|
||||
(`{groupsize:points}` for a group split across `N+1` tables, i.e. `N` splits — recursing to
|
||||
smaller sizes when no exact entry), `NichtNachbar` (no group-mate at a neighbouring table),
|
||||
`Allein` (a lone person), optional `TischWertigkeiten` (`{freeseats:points}` under-utilization,
|
||||
with a nearest-lower-key fallback; absent = free seats not penalised, as in the `locker`
|
||||
profile), and optional `AbstandFaktor` (per spatial-distance unit
|
||||
between split-off parts; absent = distance not penalised). `Strafliste.laden(FileName,
|
||||
Sektion='default')` parses one section; the old `[Trennung]`/`[Globals]`/`[Abstand]`
|
||||
three-section layout is gone.
|
||||
|
||||
`tische.ini`/`bestellung.json`/`TischePersonen.txt`/`PersonenTische.csv` are fixed filenames
|
||||
resolved as `os.path.join(indir, ...)` in `platz.py`.
|
||||
|
||||
Reference in New Issue
Block a user