Changing variable names in printed constraints

Questions and problems about using polymake go here.
brunompac
Posts: 1
Joined: 26 Jun 2025, 17:29

Changing variable names in printed constraints

Postby brunompac » 26 Jun 2025, 17:34

Hi!

Beginner polymake user.

I would like to specify the names of each variable when printing constraints (with `print_constraint`). I noticed we can change the labels of the inequalities and equalities, but I couldn't find anywhere a way to specify or modify the variable names and indices. Am I missing something?

User avatar
gawrilow
Main Author
Posts: 434
Joined: 25 Dec 2010, 17:40

Re: Changing variable names in printed constraints

Postby gawrilow » 27 Jun 2025, 18:58

If you are using `print_contraints` with a single coordinate matrix, you can pass an option `coord_labels => ['X', 'Y', 'Z', ...]` . If you are using `print_constraints` with a whole Cone or Polytope object, you can store the labels as a property beforehand: `$p->COORDINATE_LABELS=['X', 'Y', 'Z', ... ];`


Return to “Helpdesk”