Goal models are an effective mechanism for elicitation and analysis in early Requirements Engineering, improving communication with stakeholders. However, in real scenarios, goal models become a complex network of actors and evaluating them can be difficult. Some tools assess the level of achievement of actors and intentional elements, which alleviate this limitation. However, using tools to evaluate models has some limitations, like the difficulty of integrating goal models with other models, the training required to use these tools, and the impossibility of assessing models when tools become outdated. In this work, we propose a formalization of iStar 2.0 models in the form of linear constraints that makes it possible to evaluate and optimize models using linear programming. This formalization allows the evaluation of goal models on existing tools and facilitates integration with other approaches.