(newby) Concept of "sets" and julia tutorial ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

(newby) Concept of "sets" and julia tutorial ?

Antonello L.
Hello everyone,
 I am very new to both Julia and JuMP.
I am trying to have a look on it and the first question it come in my mind reading the doc is "where is the concept of sets ?", that is the dimensions over which variable and constrains are defined.
I have read in the doc that:

To create arrays of variables we append brackets to the variable name.

@variable(m, x[1:M,1:N] >= 0 )
will create an M by N array of variables. Both ranges and arbitrary iterable sets are supported as index sets.

Does it mean that variables can have a maximum of two dimensions?

Could you also suggest me a good theoretical/practical tutorial for Julia? I have started reading its manual at  http://docs.julialang.org/en/release-0.5/ but it's a 355 pages document, and a bit too technical on same aspects. Conversely, all the other cited documents in the "Resources" section of the same document points to cheatsheet, hands on and how-to that don't return me a feeling of getting the knowledge of the language.
In this, I miss a lot the 66 pages (92 with overview of the standard library) Python tutorial of Guido van Rossum: concise but at the same time it teaches you the basis of the language explaining the various topics by examples.

Thank you
  Antonello Lobianco

--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: (newby) Concept of "sets" and julia tutorial ?

Patrick Kofod Mogensen
May I ask if you tried adding a third dimension?

using JuMP

m
= Model()
# Choose dimensions (added a third called O)
M
, N, O = 3,4,5
# This is the example you mentioned
@variable(m, x[1:M,1:N] >= 0 )
# But have you tried answering your own question by simply trying?
@variable(m, y[1:M,1:N,1:O] >= 0 )





On Thursday, November 24, 2016 at 10:37:31 AM UTC+1, Antonello L. wrote:
Hello everyone,
 I am very new to both Julia and JuMP.
I am trying to have a look on it and the first question it come in my mind reading the doc is "where is the concept of sets ?", that is the dimensions over which variable and constrains are defined.
I have read in the doc that:

To create arrays of variables we append brackets to the variable name.

@variable(m, x[1:M,1:N] >= 0 )
will create an M by N array of variables. Both ranges and arbitrary iterable sets are supported as index sets.

Does it mean that variables can have a maximum of two dimensions?

Could you also suggest me a good theoretical/practical tutorial for Julia? I have started reading its manual at  <a href="http://docs.julialang.org/en/release-0.5/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdocs.julialang.org%2Fen%2Frelease-0.5%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHjZnLbi1IJ0WH159pt_VGnmwgYTg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdocs.julialang.org%2Fen%2Frelease-0.5%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHjZnLbi1IJ0WH159pt_VGnmwgYTg&#39;;return true;">http://docs.julialang.org/en/release-0.5/ but it's a 355 pages document, and a bit too technical on same aspects. Conversely, all the other cited documents in the "Resources" section of the same document points to cheatsheet, hands on and how-to that don't return me a feeling of getting the knowledge of the language.
In this, I miss a lot the 66 pages (92 with overview of the standard library) Python tutorial of Guido van Rossum: concise but at the same time it teaches you the basis of the language explaining the various topics by examples.

Thank you
  Antonello Lobianco

--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: (newby) Concept of "sets" and julia tutorial ?

Antonello L.
Thank you for your reply that I interpret as variables can have an "infinite" number of dimensions.
Honestly I didn't already installed JuMP... I was only asking about some features that were not clear  from the documentation.

Cheers,
   Antonello

 


On Thursday, 24 November 2016 11:27:09 UTC+1, Patrick Kofod Mogensen wrote:
May I ask if you tried adding a third dimension?

using JuMP

m
= Model()
# Choose dimensions (added a third called O)
M
, N, O = 3,4,5
# This is the example you mentioned
@variable(m, x[1:M,1:N] >= 0 )
# But have you tried answering your own question by simply trying?
@variable(m, y[1:M,1:N,1:O] >= 0 )





On Thursday, November 24, 2016 at 10:37:31 AM UTC+1, Antonello L. wrote:
Hello everyone,
 I am very new to both Julia and JuMP.
I am trying to have a look on it and the first question it come in my mind reading the doc is "where is the concept of sets ?", that is the dimensions over which variable and constrains are defined.
I have read in the doc that:

To create arrays of variables we append brackets to the variable name.

@variable(m, x[1:M,1:N] >= 0 )
will create an M by N array of variables. Both ranges and arbitrary iterable sets are supported as index sets.

Does it mean that variables can have a maximum of two dimensions?

Could you also suggest me a good theoretical/practical tutorial for Julia? I have started reading its manual at  <a href="http://docs.julialang.org/en/release-0.5/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdocs.julialang.org%2Fen%2Frelease-0.5%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHjZnLbi1IJ0WH159pt_VGnmwgYTg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdocs.julialang.org%2Fen%2Frelease-0.5%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHjZnLbi1IJ0WH159pt_VGnmwgYTg&#39;;return true;">http://docs.julialang.org/en/release-0.5/ but it's a 355 pages document, and a bit too technical on same aspects. Conversely, all the other cited documents in the "Resources" section of the same document points to cheatsheet, hands on and how-to that don't return me a feeling of getting the knowledge of the language.
In this, I miss a lot the 66 pages (92 with overview of the standard library) Python tutorial of Guido van Rossum: concise but at the same time it teaches you the basis of the language explaining the various topics by examples.

Thank you
  Antonello Lobianco

--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.
Loading...