Optimizing models for the sawmilling industry