public:i-700-abms-08-1:final_project:cdm-s_extended
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
public:i-700-abms-08-1:final_project:cdm-s_extended [2008/04/21 17:16] – marco | public:i-700-abms-08-1:final_project:cdm-s_extended [2024/04/29 13:33] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
[[internal: | [[internal: | ||
+ | |||
Line 14: | Line 15: | ||
The main question is "How does the initial allocation of carbon quotas and the rules governing their trade influence the distribution and total release of carbon?" | The main question is "How does the initial allocation of carbon quotas and the rules governing their trade influence the distribution and total release of carbon?" | ||
In the second step we needed to answer to the following questions: | In the second step we needed to answer to the following questions: | ||
- | * What is the data: The data is the whole behavior of the simulation. We are interested in statistics and all the numbers. | + | * //What is the data//: The data is the whole behavior of the simulation. We are interested in statistics and all the numbers. |
- | * Where is the data: Those numbers and statistic values are held within the messages. Listening to all of them with a module is enough to have all the information we need to answer to the main topic. | + | * //Where is the data//: Those numbers and statistic values are held within the messages. Listening to all of them with a module is enough to have all the information we need to answer to the main topic. |
- | * How is it shared: The data is shared through the network and with messages with the use of the Blackboard system architecture. | + | * //How is it shared//: The data is shared through the network and with messages with the use of the Blackboard system architecture. |
- | * How is it processed/ | + | * //How is it processed/ |
- | This accomplish | + | This accomplishes |
In **step 3** we had to define: | In **step 3** we had to define: | ||
- | * Modules: this was given in the beginning with the specification of objective and the roughly defined modules. | + | * //Modules//: this was given in the beginning with the specification of objective and the roughly defined modules. |
- | * Blackboards: | + | * //Blackboards//: our blackboard architecture is implemented with a single WhiteBoard (naming by Psyclone framework) that is our Market. This is the most rational decision since in a double auction market the first functionality is to run a market accepting all the requests by the industries. |
- | * Unit tests: we used a unit test in the beginning to troubleshoot the initial weird behavior that we were getting from the first implementation. This was really helpful for having a robust skeleton of the system before starting improving the rest of the functionality.\\ | + | * //Unit tests//: we used a unit test in the beginning to troubleshoot the initial weird behavior that we were getting from the first implementation. This was really helpful for having a robust skeleton of the system before starting improving the rest of the functionality.\\ |
**Step 4**: //the fun starts here..//\\ | **Step 4**: //the fun starts here..//\\ | ||
This was one of the hardest step to go through because all the debugging, troubleshooting and important decision were made in this step after experiencing all the possible behaviors of the system.\\ | This was one of the hardest step to go through because all the debugging, troubleshooting and important decision were made in this step after experiencing all the possible behaviors of the system.\\ | ||
We got stuck on this step because most of the important decision/ | We got stuck on this step because most of the important decision/ | ||
- | * Expected communications: | + | * //Expected communications//: obviously we were really far from the expected system. Our modules were drowning the WhiteBoard because they were too fast to post messages and then some of the modules or even the Market were crashing. The solution was just slowing down the speed of the modules with a timer that allows all the publication/ |
- | * Efficient information flow: this part was really helpful once improved. We needed to have a lot of information to be exchanged among the modules and we started giving static hardcoded parameters, then we moved to the command line options and then again we throwed all the " | + | * //Efficient information flow//: this part was really helpful once improved. We needed to have a lot of information to be exchanged among the modules and we started giving static hardcoded parameters, then we moved to the command line options and then again we throwed all the " |
- | * Convenience with regard to programming languages and executables: | + | * //Convenience with regard to programming languages and executables//: we decided according to the teacher to use java because of its portability (and also because of the skills of most of the students). It could have been really an effort to use a c/c++ environment since we are three different users (mac, linux, windows), and again because we could have used a lot of code from the last year simulation. So the choice of using java was the most obvious. |
**First Iteration through 1-4 steps**\\ | **First Iteration through 1-4 steps**\\ | ||
Line 37: | Line 38: | ||
**Step 6**: assigning modules to team members.\\ | **Step 6**: assigning modules to team members.\\ | ||
- | ..this was easy :) Marco was assigned to the Market, Ivar started to code the Industry module, and Vigdis was feeding the others with equations and numbers. The " | + | ..this was easy :) Marco was assigned to the Market, Ivar started to code the Industry module, and Vigdis was feeding the others with equations and numbers. The " |
**Step 7**: starting to code.\\ | **Step 7**: starting to code.\\ | ||
We really followed this step literally. We think that it's very important to write modules as empty boxes first and nontheless in a breadth-first approach.\\ | We really followed this step literally. We think that it's very important to write modules as empty boxes first and nontheless in a breadth-first approach.\\ | ||
- | The " | + | The "//shells//" style of coding modules means that we built first the skeletons of the modules with the interface to post and receive messages. After the messaging system was working we started to code dummy functions inside the market and the industry. |
**Extension to the CDM-S:**\\ | **Extension to the CDM-S:**\\ | ||
Line 47: | Line 48: | ||
After that we finally had our first version (**0.2** in the svn repository) and we tested the system as described in **step 8**:\\ | After that we finally had our first version (**0.2** in the svn repository) and we tested the system as described in **step 8**:\\ | ||
- | The system was working and doing what it was expected to do without errors, but after 10 seconds it stopped. The reason is that the modules had short life. The way we gave them parameters and demand functions was bad implemented. | + | The system was working and doing what it was expected to do without errors, but after 10 seconds it stopped. The reason is that the modules had short life. The way we gave them parameters and demand functions was badly implemented |
**Step 9: Build Modules to specification.**\\ | **Step 9: Build Modules to specification.**\\ | ||
- | This step was the most brain consuming! This was the main aim of the topic and we are not economist | + | This step was the most brain consuming! This was the main aim of the topic and we are not economist so we spent lot of hours deciding what equations and values to implement in the psySpec and inside the Industry module.\\ |
In this step we started to really need the timing.. it's been impossible to go on coding without a clock. So back to **step 7** and building a Timer class. After that, again to **step 4** to test the whole system with the new module. | In this step we started to really need the timing.. it's been impossible to go on coding without a clock. So back to **step 7** and building a Timer class. After that, again to **step 4** to test the whole system with the new module. | ||
**Step 10/11:**\\ | **Step 10/11:**\\ | ||
- | The system is able to run on a single machine with 5 Industries and 1 Market. | + | The system is able to run on a single machine with 5 Industries and 1 Market |
/var/www/cadia.ru.is/wiki/data/attic/public/i-700-abms-08-1/final_project/cdm-s_extended.1208798171.txt.gz · Last modified: 2024/04/29 13:32 (external edit)