Bug 127974 - Solver Macro cannot solve to a target because there is not suitable API object
Summary: Solver Macro cannot solve to a target because there is not suitable API object
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
6.3.1.2 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Solver UNO
  Show dependency treegraph
 
Reported: 2019-10-05 13:02 UTC by Bruce Sobey
Modified: 2024-08-27 00:37 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
File to Demonstrate problem with Basic Macro to Solve to target (16.73 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-10-05 13:02 UTC, Bruce Sobey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bruce Sobey 2019-10-05 13:02:42 UTC
Created attachment 154768 [details]
File to Demonstrate problem with Basic Macro to Solve to target

It is possible to call Solver from a macro program and solve for a maximum (and I think minimum) but there is no object one can set such as there is for "solv.maximise = true"  I would expect something such as "solve.target = dTarget"  I have checked the documentation and forums and used xray and got the list at the end but nothing indicates that a target can be set.

Calling solver with the uno does not allow presetting any values so is also not useful.  

The examples are shown in the file HelloSheet3.ods

AssumeNonNegative         boolean                             False   
SwarmSize                 long                                   70   
LearningCycles            long                                 2000   
GuessVariableRange        boolean                              True   
VariableRangeThreshold    double                                  3   
UseACRComparator          boolean                             False   
UseRandomStartingPoint    boolean                             False   
StagnationLimit           long                                   70   
Tolerance                 double                              1E-06   
EnhancedSolverStatus      boolean                              True   
AgentSwitchRate           double                                0.5   
DEFactor                  double                                0.5   
DECR                      double                                0.9   
PSC1                      double                              1.494   
PSC2                      double                              1.494   
PSWeight                  double                              0.729   
PSCL                      double                                  0   
ImplementationName        string                              <...>  (get), read-only 
SupportedServiceNames     []string                                   (get), read-only 
Locale                    struct                                     (get,set) 
Document                  object                                     attribute 
Objective                 struct                                     attribute 
Variables                 []struct                                   attribute 
Constraints               []struct                                   attribute 
Maximize                  boolean                             False  attribute 
Success                   boolean                             False  attribute, read-only 
ResultValue               double                                  0  attribute, read-only 
Solution                  []double                                   attribute, read-only 
ComponentDescription      string      "DEPS Evolutionary Algorithm"  attribute, read-only 
StatusDescription         string                                 ""  attribute, read-only 
PropertySetInfo           object                                     (get), read-only 
Properties                []struct                                   (get), read-only 
Types                     []type                                     (get), read-only 
ImplementationId          []byte                            <empty>  (get), read-only
Comment 1 Buovjaga 2020-04-23 16:13:04 UTC
Sounds legit, I'll set to NEW. Lingered in UNCONFIRMED for long enough.
Comment 2 QA Administrators 2022-04-24 03:30:14 UTC Comment hidden (obsolete)
Comment 3 Rafael Lima 2024-08-27 00:37:30 UTC
The ongoing development for bug 160062 will fix this issue.