Adding Uncertainties

60 views
Skip to first unread message

Matts Davids

unread,
Apr 5, 2022, 11:49:07 AM4/5/22
to am...@googlegroups.com
Hello Sir,

I have succeeded in writing a program to solve a MILP problem. In my mode I assumed that I knew all the parameters a day ahead. But in reality these parameters are fluctuating depending on the behavior of consumer, season, weekdays or weekends. I am asked to add the uncertainties to my model.

Can you please help me to know how I can make such a change? the data that are realistically uncertain are:
I_t_tom
I_t_hv
umuriro_p

Attached is my model.

Sincerely,
David
Execution.dat
Execution.mod
Execution.run

AMPL Google Group

unread,
Apr 7, 2022, 10:50:49 AM4/7/22
to AMPL Modeling Language
AMPL does not have any features that automatically add uncertainty to a model. Instead you need to adapt your formulation is some way that takes uncertainty into account; but that is a general formulation issue, rather than an AMPL issue, and so is outside the scope of this forum.

Exercise 4.5 in the AMPL book (starting at the bottom of page 69) describes how a simple formulation can be converted to a "two-stage stochastic program with recourse" that takes some uncertainty into account. By working through this exercise, you can gain an appreciation for how to convert to this kind of formulation. Then you can consider how to apply the same idea to your model.

A web search on "stochastic programming" will bring up more ideas and information on adding uncertainties to a model.


--
Robert Fourer
am...@googlegroups.com
{#HS:1837449296-109441#}

Matts Davids

unread,
Apr 7, 2022, 11:51:26 AM4/7/22
to am...@googlegroups.com
Thank you very much for the feedback. In my mode I have used the same approach as in example 4.5 where I considered 3 scenarios and their respective probabilities are given in the data file as Pi_w. However, with the available data Is there any support you can provide with to calculate these probabilities of occurrence? For example I have read a paper that talks about the subject but I have difficulties implementing it with AMPL. Can you please help me? Attached is the paper and the flowchart where they used the same mode to simulate the demand at a station.

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ampl/reply-77152-1837449296-5421348961-1649343044-764046970%40helpscout.net.
Algorithm.PNG
A_Stochastic_Optimal_Planning_Model_for_Fully_Green_Stand-Alone_PEV_Charging_Stations.pdf

AMPL Google Group

unread,
Apr 8, 2022, 1:38:07 PM4/8/22
to AMPL Modeling Language
Typically the scenarios and their probabilities are computed first, using simulation and statistical techniques, and then the results of that computation serve as input to the optimization software. The paper appears to take this approach, since MILP is not mentioned at all in section II.

Because calculating the probabilities of scenarios is a problem quite different from optimization, requiring quite different methods, it is not something that AMPL is designed to help with.


--
Robert Fourer
am...@googlegroups.com
{#HS:1837449296-109441#}
On Thu, Apr 7, 2022 at 3:52 PM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
Thank you very much for the feedback. In my mode I have used the same approach as in example 4.5 where I considered 3 scenarios and their respective probabilities are given in the data file as Pi_w. However, with the available data Is there any support you can provide with to calculate these probabilities of occurrence? For example I have read a paper that talks about the subject but I have difficulties implementing it with AMPL. Can you please help me? Attached is the paper and the flowchart where they used the same mode to simulate the demand at a station.

On Thu, Apr 7, 2022 at 2:50 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
AMPL does not have any features that automatically add uncertainty to a model. Instead you need to adapt your formulation is some way that takes uncertainty into account; but that is a general formulation issue, rather than an AMPL issue, and so is outside the scope of this forum.

Exercise 4.5 in the AMPL book (starting at the bottom of page 69) describes how a simple formulation can be converted to a "two-stage stochastic program with recourse" that takes some uncertainty into account. By working through this exercise, you can gain an appreciation for how to convert to this kind of formulation. Then you can consider how to apply the same idea to your model.

A web search on "stochastic programming" will bring up more ideas and information on adding uncertainties to a model.


--
Robert Fourer
am...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages