Skip to content

add variable bounds on the torque#543

Open
Peter230655 wants to merge 3 commits into
csu-hmc:masterfrom
Peter230655:pendulum-variable-bounds
Open

add variable bounds on the torque#543
Peter230655 wants to merge 3 commits into
csu-hmc:masterfrom
Peter230655:pendulum-variable-bounds

Conversation

@Peter230655

Copy link
Copy Markdown
Contributor

This is likely the simplest example we have, so I added variable bounds here.

---------

- Show the use of opty with likely the simplest example possible.
- Show how to use adjustable bounds.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Show how to use adjustable bounds.
- Show how to use variable bounds.

[-3 for _ in range(num_nodes - 2 * third)])
hi_T = np.array([3 for _ in range(third)] +
[1 for _ in range(third)] +
[3 for _ in range(num_nodes - 2 * third)])

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This are how to use NumPy to do such things:

hi = np.full(n, 3.0)
hi[100:200] = 1.0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This are how to use NumPy to do such things:

hi = np.full(n, 3.0)
hi[100:200] = 1.0

Thanks!
My python is still very limited! :-((

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants