Constraints and penalties are used to tell the optimizer (CPLEX) which solutions are workable and what are the preferences:
- Constraints (hard by default) limit certain supply chain parameters.
- Penalties make constraints soft,
allowing you to analyze why the defined hard constraints could not be satisfied, and learn how to handle this case.
By default all penalties are set to 0 (but the Up Penalty and Down Penalty in the Demand table).
Constraints are defined in the following tables of the Network Optimization type of scenario:
The penalties that you specify for each constraint define if this constraint is hard or soft:
- Hard constraints - (default type, since penalties are set to 0 by default) cannot be violated, which may result in infeasible solution.
- Soft constraints - (the penalty is greater than 0) can be violated, penalties will be paid, solution will be definitely found.
Since the main objective of the NO experiment is maximizing profit, the optimizer will try to keep expenses as low as possible. Make sure that the penalty for violating the constraint is greater than the expected expenses.
Reasons to use soft constraints:
- Testing scenario
- Avoid solution infeasibility. Having one or more hard constraint(s) may result in infeasible solution.
e.g. we may find a customer that is not profitable, i.e., it is better to pay the penalty rather than satisfy its demand.
e.g. the scenario contains two hard constraints: production constraint and the demand constraint. If demand exceeds production capacity, the solution will be infeasible, unless we make the constraints soft.
Let us say we want to limit the maximum product flow between the source (factory) and the destination (DC).
- Open the Products Flow table of the existing scenario.
- Select the record with the required pair of Source and Destination objects.
- Navigate to the Max Throughput column and define the desired value for the maximum product flow between the objects.
- Leave the Up Penalty with its default value, which is 0.
That's it, we have defined a hard constraint. It is a hard constraint because we did not change the default value of the Up Penalty, which is 0. The product flow between the factory and the DC will not exceed the specified Max Throughput amount.
If you choose to change the default value in the Up Penalty cell, the specified Max Throughput will become a soft constraint. It might be exceeded now, and as a result, penalty will be paid per each product item (or per cubic meter).
How can we improve this article?