pylon-lib / pylon

123 stars 10 forks source link

Linear form constraint needed for ILP #12

Open guoquan opened 4 years ago

guoquan commented 4 years ago

I am trying to implement an ILP solver based on ASTLogicSolver. However, I realize the Tnorm transformation generates non-linear constraints by using * to implement and and or. It should be possible to implement these ops in linear form, such that these constraints can be used in ILP.

sameersingh commented 4 years ago

ASTLogicSolver gives you the expression tree, you can create linear constraints from it as you like.

guoquan commented 4 years ago

The default behavior treats operant as torch.tensor. Should I override the solver (and probably the whole set of operators) to support another operant type?

sameersingh commented 4 years ago

Let's talk about this next meeting. We talked about the logic expression being present, so converting should be easy.