how to print results of inequality constraints etc?

24 views
Skip to first unread message

Rekkert

unread,
Oct 1, 2021, 7:59:29 AM10/1/21
to apmonitor
Is there any way to print results of inequality constraints in gekko? When i try to print a constraint I just get something like this:

code: print(f'{ test[0].value = }')

console: test[0].value = '((((v1)*(v13))+((v9)*(v14)))+((v5)*(v15)))<=3000'

But i know for a fact that I can get the values of all these variables by doing this instead:
code: print(f'constituent 1: {A_1[0]*x_A[0]+B_1[0]*x_B[0]+C_1[0]*x_C[0]}')

Is there an easier way to print this?
Reply all
Reply to author
Forward
0 new messages