Jump to content
Sign in to follow this  
VisSim Forum Archives

Optimisation of a model

Recommended Posts

Submitted by Enric on Wed, 05/25/2011 - 15:11 

I had a question regarding a model which I am trying to create: please note I am quite new to Vissim.

I am trying to model the level of a solute in the blood using a mass-transfer model. The model is defined by a number of compartments, with mass flow occurring between them and a number of integration functions, plus "unknown" constants which define the rates of mass flows between compartments. To create the model I have guessed these “unknown” constants and now the model is up and running. What I want to do is to “optimise” these constants to produce a model where the blood level most closely matches real, measured, values.

Please could you give me some guidance on this. I have two initial questions:

Obviously there a variable called “time” which ticks upwards as the model progresses. How can I access this variable to display another variable at a set time point (to compare to my actual values). ie. An operator which would allow the following function: WHEN time=x1 seconds, THEN display variable X. When time=x2 seconds, THEN display variable X. If I could do this, then I could perform the most simple form of optimisation by comparing variables visually ! In addition, being able to do this would give me a set of readings at set time points which I could use for optimisation.

In my relatively simple model, which produces in the end a single output (solute concentration), how can I devise a system that optimises the solute concentration curve against actual measured levels that I have at discrete time points ? I am not sure if I should be using the Cost function here.

Any guidance on this would be appreciated- and thanks. I'm not after someone doing the model for me, its more that I'm still getting to grips with what functions are available for this.

Share this post


Link to post
Share on other sites

Submitted by Anders89 on Thu, 05/26/2011 - 06:45.

Use the signal producer > ramp block for time. Use optimize > parameter unknown for your unknowns , and use the cost block to evaluate your objective function. Typical cost functions are integral of the square of the error between desired and actual. To enable optimization, select system > optimize

You can find an example under diagrams > examples > applications > optimization properties > Perform Optimization. You can also set the max iteration count and error tolerance there.

Share this post


Link to post
Share on other sites

Submitted by Enric on Thu, 05/26/2011 - 18:19.

Thanks. Sorry, the ramp method is so obvious I fail to understand why I didn't think of it ! I have one further question please:

With regard to the optimisation, I can see I can use parameterUnknown to create an unknown variable that iterates, and I can see how I can set its initial value by making a constant input into parameterUnknown. However, for the parameterUnknown properties, there are two parameters called "upper bound" and "lower bound". I initially presumed that these were the upper and lower range within that unknown parameter is permitted to iterate, but this does not seem to be the case. Firstly, could you explain please what these parameters are for as the Vissim manual does not explain. Also, if I want to set upper and lower limits, do I need to do this using "constrain" ? Thanks

Share this post


Link to post
Share on other sites

Submitted by Enric on Mon, 07/04/2011 - 01:06.

As in the post above, I am still trying to get the my parameterUnknown variables to abide by the upper and lower bound limits which I have asigned to them. We have purchased and installed Optimize pro, but this does not seem to make any difference and it still ignores these bounds. My model is as above: I am iterating variables (parameterUnknowns) within certain limits. The problem is that to avoid certain local minima I need to limit the range within which the parameters can iterate. As this function does not seem to work, even with OptimisePro, is there any simple solution to this ? I considered applying a "limit" block to the output of the ParameterUnknowns but that does not seem sensible as it will interfere with the iterating function.

Any help would, again, be much appreciated.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...