StructJuMP / StructJuMP.jl

A block-structured optimization framework for JuMP
Other
54 stars 19 forks source link

Working with the StructJuMPSolverInterface #21

Closed fqiang closed 8 years ago

fqiang commented 8 years ago

This PR updates the StructJuMP to work with the StructJuMPSolverInterface.

  1. It introduces an id field for each of the children node. By default the master node has id = 0.
  2. It hooks up the StructJuMP model with JuMP's solve function.
  3. Updates the README with installation instruction.
joehuchette commented 8 years ago

I think the nonlinear solvers section should be restructured:

Nonlinear solvers

PIPS-NLP

Installation

Ipopt

Example

Known limitation

joehuchette commented 8 years ago

Looks good to me, beyond the minor cosmetic things I mentioned.

fqiang commented 8 years ago

I think from the user's point of view, we probably want to hide as much as possible of the technical requirements from the user. The user will just need to run the model with mpirun -np NUM_PROCS julia model.jl. And when the number of scenarios equals to the multiple of NUM_PROCS will give the best parallel efficiency. We can probably achieve this by making StructuredModel as a type, and call MPI.Init in its type constructor and MPI.Finalized in its finalizer. Then the MPI will be finalized automatically when the StructuredModel goes out of scope. However, when this will be called will be dependent on Julia's GC. (Also, the MPI.Init and Finalize is called for root node only, ie parent==nothing).

cnpetra commented 8 years ago

Feng, I think we should avoid this... it won't allow the user to reuse the communicator for cases when StructJuMP is resolved or embeded in a code that already has a communicator and/or still needs it after the model is solved, see what Miles said...

fqiang commented 8 years ago

If the StructJuMP is resolved that means the model is still in scope and finalizer should be called yet. It is a good point that we also want to allow user to embed and uses his own communicator, which means that StructJuMP provides more flexibility to a more technical capable user.

fqiang commented 8 years ago

closed and replaced with PR22 #22