Modeling a scenario with linear function