Commit Graph

17 Commits

Author SHA1 Message Date
Michael Stangl 98b1dc4f36 per Skript alle im work liegenden Beispiele aufrufen. 2026-07-11 13:45:51 +02:00
Michael Stangl 9de80d2f2a Web-M1-Ausbau: JSON-Gaesteliste, GA-Verlauf, Python-Serversteuerung, tische.ini-Upload
- bestellung.xml -> bestellung.json: neuer JSONConfig (loest XMLConfig ab),
  alle work-Beispiele konvertiert, Doku (CLAUDE/README/dateiformate) umgestellt
- ga.py: Beobachtungsobjekt Entwicklung zeichnet den Loesungsverlauf auf,
  neuer Schalter --show-development erzeugt Entwicklung.svg (beste/mittlere/
  schlechteste Wertigkeit ueber die Zyklus-Aktionen)
- web/main.py: neuer Endpunkt /tische-datei (tische.ini-Upload, ast.literal_eval),
  Frontend kann jetzt eine tische.ini laden
- libs/webserver.py: plattformunabhaengige start/stop/status-Steuerung der
  Web-Testinstanz (ersetzt run_web_helper.ps1), raeumt auch verwaiste
  --reload-Prozessbaeume zuverlaessig auf
- Sicherheit/Modernisierung: eval() -> ast.literal_eval in Tische/Strafliste,
  sicherer Mini-Auswerter fuer die String-Ausdruecke in zyklus.cfg,
  defaultdict(set) in Plaetze
- SVG: Tischnummer fett zentriert im Tischkreis statt "Tisch x" darueber
- Tests: JSONConfig, Entwicklung und der Zyklus-Auswerter abgedeckt (9 Tests)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 12:49:42 +02:00
Michael Stangl 00dffc59eb Web-MVP (M1): FastAPI-API, Testoberflaeche, tische.ini-Upload, zwei neue Beispiele
- web/main.py: Session-basierte REST-API um den GA-Kern (POST /sitzung,
  .../tische, .../tische-datei, .../personen, .../berechnen,
  GET .../ergebnis[.svg]); Sessions in-memory mit 24h-TTL
- web/static/index.html: einfache Browser-Testoberflaeche (Tisch-Tabelle
  mit Presets, tische.ini-Upload, CSV-Gaesteliste, Kennzahlen, SVG)
- bin/run_web.bat/.sh + run_web_helper.ps1: start/stop/status inkl.
  Aufraeumen verwaister uvicorn-Reload-Kindprozesse (Zombie-Sockets)
- work/hochzeit: 120 Hochzeitsgaeste, Ehrentafel, Kindertisch/Teenager-
  Tisch fest gesetzt, Kinderalter normalverteilt, ~85% Auslastung
- work/innenhoefe: 300 Gaeste in zwei trapezfoermigen Innenhoefen mit
  4er-Tischen, 12 VIPs vor der Buehne, Umfeld.svg mit Tanzflaeche/Band
- Roadmap: Konzeptentscheidungen 1-11 (Zielgruppe, Einmalzahlung, MoR,
  Hetzner, Zwei-Marken-Strategie Sitz&Platz/SeatWonder), Namensrecherche
  im Anhang, M1-Fortschritt und GA-Lasttest-Datenpunkt dokumentiert

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 10:21:45 +02:00
Michael Stangl 5124b7fab6 PErsonendaten auch als .csv Einlesen 2026-07-11 10:00:13 +02:00
Michael Stangl c4c690bd78 weitere Details in die Roadmap ergänzt 2026-07-10 22:44:49 +02:00
Michael Stangl 4c9f57db5a Add market research on existing seating-chart competitors to roadmap
Surveys wedding/event seating tools currently available: most are
pure drag-and-drop editors with no optimization algorithm, while a
smaller group (notably PerfectTablePlan) uses the same genetic
algorithm / scoring approach as this project. Documents pricing
patterns and identifies the gap this project could fill: a
web-native SaaS with real optimization and a German/EU-focused,
GDPR-friendly hosting story, which none of the surveyed competitors
currently offer together.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 13:13:58 +02:00
Michael Stangl 3dd26ec651 Add roadmap for offering platz as a web service
Documents a 5-milestone path (foundation, MVP web tool, variant
generation, accounts/persistence, monetization) to turn the
existing GA seating solver into a hosted service for wedding/event
seating, including effort estimates, GDPR considerations once real
guest data is stored long-term, and why a freemium/one-time-payment
model fits this use case better than advertising.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 13:09:16 +02:00
Michael Stangl 74e08f389c Add --tosvg switch to render seating as SVG, plus test images and docs
Sitzplatzverteilung.alsSVG() (libs/Strukturdaten.py) draws tables as
white circles and people as colored circles inside their table's
circle, colored by group membership. Table radius is derived from
the number of seats so all person-circles fit without touching; the
table-to-table grid spacing is derived from the largest table radius
so tables never overlap regardless of their Koordinaten values.

libs/platz.py gains a --tosvg switch that writes
<indir>/Sitzplatzverteilung.svg alongside the existing text/CSV
output.

The three unittest scenarios now each write their rendering to
doc/images/, and doc/docu_tests.md explains the three configurations
and what each test actually verifies (including why the "split
groups land on true neighbor tables" property only holds for a
specifically chosen seed in the circle scenario, not in general).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 12:55:32 +02:00
Michael Stangl 0232e54f37 Add run_tests.bat/.sh to run the unittest suite via bin/
Follows the same setenv-based convention as the other bin/ scripts
and runs python -m unittest discover against tests/.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 12:44:36 +02:00
Michael Stangl 9a52fe5550 Add unittest suite for Sitzplatzverteilung with three scenarios
Covers three concrete seating layouts to exercise the GA's group
placement and splitting logic:
- three tables chained pairwise (2 seats each), three couples ->
  no group gets split, optimal score of 0.
- four tables in a line (2 seats each), two groups of four -> each
  group ends up split across one contiguous table pair (T1+T2 or
  T3+T4), never mixed across the middle seam.
- six tables in a circle (2 seats each), four groups of three ->
  each group is split exactly once (2+1), since no table has three
  seats; with the fixed seed the split pairs are also true circle
  neighbors.

Also documents how to run the suite in README.md, including the
PYTHONPATH workaround needed when a stray global env var shadows
the stdlib "tests" package name with an unrelated project's tests.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 12:42:45 +02:00
Michael Stangl 405319b075 Document Abfolge/Anzahl action letters in zyklus.cfg header
Adds a comment header explaining what e/s/S/m/j/z mean in the
Abfolge sequence, referencing the corresponding Farm actions in
libs/ga.py.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 12:28:42 +02:00
Michael Stangl 6e3649ed27 Port codebase from Python 2 to Python 3
Replace Python 2-only constructs throughout libs/: print statements,
ConfigParser -> configparser, sets.Set -> builtin set, string.split ->
str.split, xrange -> range, dict.has_key()/.iteritems() -> in/.items(),
old-style raise Exception, "msg" syntax, and __cmp__ -> __eq__/__lt__
via functools.total_ordering (Python 3 dropped cmp()/__cmp__, which
max()/.sort() rely on). Also cleaned up mixed tab/space indentation
that Python 3's stricter tokenizer rejects.

Fixed two latent bugs that only surfaced once end-to-end runs were
possible under Python 3's stricter error handling:
- HandleBestellung() compared G.Anzahl (a bound method) to an int
  instead of calling G.Anzahl() - silently "worked" under Python 2's
  permissive cross-type ordering, raises TypeError under Python 3.
- LeuteAllein() raised KeyError for VIP-group members, who are never
  added to the regular Gruppen container; now skips people with no
  group entry instead of crashing.

Verified end-to-end: bin/platz.sh --indir work/test1 and --indir
work/test2 (VIP group included) both run to completion and produce
correctly formatted output.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 12:27:27 +02:00
Michael Stangl 1e2eedc62b Replace fixed input/output paths in platz.cfg with --indir switch
Tischedatei, XMLdatei_Bestellung, AusgabeTischePersonen and
AusgabePersonTisch are no longer configured in platz.cfg. Instead,
platz.py now requires a --indir <dir> command-line switch pointing
at a directory that must contain tische.ini and bestellung.xml, and
into which TischePersonen.txt/PersonenTische.csv are written - e.g.
work/test1 or work/test2. This makes it trivial to run against
different guest lists without editing platz.cfg. platz.bat/platz.sh
forward extra arguments so --indir can be passed through.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 12:13:17 +02:00
Michael Stangl e8911df7e9 Use setenv in launcher scripts, add requirements.txt and missing .sh scripts
platz.bat/platz.sh now derive PLATZ via setenv instead of hardcoded
paths, matching the Standard Programm Template already applied to
setenv/install_py/activate_venv/get_cmd. Added the missing .sh
counterparts to those .bat scripts, an empty requirements.txt for
install_py to install (project only uses the stdlib), and ignore
entries for .venv/, out/, .vscode/, *.swp.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 11:57:05 +02:00
Michael Stangl bd87b3df46 Add doc/dateiformate.md file-format reference
Documents tische.ini, bestellung.xml, and the output file formats
using real examples from work/test1 and work/test2.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 11:09:32 +02:00
Michael Stangl fd223e8806 Add CLAUDE.md and README.md documentation
Documents the GA-based seating solver's architecture, config file
chain, and setup/usage for both AI assistants and human contributors.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-09 11:07:32 +02:00
Michael Stangl 97382c8e9d Initial import from SVN (svn://129.187.65.205/platz/trunk, r1)
Converted from SVN working copy. Original SVN server no longer available.
Original commit date: 2006-05-03, author: sm
2006-05-03 22:21:24 +02:00