moonbit-4d-schedule

    MoonBit scheduling primitives for CPM, PERT, resource leveling, and 4D BIM snapshots

    bim
    4d
    cpm
    pert
    schedule
    construction
    Download zip
    Author
    Version
    0.1.0
    License
    Apache-2.0
    Last updated
    2 months ago
    Downloads
    28

    No dependencies

    #moonbit-4d-schedule

    MoonBit scheduling primitives for construction planning and 4D BIM snapshots. The project is designed as a reusable library rather than a BIM file viewer: it accepts typed activities, dependency relations, resources, and BIM elements, then produces deterministic schedule and snapshot data.

    #Scope

    • src/types: activities, dependency relations, resources, BIM elements, and progress data structures.
    • src/graph: precedence graph validation, cycle detection, and CPM forward / backward passes for FS, SS, FF, and SF relations with lag.
    • src/pert: three-point PERT estimates and a standard-normal completion probability calculation.
    • src/leveling: daily resource profiles and a bounded heuristic that moves non-critical activities within their free float.
    • src/bim4d: one aggregated state per BIM element, plus category and level progress summaries.
    • src/json: dependency-free JSON serialization for activities, elements, schedule floats, and snapshots.

    The scheduling engine currently works in elapsed planning days. Calendar and constraint records are preserved in the domain model and JSON output, but are not yet applied by the CPM solver. Actual dates are not inferred from planned dates, so delayed status must be supplied by a future actual-progress layer.

    #Quick start

    Install the MoonBit toolchain, then run the deterministic demo:

    git clone https://github.com/cj3335556/moonbit-4d-schedule.git cd moonbit-4d-schedule moon check moon test moon run src/cli

    The demo exercises CPM, PERT, resource leveling, BIM progress aggregation, and JSON snapshot serialization. Library packages can be imported from the module after it is published as cj3335556/moonbit-4d-schedule.

    #Validation

    The repository tests the core graph, PERT, leveling, BIM, JSON, date, and large synthetic-network paths. The CI workflow runs formatting, strict checks, tests, all supported backends, interface generation, and the CLI demo.

    Useful local commands are:

    moon fmt --check moon check --deny-warn moon test --deny-warn moon check --target all moon test --target all moon info --target all

    #License

    Apache License 2.0. See LICENSE.