I'm dealing with a kind of assignment problem, in which I have a set of tasks $t$ to be executed by machines $w$, but these tasks depend on the variatns $v$ of components $m$ being selected, which is stated by decision variable $Y_{mv}$.
I would like to ensure that all selected components will satisfy a set of requirements when creating a given product composed of many components. Besides that, I would like to ensure that all the selected components' tasks will be fulfilled somewhere in a process plan.
Considering the following parameters:
Let $F = 1, 3, 4,...$ be the set of requirements to be satisfied.
Let $M = 1, 2, 3,...$ be the set of components that can appear in a product.
Let $V_{M} = 1, 2, 3, ...$ be the set of variants $v$ of a given component $m$ in $M$
Let $T = 1, 2, 3, ...$ be the set of available tasks
Let $R_{mvt}=1$ a parameter that states if variant $v$ of component $m$ requires task $t$, $0$ otherwise
Let $S_{mvf}=1$ a parameter that states if variant $v$ of component $m$ satisfies the requirement $f$, $0$ otherwise
Considering the following decision variables:
$X_{twj}=1$ if task $t$ is performed by machine $w$ in process plan position $j$, $0$ otherwise
$Y_{mv}=1$ if variant $v$ of component $m$ is selected in the product, $0$ otherwise
My objectives are:
- Ensuring that, besides all available tasks, only the tasks required by the selected variants $v$ of components $m$ will be performed (first equation)
- Ensuring that all requirements will be satisfied by the selected variants $v$ of components $m$ (second equation)
$$ \begin{align} \sum_{m} \sum_{v} Y_{mv}*S_{mvf} &= 1 & \forall f in F\\ \sum_{m} \sum_{v} Y_{mv}*R_{mvt} &= \sum_{t} \sum_{w} \sum_{j}X_{twj} \\ \end{align} $$
How to state a constraint to ensure that only the required tasks will be executed?
EDIT: I am using cplex, and when I run the code using the constraints above, it does not return any result (model is infeasible as suggested by @Alex Fleischer).
AttributeError: 'NoneType' object has no attribute 'get_objective_value'
I suppose that the constraints are not well established, but I still have not identified where the problem is. Could someone help with this trouble?