nat1

1

votes
0

answer
6

views

Get coefficients of a polynomial pyomo constraint

In addition to the question here I would like to know how to obtain the coefficients of an arbitrary polynomial constraint of a pyomo model. So, for m= ConcreteModel() m.x_1 = Var() m.x_2 = Var() m.x_3 = Var(within = Integers) m.x_4 = Var(within = Integers) m.c= Constraint(expr=2*m.x_1**2 + 5*m.x_1*...
Nat1
2

votes
1

answer
215

views

C# Palindrome Stack not working

i would like your help with my program. I'm trying to check if the user input is a palindrome. This is my code. Stack cstack = new Stack(); Stack rstack = new Stack(); Console.WriteLine("Enter a palindrome string"); string input = Console.ReadLine(); foreach (char c in input) { cstack.Push(c); } for...
nat1