Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

accept vectors for starting values #481

Closed
mlubin opened this issue Jul 15, 2015 · 5 comments
Closed

accept vectors for starting values #481

mlubin opened this issue Jul 15, 2015 · 5 comments
Milestone

Comments

@mlubin
Copy link
Member

mlubin commented Jul 15, 2015

Proposed in #477, this should work:

@variable(m, x[1:16], start = xstart)

CC @tyleransom

@mlubin
Copy link
Member Author

mlubin commented Jul 29, 2015

Just to put some ideas down, we can take an array as a starting value under the following conditions:

  • The variable is a OneIndexedArray
  • The term xstart doesn't depend on any of the indexing variables in the definition of x
  • If the above is true, we can check if the dimensions of xstart match the dimensions of x

@joehuchette
Copy link
Contributor

👍

@mlubin
Copy link
Member Author

mlubin commented Jul 29, 2015

Post 0.10 I think.

@dpo
Copy link

dpo commented Aug 20, 2015

👍

@mlubin mlubin added this to the 0.11 milestone Sep 29, 2015
@mlubin mlubin modified the milestones: 0.12, 0.11 Dec 1, 2015
@mlubin mlubin modified the milestones: 0.13, 0.12 Feb 21, 2016
@mlubin
Copy link
Member Author

mlubin commented Apr 27, 2016

Given that you can just do:

@variable(m, x[1:16])
setvalue(x, xstart)

I'm not really convinced that we need to implement this feature. I think it's too magical to have the interpretation of the keyword arguments depend the fragile conditions I listed above.

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

No branches or pull requests

3 participants