CDP Forum Forum Index CDP Forum
NOTE: The forum is being replaced by support.icd.no
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to set up a project for running CDPSim

 
Post new topic   Reply to topic    CDP Forum Forum Index -> CDPSim
View previous topic :: View next topic  
Author Message
Svein



Joined: 14 Mar 2007
Posts: 94
Location: Ålesund, Norway

PostPosted: Wed 4 Jul 14:23:01 2007    Post subject: How to set up a project for running CDPSim Reply with quote

To set up the project for running dynamic simulations using CDPSim, follow the steps below.
It is assumed that a project and a library has already been created using CDPDeveloper:


1. Create a new simulator model using the menu Simulator->New sim. model in CDPDeveloper.
2. Add state variables to the new model
3. Create an instance of the simulator model using the menu Component->Create new
4. In Visual Studio, add $(CDPBase)\CDPSim to the Additional include directories for you library. (YourLibName->Properties->C/C++->General->Additional include directories).
5. Add $(CDPBase)\CDPSim to the Additional include directories in the CDP_Application project (CDP_Application->Properties->C/C++->General->Additional include directories).
6. In CDP_Application, libraries.h, add:
Code:
#include <SimulatorLib.h>

7. Instantiate a SimulatorManager component by adding this line inside the <Components> section in Application.xml:
Code:
<Component Name="Simulator" src="Components/CDP/Simulator.xml"></Component>
in libraries.h (in the CDP_Application project).
8. Copy the Simulator.xml file from templates folder to your Application/Components/CDP folder.
9. Add CDPSim_Debug.lib or CDPSim_Release.lib to the Linker->Input->Additional dependencies section in the CDP_Application project.
10. Start the application, and send a Start message to the simulator.
_________________
Svein Erling Linge, ICD
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    CDP Forum Forum Index -> CDPSim All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group