GithubHelp home page GithubHelp logo

cadmium-store_cashier's Introduction

This folder contains the Store Cashier   DEVS model implemented in Cadmium

/**************************/
/****FILES ORGANIZATION****/
/**************************/

README.txt
makefile

atomics [This folder contains atomic models implemented in Cadmium]
	client_generator.hpp
	employee.hpp
	queue.hpp
bin [This folder will be created automatically the first time you compile the project.
     It will contain all the executables]
build [This folder will be created automatically the first time you compile the project.
       It will contain all the build files (.o) generated during compilation]
data_structures [This folder contains message data structure used in the model]
	message.hpp
	message.cpp
simulation_results [This folder will be created automatically the first time you compile the project.
                    It will store the outputs from your simulations and tests]
test [This folder the unit test of the atomic models]
	main_client_generator.cpp
top_model [This folder contains the store queue top model]
	main.cpp
	
/*************/
/****STEPS****/
/*************/

1 - Update include path in the makefile in this folder and subfolders. You need to update the following lines:
	INCLUDECADMIUM=-I ../../cadmium/include
	INCLUDEDESTIMES=-I ../../DESTimes/include
    Update the relative path to cadmium/include from the folder where the makefile is. You need to take into account where you copied the folder during the installation process
	Example: INCLUDECADMIUM=-I ../../cadmium/include
	Do the same for the DESTimes library
    NOTE: if you follow the step by step installation guide you will not need to update these paths.
2 - Compile the project and the tests
	1 - Open the terminal (Ubuntu terminal for Linux and Cygwin for Windows) in the store_queue folder
	3 - To compile the project and the tests, type in the terminal:
			make clean; make all
3 - Run subnet test
	1 - Open the terminal in the bin folder. 
	2 - To run the test, type in the terminal "./NAME_OF_THE_COMPILED_FILE" (For windows, "./NAME_OF_THE_COMPILED_FILE.exe"). 
	For this specific test you need to type:
			./CLIENT_GENERATOR_TEST (or ./CLIENT_GENERATOR_TEST.exe for Windows)
	3 - To check the output of the test, go to the folder simulation_results and open  "client_generator_test_output_messages.txt" and "client_generator_test_output_state.txt"
4 - To run receiver and sender tests you just need to select the proper executable name in step 3.2
			
5 - Run the top model
	1 - Open the terminal (Ubuntu terminal for Linux and Cygwin for Windows) in the bin folder.
	3 - To run the model, type in the terminal "./NAME_OF_THE_COMPILED_FILE". For this test you need to type:
		./STORE (for Windows: ./STORE.exe)
	4 - To check the output of the model, go to the folder simulation_results and open "store_output_messasges.txt" and "store_output_state.txt"
	5 - To run the model with different inputs
		5.1. If you want to keep the output, rename "bank_output_messasges.txt" and "bank_output_state.txt". Otherwise it will be overwritten when you run the next simulation.

cadmium-store_cashier's People

Contributors

romancardenas avatar

Watchers

 avatar  avatar  avatar  avatar

cadmium-store_cashier's Issues

Linker error when adding time parameters to messages

I am trying to add fields to messages that provide information about simulation time.
All the new messages have been defined in data_structures/message.cpp and data_structures/message.hpp.

So far, only the main_client_generator_test.cpp test has been adapted to the new message style. However, when compiling using make simulators, The following error is displayed:

rm -f bin/* build/*
g++ -g -c -std=c++17 -I ../../cadmium/include -I ../../DESTimes/include test/main_client_generator_test.cpp -o build/main_client_generator_test.o
g++ -g -c -std=c++17 -I ../../cadmium/include -I ../../DESTimes/include data_structures/message.cpp -o build/message.o
g++ -g -o bin/CLIENT_GENERATOR_TEST build/main_client_generator_test.o build/message.o
Undefined symbols for architecture x86_64:
  "std::__1::basic_ostream<char, std::__1::char_traits<char> >& operator<<<NDTime>(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, newClient<NDTime> const&)", referenced from:
      cadmium::logger::value_or_name<newClient<NDTime>, std::__1::integral_constant<bool, true> >::print(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, newClient<NDTime> const&) in main_client_generator_test.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [tests] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.