Blyx Nest Blyx language
Registry / Framework
framework · v0.1.0

Avocet

Plan replenishment after existing reservations and supplier lot sizes.

Source repository · Package JSON

Use Avocet

use vendor::avocet::avocet;

Run the example

nest demo avocet@0.1.0
blyxc native-run avocet-demo/main.blyx
Example source and expected output
use vendor::avocet::avocet;

fn main() {
    let onhand = 10.0;
    let holds = [3, 4];
    let target = 8.0;
    let lot = 4.0;
    let result = avocet_plan(onhand, holds, target, lot);
    if len(result) == 0 { println!("invalid"); return; }
    let mut i = 0;
    while i < len(result) {
        println!(at(result, i));
        i += 1;
    }
}

Expected output

3
0
8
11

Published versions

VersionPackageSource commitSHA-256
0.1.0Download ZIPca7637637fa93327777e9666123a85be391adb23701912fb7527d78ec5eb3d6a12af5d0915