0

I'm trying to run a friend's code which perfectly runs at her pc. Just the same code. I don't know why, but i can't run it. I think the problem is probably about my compiler then. Because it's pretty much the same code. But I need to be sure it runs so i can submit it. Why won't it show the solution to the problem? Running code on Coliop4 4.1.0 SHOW'S AT THE END OF OUTPUT: Error (interfaces): Can't open GLPK Solution file: C:/Users/Procópio/AppData/Local/Temp/cmpl.H14816.gsol

'''''''' PROBLEM

%arg -solver cbc

parameters:
    farm:= set(1,2,3);
    culture:= set(1,2,3);
    area[farm]:= (400,650,350);
    waterdisp[farm]:= (1800,2200,650);
    maxcultarea[culture]:= (660,880,400);
    wateruse[culture]:= (5.5,4,3.5);
    revenue[culture]:= (5000,4000,1800);

variables:
    x[farm,culture]: real[0..];
    alpha : real[0..];

objectives:
    tot_revenue: sum{i in farm, j in culture: x[i,j]*revenue[j]} -> max;

constraints:
    cultivated_area {j in culture: sum{i in farm: x[i,j]}<= maxcultarea[j];}
    water_used {i in farm: sum{j in culture: x[i,j] * wateruse[j]} <= waterdisp[i];}
    area_used {i in farm: sum{j in culture: x[i,j]}<= area[i];}
    same_area {i in farm: sum{j in culture: x[i,j]} = alpha * area[i];}
'''''''

OUTPUT WINDOW

CMPL model generation - running

CMPL version: 1.12.0
Authors: Thomas Schleiff, Mike Steglich
Distributed under the GPLv3 

create model instance ...
write model instance ...
CMPL model generation - finished

Solver - running


Welcome to the CBC MILP Solver 

Version: 2.9.9 

Build Date: Mar 15 2018 



command line - cbc C:/Users/Proc�pio/AppData/Local/Temp/cmpl.H14816.mps max solve gsolu C:/Users/Proc�pio/AppData/Local/Temp/cmpl.H14816.gsol (default strategy 1)

Unable to open file C:/Users/Proc�pio/AppData/Local/Temp/cmpl.H14816.mps

** Current model not valid

** Current model not valid

No match for C:/Users/Proc�pio/AppData/Local/Temp/cmpl.H14816.gsol - ? for list of commands

Total time (CPU seconds):       0.00   (Wallclock seconds):       0.00



Error (interfaces): Can't open GLPK Solution file: C:/Users/Procópio/AppData/Local/Temp/cmpl.H14816.gsol
tadman
  • 208,517
  • 23
  • 234
  • 262
  • 2
    This is not C. What is it? Please tag correctly. – tadman Dec 03 '20 at 02:12
  • 1
    its cpml. Coliop4. I can't tag it correctly. – Gabriel Costa Procopio Dec 03 '20 at 15:11
  • 1
    I've retagged it better. – tadman Dec 04 '20 at 02:26
  • I'm afraid that you won't find anyone familiar with CPML on Stack Overflow. These tags didn't even exist at the time of your question, so it is unlikely that anyone will be monitoring these tags. Your best bet is probably to use [the official support channel](http://www.coliop.org/contact.html) mentioned on the Coliop web page. – Andreas Wenzel Dec 04 '20 at 12:47
  • Although I have no experience with CPML, one thing does seem suspicious to me: The path mentioned in the error message seems to have a strange symbol in it. It seems to be the windows username "Proc�pio". You might want to change the path of the file to a path without such a strange character. If you cannot specify the path directly, you might want to try running the program under a username without any special characters. That is maybe why it runs on your friend's computer, but not on yours. She maybe has a username without strange characters. – Andreas Wenzel Dec 04 '20 at 13:35

0 Answers0