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

Fix initial state in MSPFormat reader #639

Merged
merged 5 commits into from
Jul 20, 2023
Merged

Fix initial state in MSPFormat reader #639

merged 5 commits into from
Jul 20, 2023

Conversation

odow
Copy link
Owner

@odow odow commented Jul 9, 2023

@bonnkleiford: I haven't tested, but here's a fix for you initial_value error.

@bonnkleiford
Copy link

Hello,

So I tried it and I got a different error message this time:
Screenshot 2023-07-09 at 16 58 01

Thanks

@odow
Copy link
Owner Author

odow commented Jul 9, 2023 via email

@odow
Copy link
Owner Author

odow commented Jul 9, 2023

Try now

@bonnkleiford
Copy link

Hi,

I tried it and now a new one:

Screenshot 2023-07-09 at 18 00 57

@odow
Copy link
Owner Author

odow commented Jul 9, 2023

Actually wait. Let me test this properly

@odow
Copy link
Owner Author

odow commented Jul 9, 2023

I'm not really sure what the problem is. I need to debug some more, but I won't be online today

@bonnkleiford
Copy link

No worries, Oscar. Thanks for the help. I will just wait when you're back. :)

@odow
Copy link
Owner Author

odow commented Jul 20, 2023

try now

julia> using SDDP

julia> model = SDDP.MSPFormat.read_from_file("/Users/Oscar/Downloads/Hydro_Simple/Hydro_Simple")
A policy graph with 12 nodes.
 Node indices: 4, ..., 3

julia> import HiGHS

julia> set_optimizer(model, HiGHS.Optimizer)

julia> SDDP.train(model; iteration_limit = 3)
-------------------------------------------------------------------
         SDDP.jl (c) Oscar Dowson and contributors, 2017-23
-------------------------------------------------------------------
problem
  nodes           : 12
  state variables : 1
  scenarios       : 8.10000e+01
  existing cuts   : false
options
  solver          : serial mode
  risk measure    : SDDP.Expectation()
  sampling scheme : SDDP.InSampleMonteCarlo
subproblem structure
  VariableRef                             : [6, 6]
  AffExpr in MOI.EqualTo{Float64}         : [2, 2]
  VariableRef in MOI.GreaterThan{Float64} : [5, 5]
  VariableRef in MOI.LessThan{Float64}    : [1, 2]
numerical stability report
  matrix range     [1e+00, 1e+00]
  objective range  [1e+00, 2e+02]
  bounds range     [2e+02, 1e+06]
  rhs range        [5e+01, 2e+02]
-------------------------------------------------------------------
 iteration    simulation      bound        time (s)     solves  pid
-------------------------------------------------------------------
         1   1.500000e+04 -2.500000e+03  7.572103e+00        16   1
         2   1.750000e+04  6.666667e+03  8.615028e+00       356   1
         3   7.500000e+03  7.916667e+03  8.632101e+00       372   1
-------------------------------------------------------------------
status         : iteration_limit
total time (s) : 8.632101e+00
total solves   : 372
best bound     :  7.916667e+03
simulation ci  :  1.333333e+04 ± 5.889067e+03
numeric issues : 0
-------------------------------------------------------------------

@odow
Copy link
Owner Author

odow commented Jul 20, 2023

Merging since this seems okay from my end. Hard to tell without other examples.

@odow odow merged commit fb19cd6 into master Jul 20, 2023
6 checks passed
@odow odow deleted the od/fix-inint branch July 20, 2023 21:23
@bonnkleiford
Copy link

Hi Oscar,

My apologies for the later reply. I was travelling to Davis for the conference and missed the emails.

I confirm that it worked with the last error I encountered. I will be trying all the rest of the other synthetic problems with it the coming days. Will keep you updated.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants