Skip to content

COOM Profile: N-LIN

Synopsis

The COOM N-LIN profile considers calculations of numerical values inside the solution space, as in the N-FULL profile. The main difference is, that the computation of the numerical values are based on a linear equations. Non-Linear numerical operators such as sqrt, cos, and pow will exit this profile.

A typical N-LIN computation is the sum over a collection of numerical values.

Building Blocks

Example: Comfort Bike

The product ComfortBike offers front and rear bags, that come in different sizes and weights, respectively. Since this bike focuses on its comfort, it also offers a suspension, that can be configured based on the expected weight of the bike. The total weight is calculated based on the weights of the rider and the bags. The value of the total weight is then used in a constraint stating that the possible weight of the suspension should be compatible with the expected total weight. Since, the computed value is based on a sum, the calculation is a linear equation.

product {
    ComfortBike comfortBike
}

structure ComfortBike {
    FrontBag frontBag
    RearBag  rearBag
    Suspension suspension
    num /kg riderWeight
    num /kg totalWeight
}

enumeration FrontBag {
    attribute num /kg maxWeight

    small   = (  5 )
    medium  = ( 10 )
    large   = ( 15 )
}

enumeration RearBag {
    attribute num /kg maxWeight

    small   = ( 10 )
    medium  = ( 15 )
    large   = ( 25 )
}

enumeration Suspension {
    attribute num /kg minWeight
    attribute num /kg maxWeight

    s1 = (   0  120 )
    s2 = ( 120  135 )
}

behavior ComfortBike {
    default riderWeight = 100
    imply totalWeight = (riderWeight + frontBag.maxWeight + rearBag.maxWeight)
}

behavior ComfortBike {
    require (totalWeight  > suspension.minWeight) 
    require (totalWeight <= suspension.maxWeight)
}