Marginal distributions are not matched
Yansa2000 opened this issue · 4 comments
Hello, when I used LinSATNet to optimize a traffic engineering problem, I encountered this issue:
line 146 in ./LinSATNet/linsat.py
if not torch.all(torch.abs(_sum_dim(A, dim=-1) - b.sum(dim=-1)) < 1e-4):
raise RuntimeError('Marginal distributions are not matched! Please report this issue on GitHub.')
I wonder what it means and if there exists a method to cope with this issue. Thank you very much!
Hi, thank you so much for your interest in the code. Can you please provide a minimal example for this issue? I think providing the A b C d E f
matrices will be fine.
I did not use E and f. The A, b
and C, d
I used are as follows:
https://github.com/saYan502/TE-problem
The input x here denotes the traffic on each path. A and b provide capacity constraints while C and d offer a lower bound of x.
I think one point worth noting is that all x is assumed to be in the range [0, 1]. So all your constraints with d == 0 is unnecessary, and the other C, d
constraints seem to be unsatisfiable. I will spend some time adding error/warnings to the code. For your specific tasks, you can define a multiplier to scale the value
Thank you very much for your explanation. I understand now.