holzschu / holzschu/Carnets

Pulp library run error

Open
#271 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
634
Forks
44
PR merge metrics
No merged PRs in 30d

Description

Hello,

I have been successfully running a python program in the Jupyter environment.

I am now trying to run it with the Carnets app on IOS.

I have successfully installed the Pulp solver library ("requirement satisfied"), however I am still getting runtime errors.

Would appreciate any guidance how to solve?

Error output below.

thanks,
Tony.

---------------------------------------------------------------------------
PulpSolverError Traceback (most recent call last)
Cell In [3], line 234
232 squad = True
233 blended = False
--> 234 selected_players = get_optimised_squad (players_df, criteria, squad, blended, fixed_players_df)
235 output_squad(selected_players, criteria, squad, blended)
237 criteria = 'form'

Cell In [3], line 167, in get_optimised_squad(players_df, criteria, squad, blended, fixed_players_df)
163 prob += lpSum([player_vars[i] for i in player if teamid[int(i)] == club]) <= 3 # 3 Club Limit
166 # solve
--> 167 status = prob.solve()
170 # print ('total points of players = ',(value(prob.objective)))
171
172 # print ()
173 # print ()
174 # print ('problem status :', status, ' (', LpStatus[prob.status],')')
176 lookup_player = []

File /var/mobile/Containers/Data/Application/C361BC6E-4CAB-4957-97D4-D611E4AEEF77/Library/lib/python3.11/site-packages/pulp/pulp.py:1913, in LpProblem.solve(self, solver, **kwargs)
1911 # time it
1912 self.startClock()
-> 1913 status = solver.actualSolve(self, **kwargs)
1914 self.stopClock()
1915 self.restoreObjective(wasNone, dummyVar)

File /var/mobile/Containers/Data/Application/C361BC6E-4CAB-4957-97D4-D611E4AEEF77/Library/lib/python3.11/site-packages/pulp/apis/coin_api.py:137, in COIN_CMD.actualSolve(self, lp, **kwargs)
135 def actualSolve(self, lp, **kwargs):
136 """Solve a well formulated lp problem"""
--> 137 return self.solve_CBC(lp, **kwargs)

File /var/mobile/Containers/Data/Application/C361BC6E-4CAB-4957-97D4-D611E4AEEF77/Library/lib/python3.11/site-packages/pulp/apis/coin_api.py:206, in COIN_CMD.solve_CBC(self, lp, use_mps)
204 if pipe:
205 pipe.close()
--> 206 raise PulpSolverError(
207 "Pulp: Error while trying to execute, use msg=True for more details"
208 + self.path
209 )
210 if pipe:
211 pipe.close()

PulpSolverError: Pulp: Error while trying to execute, use msg=True for more details/var/mobile/Containers/Data/Application/C361BC6E-4CAB-4957-97D4-D611E4AEEF77/Library/lib/python3.11/site-packages/pulp/solverdir/cbc/osx/64/cbc

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the failing call to prob.solve() and the paths in pulp/apis/coin_api.py and solverdir/cbc/osx/64/cbc shown in the traceback. Reproduce the notebook in Carnets with solver diagnostics enabled, then determine whether the CBC executable can run in the iOS environment; done means a confirmed cause and a documented resolution or reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, jupyter-notebook, python
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.