Hi Gaby, There are two options I see for this. The first, and probably simplest, is to wrap the ILP optimization library in a NetLogo extension. For instance, the matrix extension wraps the JAMA java library: https://github.com/NetLogo/Matrix-Extension (though it's a little on the old side). A simpler example, if you're comfortable with Scala, is the CSV extension, which wraps the Apache Commons CSV library: https://github.com/NetLogo/CSV-Extension. The basic workflow is that you would add a reporter primitive to your extension that takes as an argument the necessary data for ILP and then returns the output of the optimization.
The other option would the controlling API, which allows NetLogo to be used as a library in another Java program: https://github.com/NetLogo/NetLogo/wiki/Controlling-API. This sounds like a perfect case for an extension, so I would recommend that approach over the controlling API approach. Hope that helps! Bryan On Tue, Jan 22, 2019 at 7:09 AM <gabyjoe.hann...@gmail.com> wrote: > Hello, > > I would like to use Netlogo in combination with a Java code that run an > ILP optimization. > During the simulation, input data (for the optimization) is required from > Netlogo and the output of the optimization is to be disseminated back to > Netlogo. > > I am not sure if it is possible to invoke and control the NetLogo > application from the Java program (in which the optimization takes place) > while maintaining the flow of data between NetLogo and java, or if there is > a more practical technique to do that. > > Thanks, > Gaby > > -- > 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 netlogo-devel+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Bryan Head PhD Candidate, Computer Science Center for Connected Learning and Computer-Based Modeling Department of Electrical Engineering and Computer Science Northwestern University -- 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 netlogo-devel+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.