Hi everybody
-- Modeling languages (e.g. Mosel) feature simple ways to initialize parameters from data files. In Mosel for instance, if SET has been declared as a set using SET : set of string, then its content can be read easily using initializations from "sets.dat" SET end-initializations The same can be done for arrays and even user-defined types. I believe this spares a lot of time for beginners, who may have a hard time implementing a parser. Do you know if something like that exists in Julia ? Michael. 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. |
Hi Michael,
-- Since Julia is a regular programming language that is perfectly capable of reading in data in various forms (CSV, SQL, JSON, etc.), either via built-in commands like readcsv or via external packages, we leave this task for the user. JuMP is much more similar to the solver API interfaces than to Mosel, AMPL, etc. in this regard. Miles On Friday, December 2, 2016 at 5:28:09 AM UTC-5, Michael Poss wrote:
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. |
Here is one such example: where the data file is in CSV format.
-- 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. |
In reply to this post by Michael Poss
Hell
-- Thank you both for your answers. It is true that readcsv is quite direct. Yet I was thinking about something even more beginner-friendly, e.g. parameter = readfile("data.dat", "parameter"), where data.dat would contain parameter = [1 0 1 1] Possibly I'll do it ... Best, Michael. Le vendredi 2 décembre 2016 11:28:09 UTC+1, Michael Poss a écrit :
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. |
Free forum by Nabble | Edit this page |