Open samiit opened 8 years ago
Sam,
Here is an example in Python where a model file (apm) is written based on an input data file:
http://apmonitor.com/do/index.php/Main/ModelIdentification
Let me know if this is what you are looking for or if you had something else in mind.
Best regards,
John Hedengren On Jul 7, 2016 12:23 AM, "Sam Mathew" notifications@github.com wrote:
Thank you for the extensive work. I wanted to know if we can write the .apm model file from after creating the problem in Julia?
Sam
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/APMonitor/apm_julia/issues/1, or mute the thread https://github.com/notifications/unsubscribe/AMkYA0xnK_BUS-EWF5GY4wqHAz_DIaA4ks5qTI03gaJpZM4JGv0K .
Thanks for that answer John.
I meant, something like, writeApm() type of function - does it exist?
Finally, I managed to create a .apm file using Julia just for text generation. I uploaded the .apm file and got the results from your APMonitor website using the command apm_load(s,a,"model.apm")
.
It was a simple linear problem, but APM gave me a sub-optimal solution. I got a lower minimum using CBC. I was just exploring APMonitor though, so it can be that I missed some setting. In case you are interested, here is the file:
Sam,
You can either write and load a text file or send each line of the APM file to the server with the apm() function. If you'd like to create a writeApm() function, we can add it to the code base with proper attribution.
Could you add the following to your apm file for the convergence? :
File apopt.opt minlp_gap_tol 0 minlp_maximum_iterations 100000 End File
Perhaps the solver is terminating early due to iterations or gap tolerance. This will create a new apopt.opt options file. Some of the default options are listed here:
Best regards,
John Hedengren On Jul 11, 2016 12:11 AM, "Sam Mathew" notifications@github.com wrote:
Thanks for that answer John.
I meant, something like, writeApm() type of function - does it exist?
Finally, I managed to create a .apm file using Julia just for text generation. I uploaded the .apm file and got the results from your APMonitor website using the command apm_load(s,a,"model.apm").
It was a simple linear problem, but APM gave me a sub-optimal solution. I got a lower minimum using CBC. I was just exploring APMonitor though, so it can be that I missed some setting. In case you are interested, here is the file:
model.apm.txt https://github.com/APMonitor/apm_julia/files/356417/model.apm.txt
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/APMonitor/apm_julia/issues/1#issuecomment-231638486, or mute the thread https://github.com/notifications/unsubscribe/AMkYA4IffdRMya38JLAIrZCn_rl8jJ1xks5qUcJtgaJpZM4JGv0K .
Thank you for the extensive work. I wanted to know if we can write the .apm model file from after creating the problem in Julia?
Sam