Echtzeitsysteme / gips

Graph-Based (M)ILP Problem Specification Tool
https://gips.dev
GNU General Public License v3.0
3 stars 1 forks source link

Transformation: The function that moves constant terms from the variable side to the constant side does not work properly in all cases #33

Closed maxkratz closed 1 year ago

maxkratz commented 2 years ago

Transformation: The function that moves constant terms from the variable side to the constant side does not work properly in all cases. -> Example: a + (1-b) + c (1-d) This equation will not be recognized as problematic and will be ignored by the function. But this will leave constant values within the variable expression and, subsequently, lead to errors in the code templates.

maxkratz commented 1 year ago

I'm not quite sure if I could reproduce the behavior accurately. I've added a test case (https://github.com/Echtzeitsysteme/gips-tests/pull/29) that triggers this exception generating the code:

ERROR [build.GipsProjectBuilder::49] - java.lang.NullPointerException: Cannot invoke "org.emoflon.gips.intermediate.GipsIntermediate.ArithmeticValue.getValue()" because "value" is null