Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMPS reader #241

Closed
odow opened this issue Aug 9, 2019 · 13 comments
Closed

SMPS reader #241

odow opened this issue Aug 9, 2019 · 13 comments

Comments

@odow
Copy link
Owner

odow commented Aug 9, 2019

@gjharsha has C code for parsing SMPS here: https://github.com/USC3DLAB/SD/blob/master/src/smps.h
and has expressed interest in adding it to SDDP.jl.

There are two options

  • compiling and distributing a C library
  • re-writing in Julia

I'm not sure which requires less effort.

However, there are some licensing issues, because MPL 2.0 allows commercial use, but the SD license requires a commercial license from USC. So we might need to ask @gjharsha if he's willing to make the code (just smps.h and smps.c, not the full SD solver) available under a more permissive license.

@mtanneau
Copy link

Is this still topical?

I'm currently writing a pure-julia SMPS parser (actually, most of it is written I think, I'm mostly re-factoring the code and making it ready for public release).

Let me know if it would be relevant here.

@odow
Copy link
Owner Author

odow commented Jan 28, 2020

Is this still topical?

Yes!!!

I'm currently writing a pure-julia SMPS parser (actually, most of it is written I think, I'm mostly re-factoring the code and making it ready for public release).

💯👍 🚀

Let me know what I can do to help!

@mtanneau
Copy link

What I need for myself (and for which I have most of the infrastructure) is to parse two-stage stochastic LPs from SMPS files. By .smps I mean .cor, .sto and .tim files.

I'm hoping the marginal cost of supporting more time periods and quadratic terms should be OK.

Things that would be useful to discuss would be:

  • Data structures
  • Supported formats and constraints (e.g. QPs)
  • Some small instances for unit testing

So far I've only worked with the tssp instances that are shipped with the PDCGM software, (see data/tssp/ in the extracted folder).

@odow
Copy link
Owner Author

odow commented Jan 28, 2020

Two stage LPs only sounds good by me! No need to do multistage. Data structure is template matrices and vectors, and list of element changes for second stage problems, along with their probabilities. Keep it simple as possible.

@odow
Copy link
Owner Author

odow commented Jun 10, 2020

@mtanneau what is the status of https://github.com/mtanneau/SMPSReader.jl?

@mtanneau
Copy link

I merged a PR last week with a functioning reader.

Here, "functioning" means "it parses the input files", i.e., all the code does for now is read .cor, .tim and .sto files and build corresponding data structures.

There's no post-processing to, e.g., build the deterministic equivalent (I do have code for that in another repository, but it's still private for now).

I'd say a useful discussion to have, now, is on whether you need additional functionalities for SDDP.

@odow
Copy link
Owner Author

odow commented Jun 10, 2020

I think it should be sufficient for me to just turn your data structures into an SDDP.jl model. I'll take a deeper look.

@mtanneau
Copy link

mtanneau commented Jun 10, 2020

Actually, I'm submitting that paper next week, so I can open the code now.

The code I wrote is here.
It's for two-stage stochastic programs, and I transform everything in standard form.

It doesn't handle:

  • integer variables (because QPSReader currently does not record them)
  • stochastic modifications of range constraints (I don't think it's defined in SMPS format)
  • stochastic variable bounds (also not defined in SMPS, IIRC)

@odow
Copy link
Owner Author

odow commented Jun 10, 2020

Ooo interesting! This is almost exactly what I need. What's the paper on? CG for 2-SP?

@mtanneau
Copy link

mtanneau commented Jun 10, 2020

It's the revised paper on Tulip, which now contains some CG for 2-SP, yes.

@odow
Copy link
Owner Author

odow commented Jul 18, 2020

#332 implements a reader/writer for StochOptFormat. At this point, we should write a SMPS -> SOF converter.

I have no interest in writing an SMPS writer.

@mtanneau
Copy link

Fine by me.

@odow
Copy link
Owner Author

odow commented Jan 26, 2021

Closing in favor of SMPSReader.

@odow odow closed this as completed Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants