Comments (4)
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.
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.
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 ofOBJ
by 1e6. Several such choices could putOBJ
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.
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)
- Electricity grid has no capacity-related parameters in Westeros tutorials
- Units are not correct and consistent in Westeros tutorials
- How to clone two single-node models into multiple nodes without success HOT 1
- Mention Z shell specifics in install instructions HOT 1
- scenario.solve ModelError HOT 10
- Loading Scenarios from Platform gets very slow over time
- ModuleNotFoundError: No module named 'utils' HOT 2
- `type_year="cumulative"` is only populated at `.solve()` HOT 10
- Accidentally openend issue HOT 1
- ModuleNotFoundError: No module named 'utils' HOT 21
- Add `.report.key`
- Plotting functionality should join `historical_activity` to `ACT` HOT 1
- Update install instructions with note about using conda and pip together HOT 2
- Ensure westeros_baseline tutorial is consistent with make_westeros
- Create a docs page about 'space'
- Monitor failures in "Install from conda-forge" workflow with pint 0.24
- Web application
- Fix derivation of `price_ref` from `PRICE_EMISSION` HOT 1
- parameter `bound_activity_lo` does not bound `ACT` but `CAP` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from message_ix.