AntaresSimulatorTeam / antares-xpansion

Antares-Xpansion aims at performing investment simulations. It is currently based on Antares_Simulator studies.
https://antares-doc.readthedocs.io/
Apache License 2.0
7 stars 10 forks source link

Double issue : lpnamer and infinite time for iterations with many candidates #344

Closed ValentinSatge closed 2 years ago

ValentinSatge commented 2 years ago

Hi,

I've got two issues while using Xpansion :

  1. I am working with two different studies. On the first one, Xpansion is working, but in the second one, when i am doing the exact same methodology to implement a virtual node, i have the following issue : image I was used to have that issue, telling me that I should be careful with the name i am using and to have an alphabetical order in my "link". It is not the case here, and I wanted to know if you have the typical errors that write down the "exited lpnamer with status 1" because i am a bit lost on that one and cannot find any explanation for that issue.

  2. I am also working on a study with around 100 candidates. When i am launching Xpansion, the prelaunching is working and i have the first iterations. Yet, at some point (for the 57th iteration, but that could be on the 4th one or the 2nd one, depending on the number of candidates), Xpansion is "spinning in the void". I can wait for more than 24h (knowing that i have the 3 first iteration in like 3 hours) and I have no results. Xpansion is blocked in the "Iteration 57, Solving Master..." (as you can see in the picture) image I tried changing my relative_gap to 0.5 and used different absolute gap (around few millions) while using a "fast" mode and the benders decomposition method.

Do you have any idea why ? Can we work with that many candidates at the same time, is there some kind of a limit or any explanation ? I am working with the 0.6.0 version and with Antares 8.1.

Thank you in advance for the answer, I would be grateful if you could help

Have a nice day and a good new year,

Valentin

tbittar commented 2 years ago

Hi, thank you for posting an issue,

  1. Could you check the file lp_namer.log located in <your_study_folder>/output/<simulation_name>/lp and post it here if you are still not able to identify the cause of the crash ? A common mistake is to use a - in the name of an area.

  2. It seems that you are working with a large study. At each iteration of the Benders algorithm, new constraints are added to the master, which makes it harder and harder to solve. You should notice that the time required to solve the master problem increases over the iterations.

    • What option do you use for the resolution of the master: integer or relaxed ?
    • How are defined your candidates : with max-units and unit-size or only with max-investment ?
    • And what happened with a relative gap of 0.5 ? Because it does not seem to correspond to the picture you posted as the algorithm continues with a relative gap of 0.118976.

Anyway, I think you should also try to reduce the number of candidates in your model as you are probably in the limits of what Xpansion can handle.

Thank you for your feedback on Xpansion, Thomas

ValentinSatge commented 2 years ago

Hi,

Thank you so much for the answer.

  1. Here is lp_namer.exe (not the .log that i don't have). There is also the "logs => solver" in which we can see the error that "abort" the system. If you could fin any "usual" errors than I can't resolve it would be perfect.

solver-20220106-102717.log lp_namer.exe.log

  1. For the master resolution, you made me realized that I was using the "integer" one and not the "relaxed". I am currently using the "relaxed" one and it seems that the problem is solved. I have more than 100 candidates and Xpansion has been working for 12h (101 iterations) with no bug, yet..! I am waiting for the final answer now, but it seems that the problem is solved. I was also using the "max-units"/"unit-size" and not the "max-investment". The screenshot I sent was for an absolute gap and not a relative one, yet, the same issue occurs by using the one or the other. And for information, with the "integer" resolution, I could have an answer in my system for 25 candidates and an infinite time of execution for 30 ! The limit was around 25/30 candidates.

You are also right, I should find a solution to reduce the number of candidates. Thank you again and do not hesitate to ask for more document if that could help you.

Valentin

tbittar commented 2 years ago
  1. From solver-20220106-102717.log it seems that there is a problem when Xpansion writes the optimization problem corresponding to week 26. The log file lp_namer.exe.log shows that there are duplicate rows (i.e. duplicate constraints). Is it possible for you to join a zip folder of your whole Antares study so that I can reproduce the problem and find the cause ?
  2. With max-units / unit-size and master = integer, the master problem is a MILP (Mixed Integer Linear Program), whereas using master = relaxed solves a linear relaxation of the master problem, which is much easier, especially with that many candidates. However, as there is no free lunch, the solution with master = relaxed will not be a multiple of unit-size. Therefore you may evaluate the quality of your solution by running an Antares simulation using for example a rounding of the Xpansion solution to the nearest number of units for each candidate.

Thanks for your feedback on the performance of Xpansion,

I am glad I can help you, Thomas

ValentinSatge commented 2 years ago

Hi, Here is a link for my study with "wetransfer". I Couldn't find another way to transfer the study that is too big even as a .zip. You will see that this is an European study, with just one simple candidate for France. Let me know if you find any way to avoid the "errors". Thank you again for your advice they are really helpful.

https://we.tl/t-KGNfRaHzIh

Valentin

tbittar commented 2 years ago

Hi,

After a thorough investigation of the log files, I found the culprit. There was in fact a (somewhat hidden) link between area PL00 and... itself. This link is only visible in the Antares Simulator GUI via the links section, but is not visible on the system map.

I do not know how this link was created as this cannot be done from the GUI (and the link could neither be deleted from there as well). So I manually modified the files of the Antares study to remove the link:

I tested the study on my laptop and was able to run the Xpansion simulation normally ! Here is a we-transfer link : https://we.tl/t-hH6aZA5pv0

Let me know if this works for you ! Have a nice week-end, Thomas

ValentinSatge commented 2 years ago

Hi,

Thank you so much for the help. I could have not find any of it without your advice. It is working perfectly now and I can start my different studies. Thank you again for the different responses and advices.

Have a great week Thomas,

Valentin