--- name: geodms-discrete-land-use-allocation description: Allocate one land-use class per land unit with GeoDMS discrete_alloc using suitability maps and regional minimum and maximum claims. Use for discrete land-use scenarios, allocation feasibility, and checking regional demand constraints; not for fractional land-use allocation. --- # Discrete land-use allocation with GeoDMS Produce a categorical allocation, a regional claim-versus-result table and an explicit feasibility assessment. Preserve the user's scenario assumptions; do not silently relax claims or exclusions to obtain a successful run. ## Start from maintained examples Read the [discrete_alloc reference](https://github.com/ObjectVision/GeoDMS/wiki/Function-discrete-alloc), especially argument types, `Threshold`, `statusFlag` and failure results. Read [atomic regions](https://github.com/ObjectVision/GeoDMS/wiki/AtomicRegions) when claim region systems differ. Use [Academy Module 7](https://github.com/ObjectVision/GeoDMS_Academy/wiki/Module-7,-Allocating-land-use) and the [allocation project](https://github.com/ObjectVision/GeoDMS_Academy/tree/main/allocation) for an end-to-end example. Load `allocation/cfg/allocatie.dms`; inspect `allocation/cfg/allocatie/results.dms`, specifically `Results/Discrete`. The same project also contains a continuous model: do not substitute that for the requested discrete allocation. Its data directory contains historical land-use rasters and COROP boundaries, not a current scenario forecast. The [small discrete-allocation example](https://github.com/ObjectVision/GeoDMS/wiki/Discrete-Allocation-Example) illustrates the argument relationships. Older examples can contain old relation names or comments. Check them against the installed release before execution. In particular, the Academy comment that its threshold is unused is not a general rule: the current operator uses it to determine eligible alternatives. ## Establish the scenario Read the land-unit domain, baseline classes, suitability per class, region assignments, minimum and maximum claims, fixed land and exclusions. Identify missing assumptions that affect the allocation before generating them. - Claims are numbers of land units, not hectares. For equal-area cells, convert area claims using the actual cell area and document rounding: minimum area generally requires rounding up and maximum area rounding down. Check that the resulting interval remains feasible. - Variable-area parcels do not become an area-constrained allocation merely by counting parcels. Agree an appropriate representation before applying cell-count claims to them. - Explain how fixed land contributes to the regional claims. If solving only free land, subtract fixed allocations from total claims consistently and restore fixed classes on export. - Suitability scaling affects the objective. Preserve the requested relative scores and record integer scaling and rounding. A low score can still be selected when claims require it; a hard exclusion must be represented by eligibility constraints, not merely an unattractive score. ## Construct the allocation 1. Create a compact domain for eligible land units, with an explicit relation back to the source grid or parcels. Apply the same selection to every suitability attribute and region relation. 2. Define land-use names and matching subitems in the suitability, minimum-claim and maximum-claim containers. Suitabilities share an `int32` values unit; claims use `uint32` and the appropriate regional domain. 3. Map each land-use type to its partitioning. For multiple overlapping regional systems, construct their common-refinement atomic regions and map every selected land unit to a valid atomic region. Null region references are input errors to resolve explicitly. 4. Select the appropriate operator from [allocation functions](https://github.com/ObjectVision/GeoDMS/wiki/Allocation-functions). Use `discrete_alloc` for multiple partitionings; consult the documented single-partition or no-partition variants when suitable. Do not guess a variant's argument order. 5. For the general operator, verify this argument order against the reference: `TypeNames, LandUnitDomain, SuitabilityMaps, Partitionings, PartitioningNames, AtomicRegions, AtomicRegionMap, MinClaims, MaxClaims, Threshold[, FeasibleSolution]`. The optional final container is not evaluated as a feasibility certificate by the current implementation. 6. Check min <= max for every claim and compare claims with available eligible units. Aggregate supply checks are necessary but not sufficient when threshold restrictions and overlapping regions interact. 7. Request `landuse`, `statusFlag` and `status` explicitly. Map `landuse` back to the original domain, retaining the distinction between fixed land, excluded land and eligible but unallocated units. ## Run and assess the outcome Locate an existing compatible `GeoDmsRun.exe`; otherwise use [official releases](https://github.com/ObjectVision/GeoDMS/releases) and [installation instructions](https://github.com/ObjectVision/GeoDMS/wiki/Installation-Instructions). Keep libraries from the same release. Preserve the Academy directory structure and resolve `%ProjDir%`, source-data and local-output paths before running. Follow the [Run guide](https://github.com/ObjectVision/GeoDMS/wiki/User-Guide-GeoDMS-Run): absolute `/L` log argument first, then configuration and root-relative item paths. Force evaluation using `@statistics` on the relevant allocation items or `IntegrityCheck` parameters depending on them. Do not treat a successful metadata-only item request as a completed allocation. Inspect both exit status and logged errors. `@valueinfo ` explains one land unit's outcome (in particular why it is null), and `@dumpconfig ` records the configuration exactly as loaded; the [geodms-run skill](https://raw.githubusercontent.com/wiki/ObjectVision/GeoDMS/ai/.skills/geodms-run/SKILL.md) in this catalog covers the full GeoDmsRun contract, including unattended installation. Read `statusFlag` and `status` before presenting a solution. If the feasibility precheck fails, the documented allocation outputs are null. If allocation completes with violated claims, a partial/best-found `landuse` may exist while `statusFlag` is false; that is not a feasible scenario. Report the failed constraints and possible remedies without changing the scenario unasked. Independently aggregate the resulting classes per claim region and compare counts against every minimum and maximum. Check exclusions, fixed land, eligible-but-unallocated counts and total area. Do not depend only on `total_allocated`, which is deprecated in the reference and can be null on failure. Include a tiny known-answer case when adapting the formulation and an infeasible case to check that failure is recognized. ## Deliver Export the categorical raster or vector with class labels, the regional claim audit, status text and configuration. Include GeoDMS version, input dates, suitability scaling, area-to-count conversion, threshold, exclusions and any remaining infeasibility. A scenario allocation is conditional on these assumptions; do not present it as an observed or independently validated forecast. State whether computation and export were actually verified.