Opened 7 years ago
Last modified 7 years ago
#4976 new defect
Optimization objective missing
Reported by: | massimo ceraolo | Owned by: | Vitalij Ruge |
---|---|---|---|
Priority: | low | Milestone: | Future |
Component: | Optimization | Version: | |
Keywords: | Cc: |
Description
If we follow the instructions in the OpenModelicaUsersGuide, chapter 8, we can reproduce the users's guide plots for Batch Reactor optimisation run.
However there is something strange.
I created as prescribed a file "nmpcBatchReactor.mo" containing:
optimization nmpcBatchReactor(objective=-x2) extends BatchReactor; end nmpcBatchReactor;
But if I make
loadFile("nmpcBatchReactor.mo") list(nmpcBatchReactor)
I get:
"optimization rmpcBatchReactor extends BatchReactor; end rmpcBatchReactor;"
To the optimization objective is not shown. Also looking at the optimization output log, I cannot find indication that OMC has really minimised -x2 (this must be inferred from analysis of the plots).
So I see two issues here:
1) list does not show the optimisation objective
2) record SimulationResult and following log do not show the optimisation objective as well.
Change History (4)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Milestone: | 2.0.0 → Future |
---|---|
Priority: | high → low |
follow-up: 4 comment:3 by , 7 years ago
@ceraolo Do you have chnage the gramma?
setCommandLineOptions("+g=Optimica"); getErrorString();
It's possible to use annotation approach for formlate final cosntraints
comment:4 by , 7 years ago
Nice to hear you again, Vitaly.
Replying to vitalij:
@ceraolo Do you have chnage the gramma?
setCommandLineOptions("+g=Optimica"); getErrorString();
Yes I did this first, otherwise loadModel(nmpcBatchReactor.mo") would return false.
Note that I had no problem in running this optimization; I justo wanted to mention that strange error when listing.
It's possible to use annotation approach for formlate final cosntraints
I like a lot this annotation approach (you gave me hints on it a few years ago). I have some difficulty with my problem, though, and I just thought to give a try to Optimica, just in case the algorithms were different.
I will give more details to you in a private mail.
Well, I've just realised that Optimica in OpenModelica does not support final constraints.
So, there is not much interest on this ticket. I'm going to change priority and target.