The Internet of Things is one of the core drivers of variability modelling and requires explicit mechanisms to manage
it. A key technology for addressing this variability is product line engineering. This approach uses a reference architecture
to establish a well-designed set of assets that fit together, the Software Product Line (SPL). One of the limitations of variability
models is they do not provide information about the quality of new products or how they achieve stakeholder requirements.
Several approaches tackle this issue by integrating variability models with goal models. The main challenge is conciliating the
different variability perspectives to make the joint use of both models possible without the loss of information or alterations to
the models’ semantics. In this work, we present a framework for analysing and optimising SPL products considering stakeholders’
requirements that respects the semantics of both models. The framework is based on Integer Linear Programming (ILP), a
field of mathematical programming. Variability and goal models are formalised as a set of linear constraints and are linked using
mapping functions. As a proof of concept, we present a tool that takes both models and mapping functions to generate an ILP
problem that can be solved using Matlab.