For the record: Issue resolved.
-------- Forwarded Message --------
Subject: Re: [netlogo-devel] Command Conflicts between Netlogo and
R-extension
Date: Fri, 19 Sep 2014 18:43:58 -0600
From: Bijon Brown <[email protected]>
To: Jason Bertsche <[email protected]>
Thank you so very much it works perfectly!
On Thu, Sep 18, 2014 at 9:23 PM, Jason Bertsche
<[email protected]
<mailto:[email protected]>> wrote:
Have you tried escaping the quotes around `"max"`? That is, have
you tried using this as the code for (2): `r:eval "lp (\"max\",
f.obj, f.con, f.dir, f.rhs)$solution"`?
On 09/18/2014 07:02 PM, [email protected] <mailto:[email protected]>
wrote:
Hello All,
I am trying to have agents in the model use linear programming
techniques to determine land use. I have used the R-extension to
link NetLogo and R. I called the lpSolve package in R and it
loaded but it seems that I can't get the optimization to run
because of a confilcting command in NetLogo and the lpSolve
function.
Specifically,
the command in lpSolve to have the model run in R is:
lp ("max", f.obj, f.con, f.dir, f.rhs)$solution ...(1)
therfore to code it in Netlogo it would be:
r:eval "lp ("max", f.obj, f.con, f.dir, f.rhs)$solution"
...(2)
but "max" is read as a function in NetLogo and the model fails
to compile
When I remove the quotations around max, the model compiles but
and error emerges in optimization:
"Extension exception: Error in R-Extension: Error in Eval:
org.nlogo.api.ExtensionException: Error in direction == "min" :
comparison (1) is possible only for atomic and list types"
...(3)
Is there a way to have Netlogo observe "max" in (2) as text?
Alternatively is there a way to have R read max as "max"?
Any help on this would be greatly appreciated
Bijon
--
You received this message because you are subscribed to the Google Groups
"netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.