Echtzeitsysteme / gips

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

Some objective expressions lead to a frozen IDE #163

Open maxkratz opened 3 days ago

maxkratz commented 3 days ago

Problem specification:

package "gipsl.all.build.objbug"
import "platform:/resource/gipsl.all.build.model/model/Model.ecore"

config {  
    solver := GLPK [home:="fu", license:="bar"];
    launchConfig := true [main := "TODO"];
    timeLimit := true [value := 42.0];
    randomSeed := true [value := 0];
    presolve := true;
    debugOutput := true;
}

pattern p {
    host: SubstrateResourceNode
    vnode: VirtualResourceNode {
        -host -> host
    }
}

mapping m with p;

objective o -> mapping::m {
    1 / (1 + 1)
}

global objective : max {
    1
}

The objective o leads to a frozen Eclipse that never finished the state Building $project: Compile Model.gipsl.

Here is a call trace taken from the profiler: Screenshot from 2024-09-30 15-20-00

maxkratz commented 3 days ago

Test case for reproducing the bug: https://github.com/Echtzeitsysteme/gips-tests/blob/feature/add-test-for-obj-build-bug/gipsl.all.build.objbug/src/gipsl/all/build/objbug/Model.gipsl