Closed enri07 closed 3 years ago
The model is a little bit complicated so it is difficult to give all the information about it
It's impossible to debug without an example.
Create a minimal working example by simplifing what you have. Comment out variables and constraints until the error disappears. Try removing data.
https://stackoverflow.com/help/minimal-reproducible-example
It looks like this might be something to do with your @decision
line.
Thank you for your help. I'm trying to simplify the problem as you suggested.
As regards the @decision
variable, is there a problem in the following declaration?
@decision(model, 0 <= x_us[u=user_set, a=users_data[u].asset_names] <= users_data[u].max_capacity[a]/users_data[u].size_asset[a], Int)
I used the same sintax allowed for JuMP variables. In this case user_set
and users_data[u].asset_names
are respectively finite sets of integers and strings.
Thank you very much for your previous advice. By analyzing one at a time all the variables, I was able to find that the mistake was the declaration of a @recourse
in the second stage that was indexed on an actual empty set. By removing it, all works fine and I'm also able to optimize the problem. I think that I can close this issue.
Hi,
I have build a two-stage stochastic model using the package StochasticPrograms and now I am trying to instantiate this program. The model is a little bit complicated so it is difficult to give all the information about it, but to summarize I have defined a new type of scenario made by two arrays of dictionaries providing the expectation function as described in the manual. Then I created an array of possible scenarios and all seems to work fine, I'm able to run the command expected on this array and it works as I was expecting. The problem appears when I try to run:
In this case, the following message is raised:
Also, I tried to run the command instantiate with different optimizer but nothing changed. Is there someone who could help me please? Thank you for your help.