MIN

From ASCEND

Jump to: navigation, search

The MIN array-based function was proposed for implementation and is mentioned in the ASCEND user's manual, but is not yet supported. If implemented, it will probably only be implemented for use within METHODs, because it leads to non-smooth relations if used within the declarative part of a MODEL.

A current workaround is to use an IF statement within a procedural FOR loop, as follows:

METHOD find_minimum_delta_T;
    MIN_DT := HI.T - CI.T;
    FOR i IN [0..n] DO
        IF TH[i] - TC[i] < MIN_DT THEN
            MIN_DT := TH[i] - TC[i];
        END IF;
    END FOR;
END find_minimum_delta_T;

See also SUM, Arrays and sets.