[OS] Java, Java Tools and OS services

gregb gregb at grotto-networking.com
Thu Apr 24 18:05:52 EDT 2008


Thanks for the info Kip. Unfortunately I have to use Java since all my
equation generation code and visualization code is in Java. I deal
with optical network planning and routing and we like to describe and
view results via a graph of the network we are dealing with. Hence
there is a large amount of my code in Java. What I was hoping to do is
somehow use either a subset of the OSJava classes or the classes
generated by JAXB to ease the programmatic generation of the OSiL
files and deal with the results via the appropriate schema.

It looks like the OSJava code is somewhat optimized for a larger
purpose than just generating and parsing OSiL and the like...  Got it
to compile but ran into trouble getting it to run do to class loaders
not finding classes. I try not to get to far into any programming
language environment if I can help it ;-).

I took the problem output from Lp_solve (in "lp" format) converted it
to "mps" then ran it through CBC via OSSolverService, before I started
messing with the OSJava or JAXB stuff.  I'm still trying to figure out
the easiest way to interface via Java... I'm Trying JAXB a bit more...

Thanks

Greg

On Apr 24, 11:59 am, Kipp Martin <kipp.mar... at chicagogsb.edu> wrote:
> Hi Greg:
>
>
>
> > What I didn't see from the code is whether there is a way (via Java
> > and the executable) to stop computations at in intermediate point
> > (e.g. I'm using MILP solvers such as CBC and sometimes just happy to
> > grab a feasible or improved solution).  What files should I look at
> > for this?
>
> We have not yet implemented a C++ OSOptions class for passing options to
> the Solver.  Here are two things that are possible.
>
> 1) Some solvers such as Ipopt read an options file. You can simply put
> this options file in the directory where the OSSolverService is being
> executed.
>
> 2) If there are options you wish to give a COIN-OR solver you can edit
> OS/src/OSSolverInterfaces.cpp.  For example, for Cbc if you are using
> trunk revision 1737 see line 307
>
> CbcModel model( *m_OsiSolverPre);
>
> you can then use the model object to set an Cbc options you wish. Of
> course you will have to recompile the OS lib and then link again with
> OSSolverService.
>
>
>
> > If I can pull this stuff together, I'll try to put together a tutorial
> > for newbies on using Java and OS particularly locally.
>
> Just so there is no confusion, when using OS locally there is no need
> for Java. You just use the command line executable OSSolverService.
> There are illustrations of this in the User's Manual.  See
>
> osUsersManual_1.1.pdf
>
> in OS/doc
>
> Hope this helps. Let me know if you have further questions.
>
> Cheers,
>
> --
> Kipp Martin
> Professor of Operations Research
> and Computing Technology
> Graduate School of Business
> University of Chicago
> 5807 South Woodlawn Avenue
> Chicago, IL 60637
> 773-702-7456
> kipp.mar... at chicagogsb.eduhttp://gsbkip.chicagogsb.eduhttp://www.coin-or.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Optimization Services (OS)" group.
To post to this group, send email to optimizationservices at googlegroups.com
To unsubscribe from this group, send email to optimizationservices-unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/optimizationservices?hl=en
-~----------~----~----~----~------~----~------~--~---



More information about the OS mailing list