Problem-solving using mathematical optimization typically proceeds through the following iterative steps.
First, clearly define in words what problem you want to solve, what you want to achieve (objective), and what constraints exist. Through interviews with stakeholders and analysis of the current situation, eliminate ambiguity and identify specific goals and conditions.
Example: We want to minimize delivery costs. However, we must meet each customer's demand and not exceed each truck's loading capacity.
Express the verbalized requirements using the components of a mathematical optimization model: "variables," "objective function," and "constraints." Decide what information to treat as variables, how to express the objective as a mathematical formula, and how to describe constraints as inequalities or equations. This step greatly influences the quality of the model.
Example:
Let variable $x_{ij}$ be the amount transported from factory $i$ to customer $j$.
Objective function $\min \sum_{i,j} c_{ij} x_{ij}$ (where $c_{ij}$ is the transportation cost).
Constraints $\sum_i x_{ij} \geq d_j$ (meet customer $j$'s demand $d_j$), $\sum_j x_{ij} \leq s_i$ (do not exceed factory $i$'s supply $s_i$).
Instead of starting with large-scale real data, create and test with small, simple data (instances) to verify that the model functions as intended. This makes it easier to discover formulation errors and basic behaviors early on.
Example: Solve a transportation problem with a small dataset of about 2 factories and 3 customers.
Input the formulated model and data (instance) into a mathematical optimization solver to calculate a solution. Platforms like JijZept assist in the process of describing the model, selecting an appropriate solver, and executing it.
Evaluate the time it took for the solver to find a solution (calculation time) and the quality of the solution obtained (objective function value, presence of constraint violations, etc.). Depending on the solver, you may get a guaranteed optimal solution or an approximate solution.
Example: Calculation time was 5 seconds, the objective function value of the solution obtained is 1500, and it satisfies all constraints and required conditions.
Confirm that the solution obtained is meaningful in the context of the original problem and does not contradict intuition. Visualizing results using graphs and figures, rather than just looking at numbers, can make it easier to find problems and hints for improvement.
Example: Plot transportation plans on a map to check for inefficient routes. Display scheduling results in a Gantt chart.
Mathematical optimization projects rarely complete in a single cycle. It's important to have an iterative process where you find areas for improvement in the model based on the results obtained, revise the formulation and data, and then run the solver again.
Thus, mathematical optimization projects start with verbalizing requirements and then go through cycles of formulation, solving, evaluation, and improvement to gradually find solutions that match the requirements. Therefore, how quickly you can iterate through this cycle greatly contributes to the success of the project.
From the next chapter, let's proceed with the mathematical optimization process following this flow.