Code Monkey home page Code Monkey logo

Comments (4)

glatterf42 avatar glatterf42 commented on July 3, 2024

Hi @meng25meng, I edited your answer to make it clearer. Please take a look and try to produce something similar next time.

As for your question, we will need more information to judge the situation and answer it. For starters, what do you mean by "capacity limit constraint"? There are many ways with which you can limit the capacity of technologies in our model, you can have fixed limits or dynamic limits on new capacity and total capacity (total capacity can just be fixed). Which one did you set?
How does the rest of your model setup look? The scenario might be infeasible e.g. because with the "capacity limit" for the existing technologies, your demand could not be met.

You can of course play around with the parameters you mention, though I can't predict how successful this may be. Please share more information with us so that we can provide better help.

from message_ix.

SongminYu avatar SongminYu commented on July 3, 2024

Hi @glatterf42, I think I encountered a similar problem. I added the parameter bound_new_capacity_up and then met the error message Barrier limit on dual objective exceeded. Infeasible barrier solution (dependent on objective limit).

I asked ChatGPT and tried adding a GAMS parameter

DEFAULT_CPLEX_OPTIONS = {
    "advind": 0,
    "lpmethod": 4,
    "threads": 4,
    "epopt": 1e-6,
    "BarObjRng": 1e+20,  # <-- added this one
}

Then, the model could be solved.

from message_ix.

khaeru avatar khaeru commented on July 3, 2024

Per @SongminYu, here is the actual (not ChatGPT) documentation on the barobjrng setting of CPLEX: https://www.gams.com/latest/docs/S_CPLEX.html#CPLEXbarobjrng

barobjrng (real): maximum objective function

Determines the maximum absolute value of the objective function. The barrier algorithm looks at this limit to detect unbounded problems.

Default: 1.0e+20

Some thoughts:

  • Given the description, this could indeed be related to the "Barrier limit … exceeded".
  • However, the value that @SongminYu reports entering is the same as the default. It's unclear why giving the default value explicitly would change the behaviour of the solver. I would guess something else was also changed.
  • Without the exact contents of either @meng25meng or @SongminYu's models, it's impossible to guess why this limit is encountered.
  • However, from the description, I would guess that OBJ (or its dual) or something related ends up having a high value.
    • In our typical models like MESSAGEix-GLOBIOM or Westeros, the objective values are 3.9e6 (here) or 1.6e5 (here) —i.e. lower than the limit by a factor of 1e14.
    • Thus I would (again) guess that @meng25meng or @SongminYu's models have (probably in different ways) scaling issues due to choices of units that could be improved. For instance, entering a var_cost value as "1000000.0 EUR" instead of "1.0 mEUR" would increase the value of OBJ by 1e6. Several such choices could put OBJ over the limit.
    • They could possibly use the .lp_diag tool to identify and fix these parameter values.
    • But, since we haven't encountered this in our own workflows, we wouldn't be able to provide much help.

I would suggest this is wontfix. At most, we could:

  • Add a short tip to the docs, to the effect that seeing LP status 22 should prompt (a) a check of units and scaling and/or (b) use of barobjrng.
  • Encourage the users to share their complete model data via the GitHub discussions section for “MESSAGE modeling”, in case anyone has an interest to help. However, since as far as I can see there is no bug in message_ix per se.

from message_ix.

SongminYu avatar SongminYu commented on July 3, 2024

Hi @khaeru, thanks for your detailed answer as always! Then I don't remember exactly if there is something else that I changed. I have made some changes in the model so I cannot replicate it, either. I will report if I see it again. I also just revised the units of my monetary parameters by 1e6. Thanks for your advice!

from message_ix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.