Hello,

I'm thinking of using Gecode as a solver in my project. However the first 
hinder I've encountered was how to define a space and variables in Gecode. (I 
have some experience with Gecode, when I used only IntVar-s)
The problem is following.
I have a set of objects with some properties of types such as string, double, 
integer, etc.
This set defines my domain.
The input for my program is an object that has dependencies on the objects from 
the domain. Apart from that the input object puts constraints on the properties 
of the objects from object domain. Here's an example:

--------------------------------------
InputObject O1
    property1 = "name"
    property2 = 4.321
    property3 = 2

    dependency1 = "objectName"
--------------------------------------

Space:
D1 {obj1, obj2, obj3, ...}

The idea is to select one or more objects from D1 such that the name of an 
object is "objectName" AND it satisfies the constraints (property1, property2, 
etc.). There can be dozens of objects with "objectName", but only few can 
satisfy the constraints. And this chain can be infinite, i.e. if selected 
object is obj1, it can also have dependencies on others (i.e. obj23), and it 
goes on and on.

The problem can be solved using DFS + backtracking. But I want to try Gecode 
first.

So the question is how to define an object in Gecode. Can it be expressed in 
terms of IntVar, IntVarArray? Should I create custom variable implementations, 
views, variable arrays?

Thanks!

Kind Regards, Dimitri Mazmanov.

_______________________________________________
Gecode users mailing list
[email protected]
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to