[Cmpl] Create several models by one CMPL model file

Mike Steglich mike.steglich at stegger.net
Thu Jan 29 09:19:41 EST 2015


Sorry,

I forgot some semicolons and one curly bracket was to much ... 

	{
	model=1:   x + y <= i ;  |
 	model=2: x + z <= j ;    |
	default: y + z <= k; 
	}

Cheers,

Mike

> Am 29.01.2015 um 15:17 schrieb Mike Steglich <mike.steglich at stegger.net>:
> 
> Hi,
> 
> You can formulate that via a parameter and corresponding if-clauses:
> 
> parameters:
> 	model:=1 ;
> 
> constraints:
> 	
> 	{
> 	model=1:   x + y <= i  |
>  	model=2: x + z <= j }  |
> 	default: y + z <= k;
> 	}
> 
> Cheers,
> 
> Mike
> 
>> Am 28.01.2015 um 07:16 schrieb 鍾 岳杉 <chalin5739 at hotmail.com <mailto:chalin5739 at hotmail.com>>:
>> 
>> Hi, 
>> 
>> Could  CMPL  create  several  models  in  just  one  model  file?
>> For example,  I  define  the constraints con1: x + y <= i,  con2: x + z <= j, con3: y + z <= k in one model file
>> and I create model1  containing con1, con2
>>                                      model2 containing con1, con3
>>                                      model3 containing con2, con3
>> Can this be done?
>> Or I need  to create these three models by three model files?
>> 
>> Thanks!
>> 
>> Yueh-Shan, Chung
>> _______________________________________________
>> Cmpl mailing list
>> Cmpl at list.coin-or.org <mailto:Cmpl at list.coin-or.org>
>> http://list.coin-or.org/mailman/listinfo/cmpl
> 
> _______________________________________________
> Cmpl mailing list
> Cmpl at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cmpl

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cmpl/attachments/20150129/140181d0/attachment.html>


More information about the Cmpl mailing list