Transforming Optimization Code from Problem-Based to Solver-Based Approach in MATLAB
Hello,
I have successfully implemented an ILP problem using MATLAB’s problem-based optimization approach. However, I am now looking to switch to the solver-based approach to take advantage of its flexibility and efficiency.
In the problem-based approach, I defined binary decision variables, constraints, and an objective function using optimvar, optimconstr, and optimexpr. The code works well, but I need guidance on how to transform this code into a solver-based format using intlinprog.
Here’s a summary of what I have:
Decision Variables:
A 3D binary matrix A(N, numNodes, num_vehicles) for task assignment.
A binary vector chi(num_vehicles) for satisfaction.
Other binary variables like z, t_wait_aux, etc.
Constraints:
Assignment constraints, dependency constraints, and time-based constraints.
I linearized expressions using auxiliary variables and max constraints.
Objective Function:
The objective is to maximize the satisfaction rate, expressed as a linear function of chi.
Could you provide guidance or directions how to systematically convert my existing problem-based variables and constraints into the matrix form required by intlinprog
Here is the code
the problem is attached.
Thank you for your continued help!Hello,
I have successfully implemented an ILP problem using MATLAB’s problem-based optimization approach. However, I am now looking to switch to the solver-based approach to take advantage of its flexibility and efficiency.
In the problem-based approach, I defined binary decision variables, constraints, and an objective function using optimvar, optimconstr, and optimexpr. The code works well, but I need guidance on how to transform this code into a solver-based format using intlinprog.
Here’s a summary of what I have:
Decision Variables:
A 3D binary matrix A(N, numNodes, num_vehicles) for task assignment.
A binary vector chi(num_vehicles) for satisfaction.
Other binary variables like z, t_wait_aux, etc.
Constraints:
Assignment constraints, dependency constraints, and time-based constraints.
I linearized expressions using auxiliary variables and max constraints.
Objective Function:
The objective is to maximize the satisfaction rate, expressed as a linear function of chi.
Could you provide guidance or directions how to systematically convert my existing problem-based variables and constraints into the matrix form required by intlinprog
Here is the code
the problem is attached.
Thank you for your continued help! Hello,
I have successfully implemented an ILP problem using MATLAB’s problem-based optimization approach. However, I am now looking to switch to the solver-based approach to take advantage of its flexibility and efficiency.
In the problem-based approach, I defined binary decision variables, constraints, and an objective function using optimvar, optimconstr, and optimexpr. The code works well, but I need guidance on how to transform this code into a solver-based format using intlinprog.
Here’s a summary of what I have:
Decision Variables:
A 3D binary matrix A(N, numNodes, num_vehicles) for task assignment.
A binary vector chi(num_vehicles) for satisfaction.
Other binary variables like z, t_wait_aux, etc.
Constraints:
Assignment constraints, dependency constraints, and time-based constraints.
I linearized expressions using auxiliary variables and max constraints.
Objective Function:
The objective is to maximize the satisfaction rate, expressed as a linear function of chi.
Could you provide guidance or directions how to systematically convert my existing problem-based variables and constraints into the matrix form required by intlinprog
Here is the code
the problem is attached.
Thank you for your continued help! solver based optimization, ilp, matlab code MATLAB Answers — New Questions