[SCIP] Makefile-compiling

Benjamin Müller benjamin.mueller at zib.de
Tue Oct 4 16:30:47 CEST 2016


Dear Kaveh,

the problem is the structure of your project. You changed the SCIPDIR 
variable to '../' which means that your project directory should be 
directly inside the SCIP directory. If your project is in the examples 
directory you should modify it to '../../'.

Your easyscip.h file should include

	#include <vector>
	#include "objscip/objscipdefplugins.h"

So, you just need to follow these steps:

1.) cd <SCIP directory>
2.) mkdir <project name>; mkdir <project name>/src
3.) copy diet.cpp and easyscip.h to <project name>/src
4.) make sure that SCIPDIR is equal to '../' and MAINOBJ = diet.o

Regards,
Benjamin

On 10/04/2016 09:52 AM, Kaveh Azizian (Dr) wrote:
> Dear Benjamin, Thank you for the email.
> I followed the step but it does not work.
> I encounter with the following error whenI am running the attached  makefile in my project folder (/media/kaveh/DATA/scip-3.2.1/scip-3.2.1/easyscip-master):
> makemake: *** No rule to make target 'src/diet.cpp', needed by 'obj/O.linux.x86_64.gnu.opt/diet.o'.  Stop.
> Also do I need to compeletly remove the line  " #include "/media/kaveh/DATA/scip-3.2.1/scip-3.2.1/src/objscip/objscip.h" or I just need to change the path to #include "objscip/objscip".
>
> FYI
> I have installed SCI in the folder "/media/kaveh/DATA/scip-3.2.1/scip-3.2.1" and Soplex, ZIMPL in "/media/kaveh/DATA/SCIP".
>
> Regards,
> Kaveh
> ________________________________________
> From: Benjamin Müller [benjamin.mueller at zib.de]
> Sent: October 4, 2016 3:31 PM
> To: Kaveh Azizian (Dr); scip at zib.de
> Subject: Re: [SCIP] Makefile-compiling
>
> Dear Kaveh,
>
> I just have added your files to the VRP example and it worked
> immediately. Please perform the following three steps.
>
> 1.) Change the MAINOBJ variable in the (VRP) Makefile to
>
> MAINOBJ =       diet.o
>
> 2.) Rename src/diet.cc to src/diet.cpp
>
> 3.) Remove
>
> #include "/media/kaveh/DATA/scip-3.2.1/scip-3.2.1/src/objscip/objscip.h"
>
> from easyscip.h.
>
>
> Regards,
> Benjamin
>
>
> On 10/04/2016 09:13 AM, Kaveh Azizian (Dr) wrote:
>> Dear SIr,
>> I have downloaded SCIP and I am trying to use it to solve a MILP. My model is generated in C++ as :
>> Minimize     c^T X
>> S.T.             A_ineq  X<b_ineq
>>                    A_eq    X=b_eq
>>                     l_b<=X<=U_b
>> X includes some binary, integer, and continuous variables. I construct all of my vectors and matrices using Armadillo library. I applied cplex concert technology and obtained good results. But unfortunately, I could not compile a sample problem using SCIP to understand how to apply SCIP for my model. I found the attached example on the internet which is very useful for me but I am in trouble compiling it because a simple makefile that I wrote cannot find the libraries and header files of SCIP. In fact, I found out every header file such as objscip.h includes several other headerfiles inside which make it complicated to a simple Makefile to find and call them. I also tried to modify the corresponding Makefile for vrp problem which is provided in the example folder but I failed. I would appreciate if you let me know how I can use SCIP to solve my model. Is there any specific makefile to compile and run similar models to mine in C++ ?
>> Regards,
>> Kaveh
>> ________________________________
>> CONFIDENTIALITY: This email is intended solely for the person(s) named and may be confidential and/or privileged. If you are not the intended recipient, please delete it, notify us and do not copy, use, or disclose its contents.
>> Towards a sustainable earth: Print only when necessary. Thank you.
>>
>>
>>
>> _______________________________________________
>> Scip mailing list
>> Scip at zib.de
>> http://listserv.zib.de/mailman/listinfo/scip
>>
>
> --
> ______________________________
> Benjamin Müller
> Zuse Institute Berlin
> Takustr. 7, 14195 Berlin
> benjamin.mueller at zib.de
> +49 30 841 85-195
>

-- 
______________________________
Benjamin Müller
Zuse Institute Berlin
Takustr. 7, 14195 Berlin
benjamin.mueller at zib.de
+49 30 841 85-195


More information about the Scip mailing list