Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Astronaut's profile - activity

2020-10-30 06:55:41 -0500 received badge  Popular Question (source)
2019-04-15 09:29:00 -0500 received badge  Popular Question (source)
2016-02-22 10:13:12 -0500 asked a question genopt give the same f(x) s without any decrease, what is the problem ?

I'm using Dymola to simulate and Genopt to optimize a variable c by minimizing the f(x). everything related to simulation works fine, I used "CombiTimeTable" to impose the fist values of c in Dymola. I imported a .txt file called "modelicaschedule.txt" in CombiTimeTable which in Dymola I named it "inputFileName" from c:\genopt...

parameter String inputFileName = "modelicaSchedule.txt"

now the Genopt just print f(x)=255.4355657 and no changing .(mean no itterating)

but when I change the location name in "CombiTimeTable" to "inputFileName" teh value of Genopt changes but whith another f(x) (not the one that Dymola made)

2016-01-28 19:55:22 -0500 commented answer Why I don't get enough files as the outputs of the simulation of Dymola model with python ?

yes it's right but since I want to make thos files(dsin.txt...) using python and simulating from that, do you think that simulationg from Pyhton make those files or no ?

2016-01-26 11:16:51 -0500 received badge  Editor (source)
2016-01-26 11:14:59 -0500 asked a question Why I don't get enough files as the outputs of the simulation of Dymola model with python ?

I'm simulating a Dymola model with python with this code :

 # Import the function for compilation of models and the load_fmu method
from pymodelica import compile_fmu
from pyfmi import load_fmu
# Import the plotting library
import matplotlib.pyplot as plt
# Compile model
model_name = 'ObjectiveFunction'
mo_file = 'ObjectiveFunction.mo'
VDP_fmu = compile_fmu('ObjectiveFunction', compiler_options = {'extra_lib_dirs':'D:\JModelica.org-1.17\ObjectiveFunction'})
# Load model
vdpid = load_fmu(VDP_fmu)
res = vdpid.simulate(final_time=1000)

the problem is that, this will give me only 3 files as outputs: ObjectiveFunction_result.txt result.txt ObjectiveFunction_log.txt

but I need also dsin.txt , dsfinal.txt and .... so that I can run Genopt or other related programs, what is the problem ?

2016-01-26 11:03:28 -0500 commented answer How to perform optimization in Dymola or Openmodelica ?

Sir Also I wanted to know if I simulate my Dymola Model with python which I use :

Import the function for compilation of models and the load_fmu method

from pymodelica import compile_fmu from pyfmi import load_fmu

Import the plotting library

import matplotlib.pyplot as plt

Compile model

model_name = 'ObjectiveFunction' mo_file = 'ObjectiveFunction.mo' VDPenter code here_fmu = compile_fmu('ObjectiveFunction', compiler_options = {'extra_lib_dirs':'D:\JModelica.org-1.17\ObjectiveFunction'})

Load model

vdpid = load_fmu(VDP_fmu) res = vdpid.simulate(final_time=1000)``

continue below

2016-01-25 05:12:03 -0500 commented answer How to perform optimization in Dymola or Openmodelica ?

Thanks Sir It helped a lot.

2016-01-21 09:37:22 -0500 commented answer how to build and minimize the cost function using the output temperature(T) of a thermal system ?

thanks for your respond it was a miss understanding from my side.I got it.

2016-01-21 09:07:22 -0500 commented answer How to perform optimization in Dymola or Openmodelica ?

I have read the links and some other related links Sir the main point is that how can I try this with genopt because since the description in py4j wasn't enough I started to work with JPype but I don't know where to address genopt.jar in that program.

2016-01-19 10:25:50 -0500 commented answer How to perform optimization in Dymola or Openmodelica ?

thanks Sir I just chose Genopt and it worked fine now I'm dealing with the idea of : 1- Modeling and Simulation with Dymola 2- Optimizing with Genopt 3- make it work as a loop with PYTHON.

I already done the first two now and started python and loaded the simulation,now I don't know how can I bring Genopt in to Python .

2016-01-19 10:22:48 -0500 received badge  Supporter (source)
2016-01-08 18:26:51 -0500 asked a question How to perform optimization in Dymola or Openmodelica ?

after simulation of a model, how can we start dynamic optimizing in dymola or openmodelica ?

2015-10-04 11:19:08 -0500 received badge  Scholar (source)
2015-10-04 11:19:04 -0500 commented answer how to build and minimize the cost function using the output temperature(T) of a thermal system ?

Thanks for the respond, sorry for the brevity I should have explained it in detail, the Idea is that we want to use split range control system that makes the Tout (of room ) vary between Tmin and Tmax, So the problem would be the minimization of the cost function of the system.according to that my professor gave me this Formula : der(J)=(Tout - ((Tmax+Tmin)/2))^2 but I don't get the idea, is it Ok to minimize the derivative of cost function ?

2015-09-29 09:41:33 -0500 received badge  Student (source)
2015-09-29 08:41:20 -0500 asked a question how to build and minimize the cost function using the output temperature(T) of a thermal system ?

if we suppose we have a thermal system for a single Room with two inputs,one for heat pump and the other for the heat of environment and then we Have T(temp) as an output of our system and I want to minimize the cost function having T ,How we should do it (the output)?

Thanks alot.