Yes I am aware of it and also use it. What I need is a step by step Fourier Motzkin decomposition. It's for teaching reasons. I want also be able to draw the projections implied by it from 3D to 2D and 1D. Then I plot it in Asymptote (because on html it has latex label even in 3D, which is not the case of Sagemth).
De: "Dima Pasechnik" <[email protected]> À: "sage-support" <[email protected]> Envoyé: Mardi 15 Juin 2021 11:02:14 Objet: Re: [sage-support] Matricial conversion of a system of inequations. Just checking - are you aware of Sage's functionality to deal with constructing of polyhedra by linear inequalities and equations? It seems you are trying to do the same, but in a rather inefficient way. On Tue, 15 Jun 2021, 09:58 [ mailto:[email protected] | [email protected] ] , < [ mailto:[email protected] | [email protected] ] > wrote: The following code write a system of inequations x = vector(SR, SR.var('x_', 7)) A = random_matrix(SR,7,7) b = random_vector(SR,7) o = zero_vector(SR,7) Z=[SR(A[i]*x-b[i])<=SR(o[i]) for i in range(A.nrows())] SR(x[1]).variables()[0] Sol=[solve(SR(Z[i]),SR(x[2]).variables()[0])[1] for i in range(len(Z)-1)] Sol_inf=[y[0].lhs() for y in Sol if y[0].rhs() == x[2]] Sol_sup=[y[0].rhs() for y in Sol if y[0].lhs() == x[2]] Sol_ind=[y[0].lhs()<=0 for y in Sol if y[0].rhs() != x[2] and y[0].lhs() != x[2]] #result=[[Sol_sup[i].lhs()<= Sol_inf[j].rhs() for i in range(len(Sol_ind))] #for j in range(len(Sol_sup))] #show(result) show(Sol_inf) show(Sol_sup) result=flatten(Sol_ind+[[Sol_inf[i]-Sol_sup[0] <=0 for i in range(len(Sol_inf))] for i in range(len(Sol_sup))]) result I would like to transform in a matricial system of either the form A*x+b <= 0 or (A, b). I think I have all the elements do do that in an answer of Tmonteil to a question already ask. But unfortunately 'Ask Sagemath' is down. Thanks -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [ mailto:[email protected] | [email protected] ] . To view this discussion on the web visit [ https://groups.google.com/d/msgid/sage-support/245302733.2807007.1623747522333.JavaMail.zimbra%40univ-orleans.fr?utm_medium=email&utm_source=footer | https://groups.google.com/d/msgid/sage-support/245302733.2807007.1623747522333.JavaMail.zimbra%40univ-orleans.fr ] . -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [ mailto:[email protected] | [email protected] ] . To view this discussion on the web visit [ https://groups.google.com/d/msgid/sage-support/CAAWYfq0S9hzWF_ku%3DH1wfCTbAE0Dx7uo46Uce-WkF0SFGsoumw%40mail.gmail.com?utm_medium=email&utm_source=footer | https://groups.google.com/d/msgid/sage-support/CAAWYfq0S9hzWF_ku%3DH1wfCTbAE0Dx7uo46Uce-WkF0SFGsoumw%40mail.gmail.com ] . -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/1200701756.2850454.1623749183703.JavaMail.zimbra%40univ-orleans.fr.
