First release
- Added build script and AMPL license file - Fixed merge errors for the makefile - Extended the makefile header - Added initial AMQ message topics - Tested remote build - Removed AMPL license file Change-Id: I149f307fbb16c48d7217f388b1b09596c10d7ef2
This commit is contained in:
parent
f5cb0bc6f3
commit
9ac035a6b9
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ __pycache__/
|
|||||||
.nox/
|
.nox/
|
||||||
*.d
|
*.d
|
||||||
/SolverComponent
|
/SolverComponent
|
||||||
|
/ampl.lic
|
||||||
|
@ -108,7 +108,10 @@ private:
|
|||||||
// The problem is received as an AMPL file in a message. However, the AMPL
|
// The problem is received as an AMPL file in a message. However, the AMPL
|
||||||
// interface allows the loading of problem and data files on an existing
|
// interface allows the loading of problem and data files on an existing
|
||||||
// AMPL object, and the AMPL API object is therefore reused when a new
|
// AMPL object, and the AMPL API object is therefore reused when a new
|
||||||
// problem file is received.
|
// problem file is received. The problem definition is protected so that
|
||||||
|
// derived classes may solve the problem directly.
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
ampl::AMPL ProblemDefinition;
|
ampl::AMPL ProblemDefinition;
|
||||||
|
|
||||||
@ -135,7 +138,8 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static constexpr std::string_view DataFileTopic = "AMPL::DataFileUpdates";
|
static constexpr std::string_view DataFileTopic
|
||||||
|
= "eu.nebulouscloud.optimiser.solver.data";
|
||||||
|
|
||||||
// The message defining the data file is a JSON topic message with the same
|
// The message defining the data file is a JSON topic message with the same
|
||||||
// structure as the optimisation problem message: It contains only one
|
// structure as the optimisation problem message: It contains only one
|
||||||
|
@ -12,28 +12,33 @@
|
|||||||
# License: MPL2.0 (https://www.mozilla.org/en-US/MPL/2.0/)
|
# License: MPL2.0 (https://www.mozilla.org/en-US/MPL/2.0/)
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
|
||||||
# Installing the development framework for the distribution
|
# Installing the development framework for the distribution. Must be run
|
||||||
|
# as root on the machine - put 'sudo' in front if the build user is not root.
|
||||||
|
|
||||||
dnf --assumeyes group 'Development Tools'
|
dnf --assumeyes install gcc-c++ make git boost boost-devel ccache \
|
||||||
dnf --assumeyes install ccache qpid-proton-cpp* json-devel coin-or-Couenne
|
qpid-proton-cpp* jsoncpp-devel coin-or-Couenne wget
|
||||||
|
|
||||||
# Cloning the open source dependencies
|
# Cloning the open source dependencies
|
||||||
|
|
||||||
mkdir Externals
|
|
||||||
cd Externals
|
|
||||||
git clone https://github.com/jarro2783/cxxopts.git CxxOpts
|
git clone https://github.com/jarro2783/cxxopts.git CxxOpts
|
||||||
git clone https://github.com/GeirHo/TheronPlusPlus.git Theron++
|
git clone https://github.com/GeirHo/TheronPlusPlus.git Theron++
|
||||||
cd
|
mkdir Theron++/Bin
|
||||||
|
|
||||||
|
# Clone the solver component
|
||||||
|
|
||||||
|
git clone https://opendev.org/nebulous/optimiser-solver.git Solver
|
||||||
|
|
||||||
# Installing the AMPL library
|
# Installing the AMPL library
|
||||||
|
|
||||||
wget https://portal.ampl.com/external/?url=\
|
wget https://portal.ampl.com/external/?url=\
|
||||||
https://portal.ampl.com/dl/amplce/ampl.linux64.tgz
|
https://portal.ampl.com/dl/amplce/ampl.linux64.tgz -O ampl.linux64.tgz
|
||||||
tar --file=ampl.linux64.tgz --extract --directory=Externals/AMPL
|
tar --file=ampl.linux64.tgz --extract
|
||||||
cp ampl.lic Externals/AMPL
|
mv ampl.linux-intel64 AMPL
|
||||||
|
rm ampl.linux64.tgz
|
||||||
|
#cp ampl.lic AMPL
|
||||||
|
|
||||||
# Building the solver component
|
# Building the solver component
|
||||||
|
|
||||||
make SolverComponent -e THERON=Externals/Theron++ \
|
make -C Solver SolverComponent -e THERON=../Theron++ \
|
||||||
AMPL_INCLUDE=Externals/AMPL/amplapi/include AMPL_LIB=Externals/AMPL/amplapi/lib\
|
AMPL_INCLUDE=../AMPL/amplapi/include AMPL_LIB=../AMPL/amplapi/lib \
|
||||||
CxxOpts_DIR=Externals/CxxOpts/include
|
CxxOpts_DIR=../CxxOpts/include
|
||||||
|
11
Solver.hpp
11
Solver.hpp
@ -141,8 +141,8 @@ public:
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static constexpr
|
static constexpr std::string_view MessageIdentifier
|
||||||
std::string_view MessageIdentifier = "Solver::ApplicationExecutionContext";
|
= "eu.nebulouscloud.optimiser.solver.context";
|
||||||
|
|
||||||
ApplicationExecutionContext( const ContextIdentifierType & TheIdentifier,
|
ApplicationExecutionContext( const ContextIdentifierType & TheIdentifier,
|
||||||
const TimePointType MicroSecondTimePoint,
|
const TimePointType MicroSecondTimePoint,
|
||||||
@ -207,7 +207,8 @@ public:
|
|||||||
static constexpr std::string_view ObjectiveValues = "ObjectiveValues";
|
static constexpr std::string_view ObjectiveValues = "ObjectiveValues";
|
||||||
static constexpr std::string_view VariableValues = "VariableValues";
|
static constexpr std::string_view VariableValues = "VariableValues";
|
||||||
|
|
||||||
static constexpr std::string_view MessageIdentifier = "Solver::Solution";
|
static constexpr std::string_view MessageIdentifier
|
||||||
|
= "eu.nebulouscloud.optimiser.solver.solution";
|
||||||
|
|
||||||
Solution( const ContextIdentifierType & TheIdentifier,
|
Solution( const ContextIdentifierType & TheIdentifier,
|
||||||
const TimePointType MicroSecondTimePoint,
|
const TimePointType MicroSecondTimePoint,
|
||||||
@ -244,8 +245,8 @@ public:
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static constexpr
|
static constexpr std::string_view MessageIdentifier
|
||||||
std::string_view MessageIdentifier = "Solver::OptimisationProblem";
|
= "eu.nebulouscloud.optimiser.solver.model";
|
||||||
|
|
||||||
OptimisationProblem( const JSON & TheProblem )
|
OptimisationProblem( const JSON & TheProblem )
|
||||||
: JSONTopicMessage( std::string( MessageIdentifier ), TheProblem )
|
: JSONTopicMessage( std::string( MessageIdentifier ), TheProblem )
|
||||||
|
4
makefile
4
makefile
@ -98,8 +98,8 @@ CXXFLAGS = $(GENERAL_OPTIONS) $(INCLUDE_DIRECTORIES) $(DEPENDENCY_FLAGS) \
|
|||||||
# requires the full static path to the custom Theron library.
|
# requires the full static path to the custom Theron library.
|
||||||
|
|
||||||
CFLAGS = $(DEPENDENCY_FLAGS) $(OPTIMISATION_FLAG) $(GENERAL_OPTIONS)
|
CFLAGS = $(DEPENDENCY_FLAGS) $(OPTIMISATION_FLAG) $(GENERAL_OPTIONS)
|
||||||
LDFLAGS = -fuse-ld=gold -ggdb -D_DEBUG -pthread -l$(THERON)/Theron++.a \
|
LDFLAGS = -fuse-ld=gold -ggdb -D_DEBUG -pthread $(THERON)/Theron++.a \
|
||||||
-lqpid-proton-cpp -l$(AMPL_LIB)/libampl.so
|
-lqpid-proton-cpp $(AMPL_LIB)/libampl.so
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Theron library
|
# Theron library
|
||||||
|
Loading…
Reference in New Issue
Block a user